mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-29 01:21:37 +00:00
PT-2340 - Support MySQL 8.4
- Updated modules and tests for pt-online-schema-change - Removed typo from lib/MasterSlave.pm
This commit is contained in:
@@ -23,18 +23,18 @@ require "$trunk/bin/pt-online-schema-change";
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
my $master_dbh = $sb->get_dbh_for('master');
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my $source_dbh = $sb->get_dbh_for('source');
|
||||
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
|
||||
if ( !$master_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
if ( !$source_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
|
||||
if ($sandbox_version lt '5.7') {
|
||||
plan skip_all => "RocksDB is only available on Percona Server 5.7.19+";
|
||||
}
|
||||
|
||||
my $rows = $master_dbh->selectall_arrayref('SHOW ENGINES', {Slice=>{}});
|
||||
my $rows = $source_dbh->selectall_arrayref('SHOW ENGINES', {Slice=>{}});
|
||||
my $rocksdb_enabled;
|
||||
for my $row (@$rows) {
|
||||
if ($row->{engine} eq 'ROCKSDB') {
|
||||
@@ -56,10 +56,10 @@ my @args = (qw(--set-vars innodb_lock_wait_timeout=3));
|
||||
my $output;
|
||||
my $exit_status;
|
||||
|
||||
$sb->load_file('master', "t/pt-online-schema-change/samples/pt-207.sql");
|
||||
$sb->load_file('source', "t/pt-online-schema-change/samples/pt-207.sql");
|
||||
|
||||
($output, $exit_status) = full_output(
|
||||
sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=t1",
|
||||
sub { pt_online_schema_change::main(@args, "$source_dsn,D=test,t=t1",
|
||||
'--execute',
|
||||
'--alter', "ADD INDEX (f3)",
|
||||
),
|
||||
@@ -78,11 +78,11 @@ like(
|
||||
"PT-207 Message cannot add index with invalid collation to a RocksDB table",
|
||||
);
|
||||
|
||||
$master_dbh->do("DROP DATABASE IF EXISTS test");
|
||||
$source_dbh->do("DROP DATABASE IF EXISTS test");
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
$sb->wipe_clean($master_dbh);
|
||||
$sb->wipe_clean($source_dbh);
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user