Skip to content

Commit

Permalink
MDEV-12179: Per-engine mysql.gtid_slave_pos table
Browse files Browse the repository at this point in the history
Intermediate commit.

Update multi_source.gtid_ignore_duplicates test to avoid a sporadic
failure following MDEV-12179 functionality.

The test case manually messes with the mysql.gtid_slave_pos table.
Make sure to clean up that at the end of the test, and suppress the
messages from the server about these changes.
  • Loading branch information
knielsen committed May 11, 2017
1 parent b19f055 commit 95e09f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mysql-test/suite/multi_source/gtid_ignore_duplicates.result
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ include/wait_for_slave_to_start.inc
set default_master_connection = '';
connection server_1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CALL mtr.add_suppression("This change will not take full effect until all SQL threads have been restarted");
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
BEGIN;
Expand Down Expand Up @@ -491,17 +492,21 @@ SET GLOBAL slave_parallel_threads= @old_parallel;
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
connection server_1;
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
include/reset_master_slave.inc
disconnect server_1;
connection server_2;
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
include/reset_master_slave.inc
disconnect server_2;
connection server_3;
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
include/reset_master_slave.inc
disconnect server_3;
connection server_4;
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
include/reset_master_slave.inc
disconnect server_4;
5 changes: 5 additions & 0 deletions mysql-test/suite/multi_source/gtid_ignore_duplicates.test
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ set default_master_connection = '';

--connection server_1
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CALL mtr.add_suppression("This change will not take full effect until all SQL threads have been restarted");
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
BEGIN;
Expand Down Expand Up @@ -431,20 +432,24 @@ SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;

--connection server_1
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
--source include/reset_master_slave.inc
--disconnect server_1

--connection server_2
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
--source include/reset_master_slave.inc
--disconnect server_2

--connection server_3
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
--source include/reset_master_slave.inc
--disconnect server_3

--connection server_4
DROP TABLE t1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
--source include/reset_master_slave.inc
--disconnect server_4

0 comments on commit 95e09f0

Please sign in to comment.