PT-2340 - Support MySQL 8.4

- Updated modules and tests for pt-query-digest, pt-show-grants, pt-slave-delay, pt-slave-find, pt-slave-restart, pt-stalk, pt-summary, pt-table-checksum
This commit is contained in:
Sveta Smirnova
2024-07-30 18:35:36 +03:00
parent 76c1202cb5
commit d02355f89b
94 changed files with 2930 additions and 2306 deletions

View File

@@ -17,10 +17,10 @@ require "$trunk/bin/pt-table-checksum";
my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $master_dbh = $sb->get_dbh_for('master');
my $source_dbh = $sb->get_dbh_for('source');
if ( !$master_dbh ) {
plan skip_all => 'Cannot connect to sandbox master';
if ( !$source_dbh ) {
plan skip_all => 'Cannot connect to sandbox source';
}
else {
plan tests => 6;
@@ -29,11 +29,11 @@ else {
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
# And --max-load "" prevents waiting for status variables.
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
my @args = ($source_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
$sb->create_dbs($master_dbh, ['test']);
$sb->load_file('master', "t/lib/samples/char-chunking/ascii.sql", 'test');
$sb->create_dbs($source_dbh, ['test']);
$sb->load_file('source', "t/lib/samples/char-chunking/ascii.sql", 'test');
#1
ok(
no_diff(
@@ -56,21 +56,21 @@ ok(
"Char chunk ascii, chunk size 20"
);
my $row = $master_dbh->selectrow_arrayref("select lower_boundary, upper_boundary from percona.checksums where db='test' and tbl='ascii' and chunk=1");
my $row = $source_dbh->selectrow_arrayref("select lower_boundary, upper_boundary from percona.checksums where db='test' and tbl='ascii' and chunk=1");
is_deeply(
$row,
[ '', 'burt' ],
"First boundaries"
);
$row = $master_dbh->selectrow_arrayref("select lower_boundary, upper_boundary from percona.checksums where db='test' and tbl='ascii' and chunk=9");
$row = $source_dbh->selectrow_arrayref("select lower_boundary, upper_boundary from percona.checksums where db='test' and tbl='ascii' and chunk=9");
is_deeply(
$row,
[ undef, '' ],
"Lower oob boundary"
);
$row = $master_dbh->selectrow_arrayref("select lower_boundary, upper_boundary from percona.checksums where db='test' and tbl='ascii' and chunk=10");
$row = $source_dbh->selectrow_arrayref("select lower_boundary, upper_boundary from percona.checksums where db='test' and tbl='ascii' and chunk=10");
is_deeply(
$row,
[ 'ZESUS!!!', undef ],
@@ -80,6 +80,6 @@ is_deeply(
# #############################################################################
# Done.
# #############################################################################
$sb->wipe_clean($master_dbh);
$sb->wipe_clean($source_dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
exit;