diff --git a/t/pt-config-diff/long_vars.t b/t/pt-config-diff/long_vars.t index 36425855..adaf0620 100644 --- a/t/pt-config-diff/long_vars.t +++ b/t/pt-config-diff/long_vars.t @@ -26,99 +26,47 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox source'; } -if ( $sandbox_version ge '8.0' ) { - $ver = "80"; - $reset = q{SET GLOBAL tls_ciphersuites = ''}; +if ( $sandbox_version ge '5.7' ) { + $reset = q{SET GLOBAL session_track_system_variables = ''}; $set_short = - q{SET GLOBAL tls_ciphersuites = '}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256'}; + q{SET GLOBAL session_track_system_variables = '}. + q{activate_all_roles_on_login,admin_address,}. + q{admin_port,admin_ssl_ca,admin_ssl_capath,admin_ssl_cert,}. + q{admin_ssl_cipher,admin_ssl_crl,admin_ssl_crlpath,admin_ssl_key,}. + q{admin_tls_ciphersuites,admin_tls_version,authentication_policy,}. + q{auto_generate_certs,auto_increment_increment,}. + q{auto_increment_offset,autocommit,automatic_sp_privileges,}. + q{back_log,basedir,big_tables,bind_address,binlog_cache_size,}. + q{binlog_checksum,binlog_ddl_skip_rewrite,}. + q{binlog_direct_non_transactional_updates,binlog_encryption,}. + q{binlog_error_action,binlog_expire_logs_auto_purge,}. + q{binlog_expire_logs_seconds,binlog_format,binlog_group_commit_sync_delay,}. + q{binlog_group_commit_sync_no_delay_count,binlog_gtid_simple_recovery,}. + q{binlog_max_flush_queue_time,binlog_order_commits,}. + q{binlog_rotate_encryption_master_key_at_startup,binlog_row_event_max_size,}. + q{binlog_row_image,binlog_row_metadata,binlog_row_value_options,}. + q{binlog_rows_query_log_events,binlog_skip_flush_commands,}. + q{binlog_space_limit,binlog_stmt_cache_size'}; $set_long = - q{SET GLOBAL tls_ciphersuites = '}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256,}. - q{TLS_AES_128_GCM_SHA256,TLS_AES_128_GCM_SHA256'}; -} -elsif ( $sandbox_version ge '5.7' ) { - $ver = "57"; - $reset = q{SET GLOBAL log_syslog_tag = ''}; - $set_short = - q{SET GLOBAL log_syslog_tag = '}. - q{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}. - q{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}. - q{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}. - q{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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in_ssl_ca,admin_ssl_capath,admin_ssl_cert,}. + q{admin_ssl_cipher,admin_ssl_crl,admin_ssl_crlpath,admin_ssl_key,}. + q{admin_tls_ciphersuites,admin_tls_version,authentication_policy,}. + q{auto_generate_certs,auto_increment_increment,}. + q{auto_increment_offset,autocommit,automatic_sp_privileges,}. + q{back_log,basedir,big_tables,bind_address,binlog_cache_size,}. + q{binlog_checksum,binlog_ddl_skip_rewrite,}. + q{binlog_direct_non_transactional_updates,binlog_encryption,}. + q{binlog_error_action,binlog_expire_logs_auto_purge,}. + q{binlog_expire_logs_seconds,binlog_format,binlog_group_commit_sync_delay,}. + q{binlog_group_commit_sync_no_delay_count,binlog_gtid_simple_recovery,}. + q{binlog_max_flush_queue_time,binlog_order_commits,}. + q{binlog_rotate_encryption_master_key_at_startup,binlog_row_event_max_size,}. + q{binlog_row_image,binlog_row_metadata,binlog_row_value_options,}. + q{binlog_rows_query_log_events,binlog_skip_flush_commands,}. + q{binlog_space_limit,binlog_stmt_cache_size,}. + q{binlog_transaction_compression,binlog_transaction_compression_level_zstd'}; } else { plan skip_all => "Requires MySQL 5.7 or newer"; @@ -131,7 +79,7 @@ $sb->do_as_root('source', $set_short); $output = output( sub { $retval = pt_config_diff::main( - "${trunk}/t/pt-config-diff/samples/long_vars_${ver}_1.cnf", + "${trunk}/t/pt-config-diff/samples/long_vars_1.cnf", 'h=127.1,P=12345,u=msandbox,p=msandbox') }, stderr => 1, @@ -147,7 +95,7 @@ $sb->do_as_root('source', $set_long); $output = output( sub { $retval = pt_config_diff::main( - "${trunk}/t/pt-config-diff/samples/long_vars_${ver}_2.cnf", + "${trunk}/t/pt-config-diff/samples/long_vars_2.cnf", 'h=127.1,P=12345,u=msandbox,p=msandbox') }, stderr => 1, @@ -166,4 +114,4 @@ $sb->do_as_root('source', $reset); $sb->wipe_clean($dbh); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); -done_testing; \ No newline at end of file +done_testing; diff --git a/t/pt-config-diff/samples/long_vars_1.cnf b/t/pt-config-diff/samples/long_vars_1.cnf new file mode 100644 index 00000000..fa709a6d --- /dev/null +++ b/t/pt-config-diff/samples/long_vars_1.cnf @@ -0,0 +1,2 @@ +[mysqld] +session_track_system_variables = 'activate_all_roles_on_login,admin_address,admin_port,admin_ssl_ca,admin_ssl_capath,admin_ssl_cert,admin_ssl_cipher,admin_ssl_crl,admin_ssl_crlpath,admin_ssl_key,admin_tls_ciphersuites,admin_tls_version,authentication_policy,auto_generate_certs,auto_increment_increment,auto_increment_offset,autocommit,automatic_sp_privileges,back_log,basedir,big_tables,bind_address,binlog_cache_size,binlog_checksum,binlog_ddl_skip_rewrite,binlog_direct_non_transactional_updates,binlog_encryption,binlog_error_action,binlog_expire_logs_auto_purge,binlog_expire_logs_seconds,binlog_format,binlog_group_commit_sync_delay,binlog_group_commit_sync_no_delay_count,binlog_gtid_simple_recovery,binlog_max_flush_queue_time,binlog_order_commits,binlog_rotate_encryption_master_key_at_startup,binlog_row_event_max_size,binlog_row_image,binlog_row_metadata,binlog_row_value_options,binlog_rows_query_log_events,binlog_skip_flush_commands,binlog_space_limit,binlog_stmt_cache_size' diff --git a/t/pt-config-diff/samples/long_vars_2.cnf b/t/pt-config-diff/samples/long_vars_2.cnf new file mode 100644 index 00000000..89b77389 --- /dev/null +++ b/t/pt-config-diff/samples/long_vars_2.cnf @@ -0,0 +1,2 @@ +[mysqld] +session_track_system_variables = 'activate_all_roles_on_login,admin_address,admin_port,admin_ssl_ca,admin_ssl_capath,admin_ssl_cert,admin_ssl_cipher,admin_ssl_crl,admin_ssl_crlpath,admin_ssl_key,admin_tls_ciphersuites,admin_tls_version,authentication_policy,auto_generate_certs,auto_increment_increment,auto_increment_offset,autocommit,automatic_sp_privileges,back_log,basedir,big_tables,bind_address,binlog_cache_size,binlog_checksum,binlog_ddl_skip_rewrite,binlog_direct_non_transactional_updates,binlog_encryption,binlog_error_action,binlog_expire_logs_auto_purge,binlog_expire_logs_seconds,binlog_format,binlog_group_commit_sync_delay,binlog_group_commit_sync_no_delay_count,binlog_gtid_simple_recovery,binlog_max_flush_queue_time,binlog_order_commits,binlog_rotate_encryption_master_key_at_startup,binlog_row_event_max_size,binlog_row_image,binlog_row_metadata,binlog_row_value_options,binlog_rows_query_log_events,binlog_skip_flush_commands,binlog_space_limit,binlog_stmt_cache_size,binlog_transaction_compression,binlog_transaction_compression_level_zstd'