diff options
author | Andrei <andrei.elkin@mariadb.com> | 2022-02-02 17:17:27 +0200 |
---|---|---|
committer | Andrei <andrei.elkin@mariadb.com> | 2022-02-02 17:17:27 +0200 |
commit | e4d7886cc573be1cab0533409ee379bb949aa087 (patch) | |
tree | a04bde5c9594e933490d4713967e70760f2400d4 /mysql-test | |
parent | 12f29a4bc03b9c01ec04be15d8f4e9ecf3fd7805 (diff) | |
download | mariadb-git-e4d7886cc573be1cab0533409ee379bb949aa087.tar.gz |
MDEV-11675. rpl_start_alter_ftwrl.test is refinedbb-10.8-andrei
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.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_start_alter_ftwrl.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_start_alter_ftwrl.test | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_start_alter_ftwrl.result b/mysql-test/suite/rpl/r/rpl_start_alter_ftwrl.result index 5b08a4c68bb..ad619923201 100644 --- a/mysql-test/suite/rpl/r/rpl_start_alter_ftwrl.result +++ b/mysql-test/suite/rpl/r/rpl_start_alter_ftwrl.result @@ -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; diff --git a/mysql-test/suite/rpl/t/rpl_start_alter_ftwrl.test b/mysql-test/suite/rpl/t/rpl_start_alter_ftwrl.test index cd8f718952e..a8528cc6197 100644 --- a/mysql-test/suite/rpl/t/rpl_start_alter_ftwrl.test +++ b/mysql-test/suite/rpl/t/rpl_start_alter_ftwrl.test @@ -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; |