mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 22:58:28 +00:00
PT-2340 - Support MySQL 8.4
- Added sleep to t/lib/MasterSlave.t, so it does not fail on fast machines - Disabled SSL tests on versions earlier than 8.0
This commit is contained in:
@@ -235,6 +235,9 @@ diag(`$trunk/sandbox/start-sandbox replica 2903 2900`);
|
||||
diag(`$trunk/sandbox/start-sandbox replica 2901 2900`);
|
||||
diag(`$trunk/sandbox/start-sandbox replica 2902 2901`);
|
||||
|
||||
# We need to sleep, so source server updates list of replicas on fast machines.
|
||||
sleep(1);
|
||||
|
||||
# I discovered something weird while updating this test. Above, you see that
|
||||
# slave2 is started first, then the others. Before, slave2 was started last,
|
||||
# but this caused the tests to fail because SHOW SLAVE HOSTS on the master
|
||||
|
@@ -22,6 +22,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my ($output, $exit_code);
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
|
@@ -23,6 +23,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my ($output, $exit_code);
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
|
@@ -23,6 +23,9 @@ my $dbh2 = $sb->get_dbh_for('source', { PrintError => 0, RaiseError => 1, AutoCo
|
||||
if ( !$dbh1 || !$dbh2 ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my ($output, $exit_code);
|
||||
my $dsn = $sb->dsn_for('source');
|
||||
|
@@ -23,6 +23,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $sample = "t/pt-duplicate-key-checker/samples/";
|
||||
|
@@ -23,6 +23,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $cnf = '/tmp/12345/my.sandbox.cnf';
|
||||
|
@@ -24,6 +24,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
$sb->create_dbs($dbh, [qw(test)]);
|
||||
|
||||
|
@@ -23,6 +23,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
$sb->create_dbs($dbh, ['test']);
|
||||
|
||||
|
@@ -23,7 +23,10 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
if ( !@{ $dbh->selectall_arrayref("show databases like 'sakila'") } ) {
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
elsif ( !@{ $dbh->selectall_arrayref("show databases like 'sakila'") } ) {
|
||||
plan skip_all => "Sakila database is not loaded";
|
||||
}
|
||||
|
||||
|
@@ -26,6 +26,9 @@ my $source_dbh = $sb->get_dbh_for('source');
|
||||
if ( !$source_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
else {
|
||||
plan tests => 6;
|
||||
}
|
||||
|
@@ -25,6 +25,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
else {
|
||||
plan tests => 6;
|
||||
}
|
||||
|
@@ -28,6 +28,9 @@ if ( !$source_dbh ) {
|
||||
elsif ( !$replica_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox replica1';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
# 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
|
||||
|
@@ -15,6 +15,10 @@ use PerconaTest;
|
||||
use Sandbox;
|
||||
require "$trunk/bin/pt-replica-restart";
|
||||
|
||||
if ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
diag('Restarting the sandbox');
|
||||
diag(`SAKILA=0 REPLICATION_THREADS=0 GTID=1 $trunk/sandbox/test-env restart`);
|
||||
diag("Sandbox restarted");
|
||||
|
@@ -24,6 +24,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
$sb->wipe_clean($dbh);
|
||||
|
||||
|
@@ -25,6 +25,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
my $pid_file = "/tmp/pt-stalk.pid.$PID";
|
||||
|
@@ -22,6 +22,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
else {
|
||||
plan tests => 7;
|
||||
}
|
||||
|
@@ -26,6 +26,9 @@ if ( !$source_dbh ) {
|
||||
elsif ( !$replica_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox replica';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
else {
|
||||
plan tests => 6;
|
||||
}
|
||||
|
@@ -22,6 +22,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
else {
|
||||
plan tests => 6;
|
||||
}
|
||||
|
@@ -28,6 +28,9 @@ my $dbh1 = $sb->get_dbh_for('host1');
|
||||
if ( !$dbh1 ) {
|
||||
plan skip_all => 'Cannot connect to sandbox host1';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my $host1_dsn = $sb->dsn_for('host1');
|
||||
my $tmpdir = tempdir("/tmp/pt-upgrade.$PID.XXXXXX", CLEANUP => 1);
|
||||
|
@@ -23,6 +23,9 @@ my $dsn = $sb->dsn_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => "Cannot connect to sandbox source";
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
# #############################################################################
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1168106
|
||||
|
@@ -22,6 +22,9 @@ my $dbh = $sb->get_dbh_for('source');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
|
||||
my ($output, $exit_code);
|
||||
|
||||
|
Reference in New Issue
Block a user