diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result | 26 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test | 38 |
2 files changed, 56 insertions, 8 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result index db6e2672a18..3ff6fe10e4a 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result @@ -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 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 |