369
373
"Bug 1188264: warning about expected MySQL error 1265"
377
# #############################################################################
379
# Failed to detect child tables in other schema, and falsely identified
380
# child tables in own schema
381
# #############################################################################
383
$sb->load_file('master', "$sample/bug-1315130_cleanup.sql");
384
$sb->load_file('master', "$sample/bug-1315130.sql");
387
sub { pt_online_schema_change::main(@args, "$master_dsn,D=bug_1315130_a,t=parent_table",
389
'--alter', "add column c varchar(16)",
390
'--alter-foreign-keys-method', 'auto'),
396
qr/Child tables:\s*`bug_1315130_a`\.`child_table_in_same_schema` \(approx\. 1 rows\)\s*`bug_1315130_b`\.`child_table_in_second_schema` \(approx\. 1 rows\)[^`]*?Will/s,
397
"Correctly identify child tables from other schemas and ignores tables from same schema referencig same named parent in other schema.",
399
# clear databases with their foreign keys
400
$sb->load_file('master', "$sample/bug-1315130_cleanup.sql");
403
# #############################################################################
405
# fails when no index is returned in EXPLAIN, even though --nocheck-plan is set
406
# (happens on HASH indexes)
407
# #############################################################################
409
$sb->load_file('master', "$sample/bug-1340728_cleanup.sql");
410
$sb->load_file('master', "$sample/bug-1340728.sql");
412
# insert a few thousand rows (else test isn't valid)
414
for (my $i = 0; $i < $rows; $i++) {
415
$master_dbh->do("INSERT INTO bug_1340728.test VALUES (NULL, 'xx')");
420
sub { pt_online_schema_change::main(@args, "$master_dsn,D=bug_1340728,t=test",
422
'--alter', "ADD COLUMN c INT",
430
qr/Successfully altered/s,
431
"--nocheck-plan ignores plans without index",
434
$sb->load_file('master', "$sample/bug-1340728_cleanup.sql");
372
436
# #############################################################################
374
438
# #############################################################################