1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-26: Global transaction ID.

Fix error handling when record_gtid() fails to update the
mysql.rpl_slave_state table.
This commit is contained in:
unknown
2013-03-21 17:33:29 +01:00
parent e590f89114
commit b6b84d6825
5 changed files with 108 additions and 30 deletions

View File

@ -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