1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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

@@ -7,21 +7,21 @@ ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no VARCHAR(20);
START SLAVE;
INSERT INTO t1 VALUES (1);
CALL mtr.add_suppression("Slave: Failed to open mysql.rpl_slave_state");
include/wait_for_slave_sql_error.inc [errno=1943]
include/wait_for_slave_sql_error.inc [errno=1941]
include/stop_slave.inc
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;
include/wait_for_slave_sql_error.inc [errno=1943]
include/wait_for_slave_sql_error.inc [errno=1941]
include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1943]
include/wait_for_slave_sql_error.inc [errno=1941]
include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id);
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1943]
include/wait_for_slave_sql_error.inc [errno=1941]
include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (domain_id, sub_id);
@@ -85,5 +85,23 @@ START SLAVE;
SET sql_log_bin=0;
CALL mtr.add_suppression("The slave I/O thread stops because master does not support MariaDB global transaction id");
SET sql_log_bin=1;
*** Test error during record_gtid() (non-xid cases) ***
include/stop_slave.inc
CREATE TABLE t2 (a INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1);
SET @old_dbug= @@global.DEBUG_DBUG;
SET GLOBAL debug_dbug="+d,gtid_inject_record_gtid";
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1941]
SET GLOBAL debug_dbug= @old_dbug;
START SLAVE SQL_THREAD;
SELECT * FROM t2;
a
1
1
SET sql_log_bin=0;
CALL mtr.add_suppression("Slave: Could not update replication slave gtid state");
SET sql_log_bin=1;
DROP TABLE t1;
DROP TABLE t2;
include/rpl_end.inc