PT-2340 - Support MySQL 8.4

- Removed runtime.txt after discussion with Anastasia Alexandrova
- Added "use VersionParser" into tests in t/lib when needed
- Removed word master from tests for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary
- Removed word slave from tests for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary
- Updated modules for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary
- Changed mysql_ssl patch, so it is now short option s
- Added a check for existing zombies in t/pt-kill/execute_command.t
- Added bin/pt-galera-log-explainer to .gitignore
This commit is contained in:
Sveta Smirnova
2024-07-26 13:35:29 +03:00
parent 8cbb5a0c8f
commit 5c999ca3e0
114 changed files with 1898 additions and 1455 deletions

View File

@@ -17,10 +17,10 @@ require "$trunk/bin/pt-archiver";
my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $dbh = $sb->get_dbh_for('master');
my $dbh = $sb->get_dbh_for('source');
if ( !$dbh ) {
plan skip_all => 'Cannot connect to sandbox master';
plan skip_all => 'Cannot connect to sandbox source';
}
else {
plan tests => 18;
@@ -35,7 +35,7 @@ my $cmd = "perl -I $trunk/t/pt-archiver/samples $trunk/bin/pt-archiver";
$sb->create_dbs($dbh, ['test']);
# Check plugin that does nothing
$sb->load_file('master', 't/pt-archiver/samples/tables1-4.sql');
$sb->load_file('source', 't/pt-archiver/samples/tables1-4.sql');
$output = `$cmd --where 1=1 --source m=Plugin1,D=test,t=table_1,F=$cnf --dest t=table_2 2>&1`;
is($output, '', 'Loading a blank plugin worked OK');
$output = `/tmp/12345/use -N -e "select count(*) from test.table_1"`;
@@ -43,7 +43,7 @@ is($output + 0, 4, 'Purged no rows ok b/c of blank plugin');
# Test that ascending index check doesn't leave any holes on a unique index when
# there is a plugin that always says rows are archivable
$sb->load_file('master', 't/pt-archiver/samples/table5.sql');
$sb->load_file('source', 't/pt-archiver/samples/table5.sql');
$output = `$cmd --source m=Plugin2,D=test,t=table_5,F=$cnf --purge --limit 50 --where 'a<current_date - interval 1 day' 2>&1`;
is($output, '', 'No errors with strictly ascending index');
$output = `/tmp/12345/use -N -e "select count(*) from test.table_5"`;
@@ -51,7 +51,7 @@ is($output + 0, 0, 'Purged completely with strictly ascending index');
# Check plugin that adds rows to another table (same thing as --dest, but on
# same db handle)
$sb->load_file('master', 't/pt-archiver/samples/tables1-4.sql');
$sb->load_file('source', 't/pt-archiver/samples/tables1-4.sql');
$output = `$cmd --where 1=1 --source m=Plugin3,D=test,t=table_1,F=$cnf --purge 2>&1`;
is($output, '', 'Running with plugin did not die');
$output = `/tmp/12345/use -N -e "select count(*) from test.table_1"`;
@@ -60,7 +60,7 @@ $output = `/tmp/12345/use -N -e "select count(*) from test.table_2"`;
is($output + 0, 4, 'Plugin archived all rows to table_2 OK');
# Check plugin that does ON DUPLICATE KEY UPDATE on insert
$sb->load_file('master', 't/pt-archiver/samples/tables7-9.sql');
$sb->load_file('source', 't/pt-archiver/samples/tables7-9.sql');
$output = `$cmd --where 1=1 --source D=test,t=table_7,F=$cnf --dest m=Plugin4,t=table_8 2>&1`;
is($output, '', 'Loading plugin worked OK');
$output = `/tmp/12345/use -N -e "select count(*) from test.table_7"`;
@@ -73,7 +73,7 @@ $output = `/tmp/12345/use -N -e "select a, b, c from test.table_9"`;
like($output, qr/1\s+3\s+6/, 'ODKU added rows up');
# Check plugin that sets up and archives a temp table
$sb->load_file('master', 't/pt-archiver/samples/table10.sql');
$sb->load_file('source', 't/pt-archiver/samples/table10.sql');
$output = `$cmd --where 1=1 --source m=Plugin5,D=test,t=tmp_table,F=$cnf --dest t=table_10 2>&1`;
is($output, '', 'Loading plugin worked OK');
$output = `/tmp/12345/use -N -e "select count(*) from test.table_10"`;
@@ -81,8 +81,8 @@ is($output + 0, 2, 'Plugin archived all rows to table_10 OK');
# Check plugin that sets up and archives to one or the other table depending
# on even/odd
$sb->load_file('master', 't/pt-archiver/samples/table10.sql');
$sb->load_file('master', 't/pt-archiver/samples/table13.sql');
$sb->load_file('source', 't/pt-archiver/samples/table10.sql');
$sb->load_file('source', 't/pt-archiver/samples/table13.sql');
$output = `$cmd --where 1=1 --source D=test,t=table_13,F=$cnf --dest m=Plugin6,t=table_10 2>&1`;
is($output, '', 'Loading plugin worked OK');
$output = `/tmp/12345/use -N -e "select count(*) from test.table_even"`;