PT-2340 - Support MySQL 8.4

- Adjusted pt-variable-advisor, so it reflects current defaults
This commit is contained in:
Sveta Smirnova
2024-10-04 19:02:07 +03:00
parent e4281dc6c2
commit fcb2d549b8
4 changed files with 33 additions and 12 deletions

View File

@@ -3445,7 +3445,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return _var_eq($args{variables}->{innodb_buffer_pool_size},
10 * 1_048_576); # 10M
128 * 1_048_576); # 10M
},
},
{
@@ -3502,7 +3502,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return _var_gt($args{variables}->{innodb_log_buffer_size},
16 * 1_048_576); # 16M
64 * 1_048_576); # 16M
},
},
{
@@ -3510,7 +3510,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return _var_eq($args{variables}->{innodb_log_file_size},
5 * 1_048_576); # 5M
48 * 1_048_576); # 5M
},
},
{
@@ -3633,6 +3633,13 @@ sub get_rules {
512 * 1_048_576); # 512M
},
},
{
id => 'query_cache_size-3',
code => sub {
my ( %args ) = @_;
return _var_neq($args{variables}->{query_cache_size}, 0);
},
},
{
id => 'read_buffer_size-1',
code => sub {
@@ -3833,7 +3840,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return 0 unless $args{variables}->{storage_engine};
return $args{variables}->{storage_engine} !~ m/InnoDB|MyISAM/i ? 1 : 0;
return $args{variables}->{storage_engine} !~ m/InnoDB/i ? 1 : 0;
},
},
{
@@ -5839,6 +5846,13 @@ severity: warn
The query cache can cause severe performance problems when it is
larger than 256MB, especially on multi-core machines.
=item query_cache_size-3
severity: note
The query cache can cause severe performance problems when it is
enabled, especially in high concurrent loads on multi-core machines.
=item read_buffer_size-1
severity: note

View File

@@ -149,7 +149,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return _var_eq($args{variables}->{innodb_buffer_pool_size},
10 * 1_048_576); # 10M
128 * 1_048_576); # 10M
},
},
{
@@ -206,7 +206,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return _var_gt($args{variables}->{innodb_log_buffer_size},
16 * 1_048_576); # 16M
64 * 1_048_576); # 16M
},
},
{
@@ -214,7 +214,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return _var_eq($args{variables}->{innodb_log_file_size},
5 * 1_048_576); # 5M
48 * 1_048_576); # 5M
},
},
{
@@ -337,6 +337,13 @@ sub get_rules {
512 * 1_048_576); # 512M
},
},
{
id => 'query_cache_size-3',
code => sub {
my ( %args ) = @_;
return _var_neq($args{variables}->{query_cache_size}, 0);
},
},
{
id => 'read_buffer_size-1',
code => sub {
@@ -537,7 +544,7 @@ sub get_rules {
code => sub {
my ( %args ) = @_;
return 0 unless $args{variables}->{storage_engine};
return $args{variables}->{storage_engine} !~ m/InnoDB|MyISAM/i ? 1 : 0;
return $args{variables}->{storage_engine} !~ m/InnoDB/i ? 1 : 0;
},
},
{

View File

@@ -89,7 +89,7 @@
| innodb_lock_wait_timeout | 50 |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
| innodb_log_file_size | 50331648 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | /tmp/12345/data |
| innodb_max_dirty_pages_pct | 90 |
@@ -243,7 +243,7 @@
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
| storage_engine | MyISAM |
| storage_engine | InnoDB |
| sync_binlog | 0 |
| sync_frm | ON |
| system_time_zone | MDT |

View File

@@ -87,7 +87,7 @@ innodb_force_recovery 0
innodb_lock_wait_timeout 3
innodb_locks_unsafe_for_binlog OFF
innodb_log_buffer_size 1048576
innodb_log_file_size 5242880
innodb_log_file_size 50331648
innodb_log_files_in_group 2
innodb_log_group_home_dir /tmp/12345/data
innodb_max_dirty_pages_pct 90
@@ -241,7 +241,7 @@ ssl_capath
ssl_cert
ssl_cipher
ssl_key
storage_engine MyISAM
storage_engine InnoDB
sync_binlog 0
sync_frm ON
system_time_zone MDT