mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 20:17:43 +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:
@@ -24,22 +24,22 @@ $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
my $dbh1 = $sb->get_dbh_for('master');
|
||||
my $dbh2 = $sb->get_dbh_for('master');
|
||||
my $dbh1 = $sb->get_dbh_for('source');
|
||||
my $dbh2 = $sb->get_dbh_for('source');
|
||||
|
||||
if ( !$dbh1 || !$dbh2 ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
plan skip_all => 'Cannot connect to sandbox source';
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $master_dsn = $sb->dsn_for('master');
|
||||
my $source_dsn = $sb->dsn_for('source');
|
||||
my $sample = "t/pt-online-schema-change/samples";
|
||||
my $plugin = "$trunk/$sample/plugins";
|
||||
my $exit;
|
||||
my $rows;
|
||||
|
||||
# Loads pt_osc.t with cols id (pk), c (unique index),, d.
|
||||
$sb->load_file('master', "$sample/basic_no_fks_innodb.sql");
|
||||
$sb->load_file('source', "$sample/basic_no_fks_innodb.sql");
|
||||
|
||||
# #############################################################################
|
||||
# --no-swap-tables --no-drop-triggers
|
||||
@@ -47,7 +47,7 @@ $sb->load_file('master', "$sample/basic_no_fks_innodb.sql");
|
||||
|
||||
$output = output(
|
||||
sub { pt_online_schema_change::main(
|
||||
"$master_dsn,D=pt_osc,t=t",
|
||||
"$source_dsn,D=pt_osc,t=t",
|
||||
'--alter', 'DROP COLUMN d',
|
||||
qw(--execute --no-swap-tables --no-drop-new-table --no-drop-triggers))
|
||||
},
|
||||
@@ -71,11 +71,11 @@ is_deeply(
|
||||
# #############################################################################
|
||||
# --no-swap-tables --no-drop-triggers implies --no-drop-new-table
|
||||
# #############################################################################
|
||||
$sb->load_file('master', "$sample/basic_no_fks_innodb.sql");
|
||||
$sb->load_file('source', "$sample/basic_no_fks_innodb.sql");
|
||||
|
||||
($output, $exit) = full_output(
|
||||
sub { pt_online_schema_change::main(
|
||||
"$master_dsn,D=pt_osc,t=t",
|
||||
"$source_dsn,D=pt_osc,t=t",
|
||||
'--alter', 'ADD COLUMN t INT',
|
||||
qw(--execute --no-swap-tables --no-drop-triggers))
|
||||
}
|
||||
|
Reference in New Issue
Block a user