pt-osc fixed basics.t tests

This commit is contained in:
frank-cizmich
2015-12-30 23:29:36 -03:00
parent 0c18e8969b
commit 6a4d33039c
2 changed files with 44 additions and 4 deletions

View File

@@ -50,6 +50,7 @@ my $rows;
# Tool shouldn't run without --execute (bug 933232).
# #############################################################################
$sb->load_file('master', "$sample/basic_no_fks_innodb.sql");
($output, $exit) = full_output(
@@ -684,6 +685,7 @@ test_alter_table(
],
);
# #############################################################################
# --statistics
# #############################################################################
@@ -701,16 +703,25 @@ ok(
"--statistics --dry-run"
) or diag($test_diff);
# 5.5, 5.6 and 5.7 have different outputs
my $res_file = "$sample/stats-execute.txt";
if ($sandbox_version eq '5.5' && $db_flavor !~ m/XtraDB Cluster/) {
$res_file = "$sample/stats-execute-5.5.txt";
} elsif ($sandbox_version eq '5.6' && $db_flavor !~ m/XtraDB Cluster/) {
$res_file = "$sample/stats-execute.txt";
} elsif ($sandbox_version eq '5.7' && $db_flavor !~ m/XtraDB Cluster/) {
$res_file = "$sample/stats-execute-5.7.txt";
}
ok(
no_diff(
sub { pt_online_schema_change::main(@args, "$dsn,D=bug_1045317,t=bits",
'--execute', '--statistics',
'--alter', "modify column val ENUM('M','E','H') NOT NULL",
'--recursion-method', 'none')
'--recursion-method', 'none'),
},
($sandbox_version ge '5.5' && $db_flavor !~ m/XtraDB Cluster/
? "$sample/stats-execute-5.5.txt"
: "$sample/stats-execute.txt"),
$res_file,
),
"--statistics --execute"
) or diag($test_diff);

View File

@@ -0,0 +1,29 @@
No slaves found. See --recursion-method if host h=127.1,P=12345 has slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
Operation, tries, wait:
analyze_table, 10, 1
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_foreign_keys, 10, 1
Altering `bug_1045317`.`bits`...
TS Dropping triggers...
TS Dropped triggers OK.
# Event Count
# ====== =====
# INSERT 1
Successfully altered `bug_1045317`.`bits`.
Creating new table...
Created new table bug_1045317._bits_new OK.
Altering new table...
Altered `bug_1045317`.`_bits_new` OK.
TS Creating triggers...
TS Created triggers OK.
TS Copying approximately 3 rows...
TS Copied rows OK.
TS Analyzing new table...
TS Swapping tables...
TS Swapped original and new tables OK.
TS Dropping old table...
TS Dropped old table `bug_1045317`.`_bits_old` OK.