MDEV-11675. rpl_start_alter_ftwrl.test is refined

The test could fail sporadically because of not anticipated
race on slave between CREATE and ALTER queries.

Fixed to synchronize slave and master wrt CREATE.
This commit is contained in:
Andrei 2022-02-02 17:17:27 +02:00
parent 12f29a4bc0
commit e4d7886cc5
2 changed files with 10 additions and 0 deletions

View file

@ -10,6 +10,10 @@ include/start_slave.inc
connection master;
SET @@session.binlog_alter_two_phase=true;
CREATE TABLE t1 (a INT) ENGINE=innodb;
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
connection master;
SET @@session.alter_algorithm='INSTANT';
SET @@session.gtid_domain_id=11;
ALTER TABLE t1 ADD COLUMN b int;

View file

@ -26,7 +26,13 @@ SET @@global.debug_dbug="+d,at_write_start_alter";
SET @@session.binlog_alter_two_phase=true;
CREATE TABLE t1 (a INT) ENGINE=innodb;
--source include/save_master_gtid.inc
# Make sure the table exists on slave now.
--connection slave
--source include/sync_with_master_gtid.inc
--connection master
SET @@session.alter_algorithm='INSTANT';
SET @@session.gtid_domain_id=11;
ALTER TABLE t1 ADD COLUMN b int;