diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-03-21 17:33:29 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-03-21 17:33:29 +0100 |
commit | b6b84d68250ea13a1a90079120e303658465bfb7 (patch) | |
tree | 279e9d97c7df805c92ad319a826d08ae7b61387a /mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test | |
parent | e590f89114bd205e30488cb8b1433f645babc170 (diff) | |
download | mariadb-git-b6b84d68250ea13a1a90079120e303658465bfb7.tar.gz |
MDEV-26: Global transaction ID.
Fix error handling when record_gtid() fails to update the
mysql.rpl_slave_state table.
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test')
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test index ada6fa22490..0efdcd18d35 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test @@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1); --connection slave CALL mtr.add_suppression("Slave: Failed to open mysql.rpl_slave_state"); ---let $slave_sql_errno=1943 +--let $slave_sql_errno=1941 --source include/wait_for_slave_sql_error.inc --source include/stop_slave.inc @@ -24,19 +24,19 @@ ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL; ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id, domain_id); START SLAVE; ---let $slave_sql_errno=1943 +--let $slave_sql_errno=1941 --source include/wait_for_slave_sql_error.inc --source include/stop_slave.inc ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; START SLAVE; ---let $slave_sql_errno=1943 +--let $slave_sql_errno=1941 --source include/wait_for_slave_sql_error.inc --source include/stop_slave.inc ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id); START SLAVE; ---let $slave_sql_errno=1943 +--let $slave_sql_errno=1941 --source include/wait_for_slave_sql_error.inc --source include/stop_slave.inc @@ -134,7 +134,37 @@ CALL mtr.add_suppression("The slave I/O thread stops because master does not sup SET sql_log_bin=1; +--echo *** Test error during record_gtid() (non-xid cases) *** + +--connection slave +--source include/stop_slave.inc + +--connection master +CREATE TABLE t2 (a INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1); +--save_master_pos + +--connection slave +SET @old_dbug= @@global.DEBUG_DBUG; +SET GLOBAL debug_dbug="+d,gtid_inject_record_gtid"; + +START SLAVE; +--let $slave_sql_errno= 1941 +--source include/wait_for_slave_sql_error.inc + +SET GLOBAL debug_dbug= @old_dbug; + +START SLAVE SQL_THREAD; +--sync_with_master + +SELECT * FROM t2; +SET sql_log_bin=0; +CALL mtr.add_suppression("Slave: Could not update replication slave gtid state"); +SET sql_log_bin=1; + + --connection master DROP TABLE t1; +DROP TABLE t2; --source include/rpl_end.inc |