diff options
Diffstat (limited to 'mysql-test/extra')
7 files changed, 69 insertions, 6 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index 9bfda48df0b..861bd59253b 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -26,7 +26,7 @@ connection master; drop table t1; set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10; -show variables like "%auto_inc%"; +show variables like "auto_inc%"; eval create table t1 (a int not null auto_increment, primary key (a)) engine=$engine_type2; # Insert with 2 insert statements to get better testing of logging @@ -232,6 +232,61 @@ SET SQL_MODE=''; sync_slave_with_master; # +# Bug#54201: "SET INSERT_ID" event must be ignored if corresponding event is +# ignored. +# +connection master; + +CREATE TABLE t1(s VARCHAR(10)) ENGINE=myisam; +# -slave.opt has --replicate-ignore-table=test.t_ignored1 +CREATE TABLE t_ignored1(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam; +sync_slave_with_master; + +connection slave; + +CREATE TABLE test.slave_only(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam; +INSERT INTO slave_only VALUES(NULL); +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO slave_only VALUES(NULL); + +connection master; + +INSERT INTO t_ignored1 VALUES(NULL); +INSERT INTO t1 VALUES('s'); +UPDATE t1 SET s='s1'; + +# With Bug#54201, slave stops with duplicate key error here due to trigger +# using the insert_id from insert on master into t1_ignored1 +sync_slave_with_master; +connection slave; +SELECT * FROM t1; + +connection master; +CREATE TABLE t_ignored2(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam; +sync_slave_with_master; + +connection slave; +STOP SLAVE; +# Ignore the next INSERT into t_ignored2 and the INSERT_ID event just before it. +SET GLOBAL sql_slave_skip_counter = 2; +START SLAVE; + +connection master; +INSERT INTO t_ignored2 VALUES(NULL); +UPDATE t1 SET s='s2'; +sync_slave_with_master; + +connection slave; +SELECT * FROM t1; +SHOW TABLES LIKE 't\_ignored_'; +SELECT * FROM t_ignored2; +DROP TABLE slave_only; + +connection master; +DROP TABLE t1; +DROP TABLE t_ignored1; +DROP TABLE t_ignored2; + +# # BUG#56662 # The test verifies if the assertion of "next_insert_id == 0" # will fail in ha_external_lock() function. diff --git a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test index 5e4fca4a4b8..06253c5defb 100644 --- a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test +++ b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test @@ -8,9 +8,9 @@ source include/master-slave.inc; let $SERVER_VERSION=`select version()`; -create table t1 (a int); +create table t1 (a int) ENGINE=MyISAM; insert into t1 values (10); -create table t2 (a int); +create table t2 (a int) ENGINE=MyISAM; create table t3 (a int) engine=merge union(t1); create table t4 (a int); # We force the slave to open t3 (because we want to try confusing him) with this : diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test index e2762eab8df..4d611c15acf 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test @@ -17,7 +17,7 @@ select @@global.binlog_format; # happened only in statement-based binlogging. # -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)) ENGINE=MyISAM; let $query = "INSERT DELAYED INTO t1 VALUES (null, 'Dr. No'), (null, 'From Russia With Love'), (null, 'Goldfinger'), (null, 'Thunderball'), (null, 'You Only Live Twice')"; --exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";" diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test index 4b883ab90d7..c6fc7ef1aae 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test @@ -72,9 +72,8 @@ SET FOREIGN_KEY_CHECKS=0; # Duplicate Key Errors codes --error 1022, ER_DUP_ENTRY INSERT INTO t1 VALUES (1),(1); -sync_slave_with_master; -connection master; drop table t1; +sync_slave_with_master; # End of 4.1 tests --source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index 70b4edceb27..e72258df06e 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -2,6 +2,13 @@ # Basic tests of row-level logging # +--disable_query_log +--disable_result_log +# Add suppression for expected warning(s) in error log +call mtr.add_suppression("Can't find record in 't.'"); +--enable_query_log +--enable_result_log + # # First we test tables with only an index. # diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test index ec6f297caec..2153db09eb2 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test @@ -42,6 +42,7 @@ send STOP SLAVE SQL_THREAD; connection slave1; --echo # To resume slave SQL thread SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; --echo diff --git a/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test b/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test index 9cf287281a0..cb1639a04ac 100644 --- a/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test +++ b/mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test @@ -157,3 +157,4 @@ INSERT INTO t1 VALUES (1); DROP TEMPORARY TABLE t1; +--sync_slave_with_master |