mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-26 01:02:25 +08:00
PT-1747 pt-online-schema-change was bringing the database into a broken state (#491)
* PT-1717 Updated behavior for FKs * Fixed rename_columns.t * Fixed pt-244.t * fixed drop swap test * Fixed test for MySQL 8.0 * Updated test for MySQL 8 * Updated test for MySQL 8
This commit is contained in:
@@ -19,7 +19,6 @@ use Sandbox;
|
||||
use SqlModes;
|
||||
use File::Temp qw/ tempdir /;
|
||||
|
||||
plan tests => 3;
|
||||
|
||||
require "$trunk/bin/pt-online-schema-change";
|
||||
|
||||
@@ -30,6 +29,10 @@ my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
|
||||
if ( !$master_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
} elsif ($sandbox_version ge '8.0') {
|
||||
plan skip_all => 'Drop swap does not work with MySQL 8.0+';
|
||||
} else {
|
||||
plan tests => 3;
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
@@ -51,12 +54,14 @@ $sb->load_file('master', "$sample/pt-169.sql");
|
||||
},
|
||||
);
|
||||
|
||||
# 1
|
||||
is(
|
||||
$exit_status,
|
||||
$ERROR_UPDATING_FKS,
|
||||
"--alter rename columns with uppercase names -> exit status 0",
|
||||
);
|
||||
|
||||
# 2
|
||||
# Since drop_swap has failed, the clueanup process should be skipped and the new table
|
||||
# shouldn't be deleted
|
||||
my $row = $master_dbh->selectrow_hashref("select count(*) AS how_many from test._users_new");
|
||||
|
||||
Reference in New Issue
Block a user