summaryrefslogtreecommitdiff
path: root/mysql-test/extra
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/extra')
-rw-r--r--mysql-test/extra/binlog_tests/binlog_row_annotate.inc43
-rw-r--r--mysql-test/extra/binlog_tests/binlog_truncate.test5
-rw-r--r--mysql-test/extra/binlog_tests/binlog_write_error.inc2
-rw-r--r--mysql-test/extra/binlog_tests/ctype_ucs_binlog.result212
-rw-r--r--mysql-test/extra/binlog_tests/ctype_ucs_binlog.test41
-rw-r--r--mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc8
-rw-r--r--mysql-test/extra/rpl_tests/delayed_slave_wait_on_query.inc55
-rw-r--r--mysql-test/extra/rpl_tests/multisource.inc4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_blackhole.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_charset.test18
-rw-r--r--mysql-test/extra/rpl_tests/rpl_conflicts.test10
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ddl.test88
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extra_col_master.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extra_col_slave.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_incident.inc11
-rw-r--r--mysql-test/extra/rpl_tests/rpl_innodb.test10
-rw-r--r--mysql-test/extra/rpl_tests/rpl_loaddata.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_loaddata_local.inc14
-rw-r--r--mysql-test/extra/rpl_tests/rpl_parallel.inc266
-rw-r--r--mysql-test/extra/rpl_tests/rpl_parallel_show_binlog_events_purge_logs.inc3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test15
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_sp007.test9
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_tabledefs.test14
-rw-r--r--mysql-test/extra/rpl_tests/rpl_semi_sync.inc29
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ssl.inc2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_start_stop_slave.test10
-rw-r--r--mysql-test/extra/rpl_tests/rpl_stop_slave.test8
-rw-r--r--mysql-test/extra/rpl_tests/rpl_test_framework.inc3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_truncate_helper.test4
30 files changed, 354 insertions, 540 deletions
diff --git a/mysql-test/extra/binlog_tests/binlog_row_annotate.inc b/mysql-test/extra/binlog_tests/binlog_row_annotate.inc
index 97d641fca80..e53f49149f1 100644
--- a/mysql-test/extra/binlog_tests/binlog_row_annotate.inc
+++ b/mysql-test/extra/binlog_tests/binlog_row_annotate.inc
@@ -4,7 +4,7 @@
# Please check all dependent tests after modifying it
#
# Usage:
-# --let $use_remote_mysqlbinlog= 1 # optional
+# --let use_remote_mysqlbinlog= 1 # optional
# --source extra/binlog_tests/binlog_row_annotate.inc
#
# By default, the script uses mysqlbinlog both with direct access to files
@@ -33,11 +33,13 @@
# --skip-annotate-row-events options both in remote and local cases.
###############################################################################
+set @old_binlog_checksum=@@binlog_checksum;
+set global binlog_checksum=NONE;
+--let datadir= `select @@datadir`
+
--source include/have_log_bin.inc
---source include/have_binlog_format_row.inc
--source include/binlog_start_pos.inc
-
---disable_query_log
+--source include/have_binlog_format_row.inc
set sql_mode="";
@@ -47,14 +49,6 @@ SET timestamp=1000000000;
# Delete all existing binary logs
RESET MASTER;
---disable_warnings
-DROP DATABASE IF EXISTS test1;
-DROP DATABASE IF EXISTS test2;
-DROP DATABASE IF EXISTS test3;
-DROP DATABASE IF EXISTS xtest1;
-DROP DATABASE IF EXISTS xtest2;
---enable_warnings
-
CREATE DATABASE test1;
CREATE TABLE test1.t1(a int);
@@ -105,7 +99,6 @@ DELETE xtest1.xt1, xtest2.xt2
WHERE xtest1.xt1.a=xtest2.xt2.a AND xtest2.xt2.a=test3.t3.a;
FLUSH LOGS;
---enable_query_log
--echo #####################################################################################
--echo # The following Annotate_rows events should appear below:
@@ -116,11 +109,7 @@ FLUSH LOGS;
--echo # - DELETE xtest1.xt1, test2.t2 FROM <...>
--echo #####################################################################################
-let $start_pos= `select @binlog_start_pos`;
---replace_column 2 # 5 #
---replace_result $start_pos <start_pos>
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
---eval show binlog events in 'master-bin.000001' from $start_pos
+--source include/show_binlog_events.inc
if (!$use_remote_mysqlbinlog)
{
@@ -135,9 +124,8 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map)
--echo #####################################################################################
- let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
- --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
+ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $datadir/master-bin.000001
--echo #
--echo #####################################################################################
@@ -146,9 +134,8 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE test1.t1, test2.t2 FROM <...>
--echo #####################################################################################
- let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
- --exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v $MYSQLD_DATADIR/master-bin.000001
+ --exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v $datadir/master-bin.000001
--echo #
--echo #####################################################################################
@@ -156,11 +143,10 @@ if (!$use_remote_mysqlbinlog)
--echo # No Annotates should appear in this output
--echo #####################################################################################
- let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
- --exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v $MYSQLD_DATADIR/master-bin.000001
+ --exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v $datadir/master-bin.000001
- --let $use_remote_mysqlbinlog= 0
+ --let use_remote_mysqlbinlog= 0
}
--echo #
@@ -174,7 +160,6 @@ if (!$use_remote_mysqlbinlog)
--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map)
--echo #####################################################################################
-let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
@@ -185,7 +170,6 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # - DELETE test1.t1, test2.t2 FROM <...>
--echo #####################################################################################
-let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
@@ -195,17 +179,14 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # No Annotates should appear in this output
--echo #####################################################################################
-let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
# Clean-up
---disable_query_log
+set global binlog_checksum=@old_binlog_checksum;
DROP DATABASE test1;
DROP DATABASE test2;
DROP DATABASE test3;
DROP DATABASE xtest1;
DROP DATABASE xtest2;
---enable_query_log
-
diff --git a/mysql-test/extra/binlog_tests/binlog_truncate.test b/mysql-test/extra/binlog_tests/binlog_truncate.test
index d434f792db0..4d297cd2d5c 100644
--- a/mysql-test/extra/binlog_tests/binlog_truncate.test
+++ b/mysql-test/extra/binlog_tests/binlog_truncate.test
@@ -39,29 +39,24 @@ if ($before_truncate) {
eval $before_truncate;
}
---echo # Connection: default
BEGIN;
INSERT INTO t2 SELECT * FROM t1;
connect (truncate,localhost,root,,);
---echo # Connection: truncate
send TRUNCATE TABLE t1;
connection default;
---echo # Connection: default
INSERT INTO t2 SELECT * FROM t1;
SELECT COUNT(*) FROM t2;
COMMIT;
connection truncate;
---echo # Connection: truncate
--echo # Reaping TRUNCATE TABLE
--reap
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t2;
connection default;
---echo # Connection: default
source include/show_binlog_events.inc;
disconnect truncate;
diff --git a/mysql-test/extra/binlog_tests/binlog_write_error.inc b/mysql-test/extra/binlog_tests/binlog_write_error.inc
index da66dbf5a95..fa3ba087a7e 100644
--- a/mysql-test/extra/binlog_tests/binlog_write_error.inc
+++ b/mysql-test/extra/binlog_tests/binlog_write_error.inc
@@ -71,7 +71,7 @@ source include/binlog_inject_error.inc;
let $query= DROP VIEW v1;
source include/binlog_inject_error.inc;
-let $query= CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
+let $query= CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
source include/binlog_inject_error.inc;
let $query= DROP PROCEDURE p1;
diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.result b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.result
new file mode 100644
index 00000000000..c358cfcd4f2
--- /dev/null
+++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.result
@@ -0,0 +1,212 @@
+SET TIMESTAMP=10000;
+create table t2 (c char(30)) charset=ucs2;
+set @v=convert('abc' using ucs2);
+reset master;
+insert into t2 values (@v);
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # User var # # @`v`=_ucs2 X'006100620063' COLLATE ucs2_general_ci
+master-bin.000001 # Query # # use `test`; insert into t2 values (@v)
+master-bin.000001 # Query # # COMMIT
+flush logs;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+BEGIN
+/*!*/;
+SET @`v`:=_ucs2 X'006100620063' COLLATE `ucs2_general_ci`/*!*/;
+use `test`/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.pseudo_thread_id=999999999/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+insert into t2 values (@v)
+/*!*/;
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
+drop table t2;
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions
+#
+FLUSH LOGS;
+SET NAMES utf8;
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
+EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES (''ä(i1)'')';
+EXECUTE IMMEDIATE CONVERT('INSERT INTO t1 VALUES (''ä(i2)'')' USING ucs2);
+SET @stmt=CONVERT('INSERT INTO t1 VALUES (''ä(i3)'')' USING ucs2);
+EXECUTE IMMEDIATE @stmt;
+PREPARE stmt FROM 'INSERT INTO t1 VALUES (''ä(p1)'')';
+EXECUTE stmt;
+PREPARE stmt FROM CONVERT('INSERT INTO t1 VALUES (''ä(p2)'')' USING ucs2);
+EXECUTE stmt;
+SET @stmt=CONVERT('INSERT INTO t1 VALUES (''ä(p3)'')' USING ucs2);
+PREPARE stmt FROM @stmt;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+SELECT * FROM t1;
+a
+ä(i1)
+ä(i2)
+ä(i3)
+ä(p1)
+ä(p2)
+ä(p3)
+DROP TABLE t1;
+FLUSH LOGS;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 700101 6:46:40
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Gtid list [#-#-#]
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# ddl
+/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
+/*!100001 SET @@session.gtid_domain_id=#*//*!*/;
+/*!100001 SET @@session.server_id=#*//*!*/;
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+use `test`/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C utf8 *//*!*/;
+SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8)
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-#
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+INSERT INTO t1 VALUES ('ä(i1)')
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-#
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+INSERT INTO t1 VALUES ('ä(i2)')
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-#
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+INSERT INTO t1 VALUES ('ä(i3)')
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-#
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+INSERT INTO t1 VALUES ('ä(p1)')
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-#
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+INSERT INTO t1 VALUES ('ä(p2)')
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-#
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+INSERT INTO t1 VALUES ('ä(p3)')
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# ddl
+/*!100001 SET @@session.gtid_seq_no=#*//*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=10000/*!*/;
+DROP TABLE `t1` /* generated by server */
+/*!*/;
+# at #
+#700101 6:46:40 server id # end_log_pos # CRC32 XXX Rotate to master-bin.000004 pos: 4
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
index 733ad05b0be..bc94c9df5e8 100644
--- a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
+++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
@@ -20,3 +20,44 @@ let $MYSQLD_DATADIR= `select @@datadir`;
drop table t2;
# End of 4.1 tests
+
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions
+--echo #
+
+SET TIMESTAMP=UNIX_TIMESTAMP('1970-01-01 06:46:40');
+
+FLUSH LOGS;
+SET NAMES utf8;
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
+EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES (''ä(i1)'')';
+EXECUTE IMMEDIATE CONVERT('INSERT INTO t1 VALUES (''ä(i2)'')' USING ucs2);
+SET @stmt=CONVERT('INSERT INTO t1 VALUES (''ä(i3)'')' USING ucs2);
+EXECUTE IMMEDIATE @stmt;
+
+PREPARE stmt FROM 'INSERT INTO t1 VALUES (''ä(p1)'')';
+EXECUTE stmt;
+PREPARE stmt FROM CONVERT('INSERT INTO t1 VALUES (''ä(p2)'')' USING ucs2);
+EXECUTE stmt;
+SET @stmt=CONVERT('INSERT INTO t1 VALUES (''ä(p3)'')' USING ucs2);
+PREPARE stmt FROM @stmt;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+
+SELECT * FROM t1;
+DROP TABLE t1;
+FLUSH LOGS;
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/
+--exec $MYSQL_BINLOG --base64-output=decode-rows -vv $MYSQLD_DATADIR/master-bin.000003
+
+SET TIMESTAMP=DEFAULT;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc b/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
index 1cc850091fe..8cc56caaec6 100644
--- a/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
+++ b/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
@@ -1651,7 +1651,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -1731,7 +1731,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -1854,7 +1854,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@@ -1912,7 +1912,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
diff --git a/mysql-test/extra/rpl_tests/delayed_slave_wait_on_query.inc b/mysql-test/extra/rpl_tests/delayed_slave_wait_on_query.inc
new file mode 100644
index 00000000000..ffdcb7f60bb
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/delayed_slave_wait_on_query.inc
@@ -0,0 +1,55 @@
+# ==== Purpose ====
+#
+# Auxiliary file used by rpl_delayed_slave.test. This assumes that an
+# 'INSERT INTO t1...' query has been executed on the master. It does
+# this:
+#
+# - After half the delay, check the status. It should be delaying and
+# the query should not have executed.
+#
+# - After one and a half delay, check the status. It should not be
+# delaying and the query should be executed.
+#
+#
+# ==== Usage ====
+#
+# --let $query_number= 4
+# --source extra/rpl_tests/delayed_slave_wait_on_query.inc
+#
+# Parameters:
+# $query_number
+# The value of the 'b' column in t1 for the row inserted by the query
+# we are waiting for.
+
+connection master;
+
+--echo [on slave]
+--let $slave_timeout= $time1
+--source include/sync_slave_io_with_master.inc
+--echo # sleep 1*T
+--sleep $time1
+
+--let $assert_text= Query $query_number should not be executed
+--let $assert_cond= MAX(b) < $query_number FROM t1
+--source include/rpl_assert.inc
+
+--let $assert_text= Status should be 'Waiting until MASTER_DELAY...'
+--let $assert_cond= "[SHOW SLAVE STATUS, Slave_SQL_Running_State, 1]" LIKE "Waiting until MASTER_DELAY%"
+--source include/rpl_assert.inc
+
+--echo # sleep 1*T
+--sleep $time1
+
+--echo # sync with master (with timeout 1*T)
+--source include/sync_with_master.inc
+
+--let $assert_text= Query $query_number should be executed
+--let $assert_cond= MAX(b) = $query_number FROM t1
+--source include/rpl_assert.inc
+
+--let $assert_text= Status should be 'Has read all relay log...'
+--let $assert_cond= "[SHOW SLAVE STATUS, Slave_SQL_Running_State, 1]" LIKE "Slave has read all relay log%"
+--source include/rpl_assert.inc
+
+
+--source include/check_slave_is_running.inc
diff --git a/mysql-test/extra/rpl_tests/multisource.inc b/mysql-test/extra/rpl_tests/multisource.inc
index 2842aff4ef1..adaae775f48 100644
--- a/mysql-test/extra/rpl_tests/multisource.inc
+++ b/mysql-test/extra/rpl_tests/multisource.inc
@@ -234,8 +234,8 @@ flush logs;
--connection master1
purge binary logs to 'master-bin.000002';
-# Additional events: 39 (Gtid_list) + 2 x 40 (Binlog_checkpoint) = 119
-let filesize=`select $binlog_start_pos+119`;
+# Additional events: 43 (Gtid_list) + 2 x 44 (Binlog_checkpoint) = 131
+let filesize=`select $binlog_start_pos+131`;
--replace_result $filesize filesize
show binary logs;
insert into t1 (f1) values ('four');
diff --git a/mysql-test/extra/rpl_tests/rpl_blackhole.test b/mysql-test/extra/rpl_tests/rpl_blackhole.test
index 1a0eeb3cf15..a37d24b4cd6 100644
--- a/mysql-test/extra/rpl_tests/rpl_blackhole.test
+++ b/mysql-test/extra/rpl_tests/rpl_blackhole.test
@@ -14,11 +14,9 @@
connection slave;
let $before = query_get_value("SHOW MASTER STATUS", Position, 1);
---echo [on master]
connection master;
eval $statement;
---echo [on slave]
sync_slave_with_master;
--echo # Expect 0
SELECT COUNT(*) FROM t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_charset.test b/mysql-test/extra/rpl_tests/rpl_charset.test
index 5009dff8d73..37ca2e28eec 100644
--- a/mysql-test/extra/rpl_tests/rpl_charset.test
+++ b/mysql-test/extra/rpl_tests/rpl_charset.test
@@ -7,15 +7,9 @@ set timestamp=1000000000;
create database mysqltest2 character set latin2;
set @@character_set_server=latin5;
create database mysqltest3;
---disable_query_log
-select "--- --master--" as "";
---enable_query_log
show create database mysqltest2;
show create database mysqltest3;
sync_slave_with_master;
---disable_query_log
-select "--- --slave--" as "";
---enable_query_log
show create database mysqltest2;
show create database mysqltest3;
@@ -23,14 +17,8 @@ connection master;
set @@collation_server=armscii8_bin;
drop database mysqltest3;
create database mysqltest3;
---disable_query_log
-select "--- --master--" as "";
---enable_query_log
show create database mysqltest3;
sync_slave_with_master;
---disable_query_log
-select "--- --slave--" as "";
---enable_query_log
show create database mysqltest3;
connection master;
@@ -45,10 +33,8 @@ insert into t1 (b) values(@@character_set_client);
# collation_client does not exist
insert into t1 (b) values(@@character_set_connection);
insert into t1 (b) values(@@collation_connection);
---echo --- --master--
select * from t1 order by a;
sync_slave_with_master;
---echo --- --slave--
select * from mysqltest2.t1 order by a;
connection master;
@@ -59,10 +45,8 @@ insert into t1 (b) values(LEAST("Müller","Muffler"));
set collation_connection=latin1_german2_ci;
insert into t1 (b) values(@@collation_connection);
insert into t1 (b) values(LEAST("Müller","Muffler"));
---echo --- --master--
select * from t1 order by a;
sync_slave_with_master;
---echo --- --slave--
select * from mysqltest2.t1 order by a;
# Presently charset info is not logged with LOAD DATA but it will
@@ -81,10 +65,8 @@ connection master;
set @a= _cp850 'Müller' collate cp850_general_ci;
truncate table t1;
insert into t1 (b) values(collation(@a));
---echo --- --master--
select * from t1 order by a;
sync_slave_with_master;
---echo --- --slave--
select * from mysqltest2.t1 order by a;
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_conflicts.test b/mysql-test/extra/rpl_tests/rpl_conflicts.test
index b9bff3993e6..a8c796af50c 100644
--- a/mysql-test/extra/rpl_tests/rpl_conflicts.test
+++ b/mysql-test/extra/rpl_tests/rpl_conflicts.test
@@ -57,10 +57,8 @@
--echo ==== Initialize ====
---echo [on master]
connection master;
CREATE TABLE t1(a INT PRIMARY KEY);
---echo [on slave]
sync_slave_with_master;
@@ -71,14 +69,12 @@ sync_slave_with_master;
INSERT INTO t1 VALUES (1);
--echo ---- Insert rows on master ----
---echo [on master]
connection master;
# Insert the same row on master
INSERT INTO t1 VALUES (1);
save_master_pos;
SELECT * FROM t1;
---echo [on slave]
connection slave;
# If we are statement-logging or if slave_exec_mode=STRICT, we now
@@ -117,23 +113,19 @@ SELECT * FROM t1;
--echo ==== Test: SQL thread sees 'DELETE' of non-existing row ====
--echo ---- On master, insert two rows, the second with binlogging off ----
---echo [on master]
connection master;
DELETE FROM t1;
INSERT INTO t1 VALUES (1);
---echo [on slave]
sync_slave_with_master;
DELETE FROM t1 WHERE a = 1;
--echo ---- On master, remove the row that does not exist on slave ----
---echo [on master]
connection master;
DELETE FROM t1 WHERE a = 1;
SELECT * FROM t1;
save_master_pos;
---echo [on slave]
connection slave;
# If we are row-logging and slave_exec_mode is STRICT, we now expect
@@ -172,9 +164,7 @@ SELECT * FROM t1;
--echo ==== Clean up ====
---echo [on master]
connection master;
DROP TABLE t1;
---echo [on slave]
--sync_slave_with_master
diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test
index 21778a11df5..f11cd979ba8 100644
--- a/mysql-test/extra/rpl_tests/rpl_ddl.test
+++ b/mysql-test/extra/rpl_tests/rpl_ddl.test
@@ -133,8 +133,6 @@ set local sql_mode='';
# The sync_slave_with_master is needed to make the xids deterministic.
sync_slave_with_master;
---echo
---echo -------- switch to master -------
connection master;
SET AUTOCOMMIT = 1;
#
@@ -186,13 +184,9 @@ eval CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=$temp_engine_type;
SET AUTOCOMMIT = 0;
use mysqltest1;
sync_slave_with_master;
---echo
---echo -------- switch to slave --------
connection slave;
SET AUTOCOMMIT = 1;
use mysqltest1;
---echo
---echo -------- switch to master -------
connection master;
@@ -260,12 +254,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't2';
---echo
---echo -------- switch to slave --------
connection slave;
SHOW TABLES LIKE 't2';
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= DROP TEMPORARY TABLE mysqltest1.t23;
@@ -273,12 +263,8 @@ let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't23';
---echo
---echo -------- switch to slave --------
connection slave;
SHOW TABLES LIKE 't23';
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
@@ -286,12 +272,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't20';
---echo
---echo -------- switch to slave --------
connection slave;
SHOW TABLES LIKE 't20';
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
@@ -299,12 +281,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
describe mysqltest1.t4;
---echo
---echo -------- switch to slave --------
connection slave;
describe mysqltest1.t4;
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= $engine_type;
@@ -326,12 +304,8 @@ let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SELECT * FROM mysqltest1.t7;
sync_slave_with_master;
---echo
---echo -------- switch to slave --------
connection slave;
SELECT * FROM mysqltest1.t7;
---echo
---echo -------- switch to master -------
connection master;
###############################################################
@@ -383,12 +357,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW INDEX FROM mysqltest1.t6;
---echo
---echo -------- switch to slave --------
connection slave;
SHOW INDEX FROM mysqltest1.t6;
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
@@ -396,12 +366,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW INDEX FROM mysqltest1.t5;
---echo
---echo -------- switch to slave --------
connection slave;
SHOW INDEX FROM mysqltest1.t5;
---echo
---echo -------- switch to master -------
connection master;
###############################################################
@@ -413,12 +379,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW DATABASES LIKE "mysqltest2";
---echo
---echo -------- switch to slave --------
connection slave;
SHOW DATABASES LIKE "mysqltest2";
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= CREATE DATABASE mysqltest3;
@@ -426,12 +388,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW DATABASES LIKE "mysqltest3";
---echo
---echo -------- switch to slave --------
connection slave;
SHOW DATABASES LIKE "mysqltest3";
---echo
---echo -------- switch to master -------
connection master;
# End of 4.1 tests
@@ -446,13 +404,9 @@ let $my_slave_commit= true;
--vertical_results
--replace_column 5 # 6 #
SHOW PROCEDURE STATUS LIKE 'p1';
---echo
---echo -------- switch to slave --------
connection slave;
--replace_column 5 # 6 #
SHOW PROCEDURE STATUS LIKE 'p1';
---echo
---echo -------- switch to master -------
connection master;
--horizontal_results
@@ -463,13 +417,9 @@ let $my_slave_commit= true;
--vertical_results
--replace_column 5 # 6 #
SHOW PROCEDURE STATUS LIKE 'p1';
---echo
---echo -------- switch to slave --------
connection slave;
--replace_column 5 # 6 #
SHOW PROCEDURE STATUS LIKE 'p1';
---echo
---echo -------- switch to master -------
connection master;
--horizontal_results
@@ -479,12 +429,8 @@ let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
--vertical_results
SHOW PROCEDURE STATUS LIKE 'p1';
---echo
---echo -------- switch to slave --------
connection slave;
SHOW PROCEDURE STATUS LIKE 'p1';
---echo
---echo -------- switch to master -------
connection master;
--horizontal_results
@@ -496,12 +442,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW CREATE VIEW v1;
---echo
---echo -------- switch to slave --------
connection slave;
SHOW CREATE VIEW v1;
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= ALTER VIEW v1 AS select f1 from t1;
@@ -509,12 +451,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW CREATE VIEW v1;
---echo
---echo -------- switch to slave --------
connection slave;
SHOW CREATE VIEW v1;
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= DROP VIEW IF EXISTS v1;
@@ -523,13 +461,9 @@ let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
--error 1146
SHOW CREATE VIEW v1;
---echo
---echo -------- switch to slave --------
connection slave;
--error 1146
SHOW CREATE VIEW v1;
---echo
---echo -------- switch to master -------
connection master;
###############################################################
@@ -539,13 +473,11 @@ let $my_stmt= CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
+--replace_column 6 #
SHOW TRIGGERS;
---echo
---echo -------- switch to slave --------
connection slave;
+--replace_column 6 #
SHOW TRIGGERS;
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= DROP TRIGGER trg1;
@@ -553,12 +485,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TRIGGERS;
---echo
---echo -------- switch to slave --------
connection slave;
SHOW TRIGGERS;
---echo
---echo -------- switch to master -------
connection master;
###############################################################
@@ -569,12 +497,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SELECT user FROM mysql.user WHERE user = 'user1';
---echo
---echo -------- switch to slave --------
connection slave;
SELECT user FROM mysql.user WHERE user = 'user1';
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= RENAME USER user1@localhost TO rename1@localhost;
@@ -582,12 +506,8 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SELECT user FROM mysql.user WHERE user = 'rename1';
---echo
---echo -------- switch to slave --------
connection slave;
SELECT user FROM mysql.user WHERE user = 'rename1';
---echo
---echo -------- switch to master -------
connection master;
let $my_stmt= DROP USER rename1@localhost;
@@ -595,8 +515,6 @@ let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SELECT user FROM mysql.user WHERE user = 'rename1';
---echo
---echo -------- switch to slave --------
connection slave;
SELECT user FROM mysql.user WHERE user = 'rename1';
@@ -604,8 +522,6 @@ SELECT user FROM mysql.user WHERE user = 'rename1';
# Cleanup
###############################################################
use test;
---echo
---echo -------- switch to master -------
connection master;
DROP TEMPORARY TABLE mysqltest1.t22;
DROP DATABASE mysqltest1;
diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test
index aa360c9c803..0559e93676b 100644
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test
@@ -126,7 +126,7 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
--disable_query_log
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
-call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that column.key exists.* error.* 1091");
+call mtr.add_suppression("Slave.*Can.t DROP COLUMN .c7.; check that .* exists.* error.* 1091");
call mtr.add_suppression("Slave.*Unknown column .c7. in .t15.* error.* 1054");
call mtr.add_suppression("Slave.*Key column .c6. doesn.t exist in table.* error.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* error.* 1677");
diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
index 47d75c0d0b2..a58fa85a72d 100644
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
@@ -23,7 +23,6 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot
### Should Stop Slave ###
##############################################
---echo *** On Slave ***
sync_slave_with_master;
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
index 1ef8544884d..eb0e5e21d62 100644
--- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
+++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
@@ -61,9 +61,8 @@ connection slave;
# '2003' CR_CONN_HOST_ERROR
# '2002' CR_CONNECTION_ERROR
# '2006' CR_SERVER_GONE_ERROR
-# '1040' ER_CON_COUNT_ERROR
# '1053' ER_SERVER_SHUTDOWN
-let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
+let $slave_io_errno= 1053, 2002, 2003, 2006, 2013;
--let $slave_io_error_is_nonfatal= 1
source include/wait_for_slave_io_error.inc;
diff --git a/mysql-test/extra/rpl_tests/rpl_incident.inc b/mysql-test/extra/rpl_tests/rpl_incident.inc
index 189240e3b75..350a2086681 100644
--- a/mysql-test/extra/rpl_tests/rpl_incident.inc
+++ b/mysql-test/extra/rpl_tests/rpl_incident.inc
@@ -4,8 +4,15 @@
# Please check all dependent tests after modifying it
#
---source include/master-slave.inc
--source include/have_debug.inc
+--source include/master-slave.inc
+
+SET @old_binlog_checksum=@@binlog_checksum;
+SET GLOBAL BINLOG_CHECKSUM=none;
+connection slave;
+SET @old_binlog_checksum=@@binlog_checksum;
+SET GLOBAL BINLOG_CHECKSUM=none;
+connection master;
--echo **** On Master ****
CREATE TABLE t1 (a INT);
@@ -49,6 +56,8 @@ SELECT * FROM t1;
source include/check_slave_is_running.inc;
connection master;
+SET GLOBAL BINLOG_CHECKSUM=@old_binlog_checksum;
DROP TABLE t1;
--sync_slave_with_master
+SET GLOBAL BINLOG_CHECKSUM=@old_binlog_checksum;
--source include/rpl_end.inc
diff --git a/mysql-test/extra/rpl_tests/rpl_innodb.test b/mysql-test/extra/rpl_tests/rpl_innodb.test
index 6b3732439b2..2fb1a1c5c79 100644
--- a/mysql-test/extra/rpl_tests/rpl_innodb.test
+++ b/mysql-test/extra/rpl_tests/rpl_innodb.test
@@ -64,7 +64,6 @@ eval CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=$engine_type;
SET AUTOCOMMIT = 0;
sync_slave_with_master;
---echo -------- switch to slave --------
connection slave;
# We want to verify that the following transactions are written to the
@@ -79,7 +78,6 @@ connection slave;
ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
SHOW CREATE TABLE mysqltest1.t1;
---echo -------- switch to master --------
connection master;
INSERT INTO mysqltest1.t1 SET f1= 1;
DROP TEMPORARY TABLE mysqltest1.tmp;
@@ -98,7 +96,6 @@ SHOW CREATE TABLE mysqltest1.tmp2;
SELECT COUNT(*) FROM mysqltest1.t1;
sync_slave_with_master;
---echo -------- switch to slave --------
connection slave;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE mysqltest1.tmp;
@@ -108,7 +105,6 @@ SHOW CREATE TABLE mysqltest1.tmp2;
SELECT COUNT(*) FROM mysqltest1.t1;
FLUSH LOGS;
---echo -------- switch to master --------
connection master;
FLUSH LOGS;
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
@@ -142,11 +138,9 @@ INSERT INTO t1 (b) VALUES (1),(2),(3);
BEGIN;
INSERT INTO t1(b) VALUES (4);
---echo -------- switch to master1 --------
connection master1;
--send RENAME TABLE t1 TO t3, t2 TO t1;
---echo -------- switch to master --------
connection master;
# Need to wait until RENAME is received
let $wait_condition=
@@ -157,23 +151,19 @@ let $wait_condition=
COMMIT;
---echo -------- switch to master1 --------
connection master1;
--reap
---echo -------- switch to master --------
connection master;
SELECT * FROM t1;
SELECT * FROM t3;
sync_slave_with_master;
---echo -------- switch to slave --------
connection slave;
SELECT * FROM t1;
SELECT * FROM t3;
---echo -------- switch to master --------
connection master;
DROP TABLE t1;
DROP TABLE t3;
diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test
index 67eb137bdf4..e1942dad239 100644
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test
@@ -197,7 +197,6 @@ DROP TABLE t1;
-- eval LOAD DATA $lock_option LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1
-- echo ### create connection without default database
--- echo ### connect (conn2,localhost,root,,*NO-ONE*);
connect (conn2,localhost,root,,*NO-ONE*);
-- connection conn2
-- echo ### assertion: works without stating the default database
@@ -216,7 +215,6 @@ connect (conn2,localhost,root,,*NO-ONE*);
-- let $table= $db1.t1
--source include/wait_until_rows_count.inc
--- echo ### disconnect and switch back to master connection
-- disconnect conn2
-- connection master
diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata_local.inc b/mysql-test/extra/rpl_tests/rpl_loaddata_local.inc
index 9604ca83d5e..20962d74e98 100644
--- a/mysql-test/extra/rpl_tests/rpl_loaddata_local.inc
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata_local.inc
@@ -73,7 +73,6 @@ sync_with_master;
#
--echo ==== Bug22504 Initialize ====
---echo [on master]
--connection master
SET sql_mode='ignore_space';
@@ -87,17 +86,14 @@ eval load data local infile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' i
--remove_file $MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile
SELECT * FROM t1 ORDER BY a;
---echo [on slave]
sync_slave_with_master;
SELECT * FROM t1 ORDER BY a;
--echo ==== Clean up ====
---echo [on master]
connection master;
DROP TABLE t1;
---echo [on slave]
sync_slave_with_master;
--echo
@@ -105,7 +101,6 @@ sync_slave_with_master;
--echo "return wrong query string when parse 'load data infile' sql statement"
--echo
---echo [master]
connection master;
let $MYSQLD_DATADIR= `select @@datadir`;
SELECT @@SESSION.sql_mode INTO @old_mode;
@@ -154,7 +149,6 @@ SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIE
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
eval LOAD DATA LOCAL INFILE '$MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1;
---echo [slave]
sync_slave_with_master;
--echo
@@ -162,7 +156,6 @@ sync_slave_with_master;
--echo "LOAD DATA LOCAL INFILE not executed on slave with SBR"
--echo
---echo [master]
connection master;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
@@ -174,12 +167,10 @@ eval LOAD DATA LOCAL INFILE '$MYSQLD_DATADIR/bug59267.sql' INTO TABLE t1;
SELECT 'Master', COUNT(*) FROM t1;
---echo [slave]
--sync_slave_with_master
SELECT 'Slave', COUNT(*) FROM t1;
# cleanup
---echo [master]
connection master;
--remove_file $MYSQLD_DATADIR/bug43746.sql
@@ -188,7 +179,6 @@ connection master;
DROP TABLE t1;
SET SESSION sql_mode=@old_mode;
---echo [slave]
sync_slave_with_master;
connection master;
@@ -198,7 +188,6 @@ connection master;
--echo "statement improperly replicated crashes slave sql thread"
--echo
---echo [master]
connection master;
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -224,20 +213,17 @@ SELECT * FROM t1;
sleep 1;
---echo [slave]
sync_slave_with_master;
SELECT * FROM t1;
--remove_file $MYSQLD_DATADIR/bug60580.csv
---echo [master]
connection master;
DROP VIEW v1;
DROP TABLE t1, t2, t3;
---echo [slave]
sync_slave_with_master;
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_parallel.inc b/mysql-test/extra/rpl_tests/rpl_parallel.inc
index 8248f03e185..42354343084 100644
--- a/mysql-test/extra/rpl_tests/rpl_parallel.inc
+++ b/mysql-test/extra/rpl_tests/rpl_parallel.inc
@@ -1978,218 +1978,14 @@ SET GLOBAL slave_parallel_mode=minimal;
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='conservative';
---source include/start_slave.inc
-
-
---echo *** MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging ***
---echo *** MDEV-7882: Excessive transaction retry in parallel replication ***
-
---connection server_1
-CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
-CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
---save_master_pos
-
---connection server_2
---sync_with_master
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=40;
-SELECT @old_retries:=@@GLOBAL.slave_transaction_retries;
-SET GLOBAL slave_transaction_retries= 5;
-
-
-# Using dbug error injection, we artificially create event groups with a lot of
-# conflicting transactions in each event group. The bugs were originally seen
-# "in the wild" with transactions that did not conflict on the master, and only
-# conflicted very rarely on the slave (maybe some edge case with InnoDB btree
-# page splits or something like that). The event groups here loosely reflect
-# the structure of the original failure's group commits.
-
-
---connection server_1
-INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
-SET @old_dbug= @@SESSION.debug_dbug;
-SET @commit_id= 42;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-INSERT INTO t8 VALUES (1,1);
-INSERT INTO t8 VALUES (2,2);
-INSERT INTO t8 VALUES (3,3);
-INSERT INTO t8 VALUES (4,4);
-INSERT INTO t8 VALUES (5,5);
-INSERT INTO t8 VALUES (6,6);
-INSERT INTO t8 VALUES (7,7);
-INSERT INTO t8 VALUES (8,8);
-
-UPDATE t7 SET b=9 WHERE a=3;
-UPDATE t7 SET b=10 WHERE a=3;
-UPDATE t7 SET b=11 WHERE a=3;
-
-INSERT INTO t8 VALUES (12,12);
-INSERT INTO t8 VALUES (13,13);
-
-UPDATE t7 SET b=14 WHERE a=3;
-UPDATE t7 SET b=15 WHERE a=3;
-
-INSERT INTO t8 VALUES (16,16);
-
-UPDATE t7 SET b=17 WHERE a=3;
-
-INSERT INTO t8 VALUES (18,18);
-INSERT INTO t8 VALUES (19,19);
-
-UPDATE t7 SET b=20 WHERE a=3;
-
-INSERT INTO t8 VALUES (21,21);
-
-UPDATE t7 SET b=22 WHERE a=3;
-
-INSERT INTO t8 VALUES (23,24);
-INSERT INTO t8 VALUES (24,24);
-
-UPDATE t7 SET b=25 WHERE a=3;
-
-INSERT INTO t8 VALUES (26,26);
-
-UPDATE t7 SET b=27 WHERE a=3;
-
-BEGIN;
-INSERT INTO t8 VALUES (28,28);
-INSERT INTO t8 VALUES (29,28), (30,28);
-INSERT INTO t8 VALUES (31,28);
-INSERT INTO t8 VALUES (32,28);
-INSERT INTO t8 VALUES (33,28);
-INSERT INTO t8 VALUES (34,28);
-INSERT INTO t8 VALUES (35,28);
-INSERT INTO t8 VALUES (36,28);
-INSERT INTO t8 VALUES (37,28);
-INSERT INTO t8 VALUES (38,28);
-INSERT INTO t8 VALUES (39,28);
-INSERT INTO t8 VALUES (40,28);
-INSERT INTO t8 VALUES (41,28);
-INSERT INTO t8 VALUES (42,28);
-COMMIT;
-
-
-SET @commit_id=43;
-INSERT INTO t8 VALUES (43,43);
-INSERT INTO t8 VALUES (44,44);
-
-UPDATE t7 SET b=45 WHERE a=3;
-
-INSERT INTO t8 VALUES (46,46);
-INSERT INTO t8 VALUES (47,47);
-
-UPDATE t7 SET b=48 WHERE a=3;
-
-INSERT INTO t8 VALUES (49,49);
-INSERT INTO t8 VALUES (50,50);
-
-
-SET @commit_id=44;
-INSERT INTO t8 VALUES (51,51);
-INSERT INTO t8 VALUES (52,52);
-
-UPDATE t7 SET b=53 WHERE a=3;
-
-INSERT INTO t8 VALUES (54,54);
-INSERT INTO t8 VALUES (55,55);
-
-UPDATE t7 SET b=56 WHERE a=3;
-
-INSERT INTO t8 VALUES (57,57);
-
-UPDATE t7 SET b=58 WHERE a=3;
-
-INSERT INTO t8 VALUES (58,58);
-INSERT INTO t8 VALUES (59,59);
-INSERT INTO t8 VALUES (60,60);
-INSERT INTO t8 VALUES (61,61);
-
-UPDATE t7 SET b=62 WHERE a=3;
-
-INSERT INTO t8 VALUES (63,63);
-INSERT INTO t8 VALUES (64,64);
-INSERT INTO t8 VALUES (65,65);
-INSERT INTO t8 VALUES (66,66);
-
-UPDATE t7 SET b=67 WHERE a=3;
-
-INSERT INTO t8 VALUES (68,68);
-
-UPDATE t7 SET b=69 WHERE a=3;
-UPDATE t7 SET b=70 WHERE a=3;
-UPDATE t7 SET b=71 WHERE a=3;
-
-INSERT INTO t8 VALUES (72,72);
-
-UPDATE t7 SET b=73 WHERE a=3;
-UPDATE t7 SET b=74 WHERE a=3;
-UPDATE t7 SET b=75 WHERE a=3;
-UPDATE t7 SET b=76 WHERE a=3;
-
-INSERT INTO t8 VALUES (77,77);
-
-UPDATE t7 SET b=78 WHERE a=3;
-
-INSERT INTO t8 VALUES (79,79);
-
-UPDATE t7 SET b=80 WHERE a=3;
-
-INSERT INTO t8 VALUES (81,81);
-
-UPDATE t7 SET b=82 WHERE a=3;
-
-INSERT INTO t8 VALUES (83,83);
-
-UPDATE t7 SET b=84 WHERE a=3;
-
-
-SET @commit_id=45;
-INSERT INTO t8 VALUES (85,85);
-UPDATE t7 SET b=86 WHERE a=3;
-INSERT INTO t8 VALUES (87,87);
-
-
-SET @commit_id=46;
-INSERT INTO t8 VALUES (88,88);
-INSERT INTO t8 VALUES (89,89);
-INSERT INTO t8 VALUES (90,90);
-
-SET SESSION debug_dbug=@old_dbug;
-
-INSERT INTO t8 VALUES (91,91);
-INSERT INTO t8 VALUES (92,92);
-INSERT INTO t8 VALUES (93,93);
-INSERT INTO t8 VALUES (94,94);
-INSERT INTO t8 VALUES (95,95);
-INSERT INTO t8 VALUES (96,96);
-INSERT INTO t8 VALUES (97,97);
-INSERT INTO t8 VALUES (98,98);
-INSERT INTO t8 VALUES (99,99);
-
-
-SELECT * FROM t7 ORDER BY a;
-SELECT * FROM t8 ORDER BY a;
---source include/save_master_gtid.inc
+--echo *** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
--connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-SELECT * FROM t7 ORDER BY a;
-SELECT * FROM t8 ORDER BY a;
-
--source include/stop_slave.inc
-SET GLOBAL slave_transaction_retries= @old_retries;
+SET GLOBAL slave_parallel_mode='conservative';
SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
---echo *** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
-
---connection server_2
---source include/stop_slave.inc
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
@@ -2386,62 +2182,6 @@ SET GLOBAL debug_dbug= @old_debg;
SET GLOBAL max_relay_log_size= @old_max;
--source include/start_slave.inc
-
---echo *** MDEV-8302: Duplicate key with parallel replication ***
-
---connection server_2
---source include/stop_slave.inc
-/* Inject a small sleep which makes the race easier to hit. */
-SET @old_dbug=@@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,inject_mdev8302";
-
-
---connection server_1
-INSERT INTO t7 VALUES (100,1), (101,2), (102,3), (103,4), (104,5);
-
-# Artificially create a bunch of group commits with conflicting transactions.
-# The bug happened when T1 and T2 was in one group commit, and T3 was in the
-# following group commit. T2 is a DELETE of a row with same primary key as a
-# row that T3 inserts. T1 and T2 can conflict, causing T2 to be deadlock
-# killed after starting to commit. The bug was that T2 could roll back before
-# doing unmark_start_commit(); this could allow T3 to run before the retry
-# of T2, causing duplicate key violation.
-
-SET @old_dbug= @@SESSION.debug_dbug;
-SET @commit_id= 20000;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-
---let $n = 100
---disable_query_log
-while ($n)
-{
- eval UPDATE t7 SET b=b+1 WHERE a=100+($n MOD 5);
- eval DELETE FROM t7 WHERE a=100+($n MOD 5);
-
- SET @commit_id = @commit_id + 1;
- eval INSERT INTO t7 VALUES (100+($n MOD 5), $n);
- SET @commit_id = @commit_id + 1;
- dec $n;
-}
---enable_query_log
-SET SESSION debug_dbug=@old_dbug;
-
-
-SELECT * FROM t7 ORDER BY a;
---source include/save_master_gtid.inc
-
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-SELECT * FROM t7 ORDER BY a;
-
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
---source include/start_slave.inc
-
-
-
--echo *** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
--connection server_1
# Inject an event group terminated by ROLLBACK, by mixing MyISAM and InnoDB
@@ -2473,7 +2213,7 @@ SET DEBUG_SYNC= 'RESET';
--connection server_1
DROP function foo;
-DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+DROP TABLE t1,t2,t3,t4,t5,t6;
SET DEBUG_SYNC= 'RESET';
--source include/rpl_end.inc
diff --git a/mysql-test/extra/rpl_tests/rpl_parallel_show_binlog_events_purge_logs.inc b/mysql-test/extra/rpl_tests/rpl_parallel_show_binlog_events_purge_logs.inc
index 9cbcf01f46b..7801498adb4 100644
--- a/mysql-test/extra/rpl_tests/rpl_parallel_show_binlog_events_purge_logs.inc
+++ b/mysql-test/extra/rpl_tests/rpl_parallel_show_binlog_events_purge_logs.inc
@@ -18,18 +18,15 @@
--source include/have_debug_sync.inc
--source include/master-slave.inc
---echo [connection slave]
--connection slave
SET DEBUG_SYNC= 'after_show_binlog_events SIGNAL on_show_binlog_events WAIT_FOR end';
--send SHOW BINLOG EVENTS
--connection slave1
---echo [connection slave1]
SET DEBUG_SYNC= 'now WAIT_FOR on_show_binlog_events';
FLUSH LOGS;
SET DEBUG_SYNC= 'now SIGNAL end';
---echo [connection slave]
--connection slave
--disable_result_log
--reap
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index da8787d22f2..f45c8824b10 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -216,7 +216,7 @@ if (`select char_length('$bit_field_special') > 0`) {
connection master;
eval CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = $type ;
sync_slave_with_master;
---echo --- on slave: original values ---
+--echo --- original values ---
INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
SELECT * FROM t7 ORDER BY C1;
@@ -226,13 +226,13 @@ SELECT * FROM t7 ORDER BY C1;
set @@global.slave_exec_mode= 'IDEMPOTENT';
connection master;
---echo --- on master: new values inserted ---
+--echo --- new values inserted ---
INSERT INTO t7 VALUES (1,2), (2,4), (3,6);
SELECT * FROM t7 ORDER BY C1;
sync_slave_with_master;
set @@global.slave_exec_mode= default;
---echo --- on slave: old values should be overwritten by replicated values ---
+--echo --- old values should be overwritten by replicated values ---
SELECT * FROM t7 ORDER BY C1;
#
@@ -240,7 +240,6 @@ SELECT * FROM t7 ORDER BY C1;
# causing a conflict for a key that is not "last".
#
connection master;
---echo --- on master ---
eval CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $type ;
# First we make sure that the constraints are correctly set.
@@ -254,7 +253,6 @@ INSERT INTO t8 VALUES (11,22,99);
SELECT * FROM t8 ORDER BY a;
sync_slave_with_master;
---echo --- on slave ---
SELECT * FROM t8 ORDER BY a;
INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9);
SELECT * FROM t8 ORDER BY a;
@@ -265,14 +263,12 @@ SELECT * FROM t8 ORDER BY a;
set @@global.slave_exec_mode= 'IDEMPOTENT';
connection master;
---echo --- on master ---
# We insert a row that will cause conflict on the primary key but not
# on the other keys.
INSERT INTO t8 VALUES (2,4,8);
sync_slave_with_master;
set @@global.slave_exec_mode= default;
---echo --- on slave ---
SELECT * FROM t8 ORDER BY a;
# BUG#31552: Replication breaks when deleting rows from out-of-sync
@@ -280,7 +276,6 @@ SELECT * FROM t8 ORDER BY a;
--echo **** Test for BUG#31552 ****
---echo **** On Master ****
# Clean up t1 so that we can use it.
connection master;
DELETE FROM t1;
@@ -289,10 +284,8 @@ sync_slave_with_master;
# Just to get a clean binary log
--source include/rpl_reset.inc
---echo **** On Master ****
connection master;
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
---echo **** On Master ****
sync_slave_with_master;
# since bug#31552/31609 idempotency is not default any longer. In order
# the following test DELETE FROM t1 to pass the mode is switched
@@ -313,14 +306,12 @@ query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
# (regression test)
--echo **** Test for BUG#37076 ****
---echo **** On Master ****
connection master;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
INSERT INTO t1 VALUES(
'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
---echo **** On Slave ****
sync_slave_with_master slave;
SELECT * FROM t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp007.test b/mysql-test/extra/rpl_tests/rpl_row_sp007.test
index 492cd2d88f1..4a68dddfdc2 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_sp007.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_sp007.test
@@ -22,25 +22,16 @@ BEGIN
END|
delimiter ;|
-let $message=< ---- Master selects-- >;
---source include/show_msg.inc
CALL test.p1(12);
SELECT * FROM test.t1;
-
-let $message=< ---- Slave selects-- >;
---source include/show_msg.inc
sync_slave_with_master;
SELECT * FROM test.t1;
-let $message=< ---- Master selects-- >;
---source include/show_msg.inc
connection master;
CALL test.p1(13);
SELECT * FROM test.t1;
-let $message=< ---- Slave selects-- >;
---source include/show_msg.inc
sync_slave_with_master;
SELECT * FROM test.t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
index 8de2e6974b1..194079b160a 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
@@ -73,12 +73,11 @@ ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0,
# the following INSERTs to pass the mode is switched temprorarily
set @@global.slave_exec_mode= 'IDEMPOTENT';
-# so the inserts are going to be overriden
+# so the inserts are going to be overridden
INSERT INTO t1_int VALUES (2, 4, 4711);
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
---echo **** On Master ****
connection master;
INSERT INTO t1_int VALUES (1,2);
INSERT INTO t1_int VALUES (2,5);
@@ -89,7 +88,6 @@ INSERT INTO t1_char VALUES (2,5);
SELECT * FROM t1_int ORDER BY a;
SELECT * FROM t1_bit ORDER BY a;
SELECT * FROM t1_char ORDER BY a;
---echo **** On Slave ****
sync_slave_with_master;
set @@global.slave_exec_mode= default;
@@ -97,7 +95,6 @@ SELECT a,b,x FROM t1_int ORDER BY a;
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
SELECT a,b,x FROM t1_char ORDER BY a;
---echo **** On Master ****
connection master;
UPDATE t1_int SET b=2*b WHERE a=2;
UPDATE t1_char SET b=2*b WHERE a=2;
@@ -105,7 +102,6 @@ UPDATE t1_bit SET b=2*b WHERE a=2;
SELECT * FROM t1_int ORDER BY a;
SELECT * FROM t1_bit ORDER BY a;
SELECT * FROM t1_char ORDER BY a;
---echo **** On Slave ****
sync_slave_with_master;
SELECT a,b,x FROM t1_int ORDER BY a;
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
@@ -132,11 +128,9 @@ INSERT INTO t9 VALUES (2);
sync_slave_with_master;
# Now slave is guaranteed to be running
connection master;
---echo **** On Master ****
INSERT INTO t2 VALUES (2,4);
SELECT * FROM t2;
sync_slave_with_master;
---echo **** On Slave ****
SELECT * FROM t2;
--source include/check_slave_is_running.inc
@@ -200,7 +194,6 @@ SELECT * FROM t8 ORDER BY a;
# update should not generate an error even though there is no default
# for the extra column.
---echo **** On Master ****
connection master;
TRUNCATE t1_nodef;
SET SQL_LOG_BIN=0;
@@ -209,26 +202,21 @@ INSERT INTO t1_nodef VALUES (2,4);
SET SQL_LOG_BIN=1;
sync_slave_with_master;
---echo **** On Slave ****
connection slave;
INSERT INTO t1_nodef VALUES (1,2,3,4,5);
INSERT INTO t1_nodef VALUES (2,4,6,8,10);
---echo **** On Master ****
connection master;
UPDATE t1_nodef SET b=2*b WHERE a=1;
SELECT * FROM t1_nodef ORDER BY a;
---echo **** On Slave ****
sync_slave_with_master;
SELECT * FROM t1_nodef ORDER BY a;
---echo **** On Master ****
connection master;
DELETE FROM t1_nodef WHERE a=2;
SELECT * FROM t1_nodef ORDER BY a;
---echo **** On Slave ****
sync_slave_with_master;
SELECT * FROM t1_nodef ORDER BY a;
diff --git a/mysql-test/extra/rpl_tests/rpl_semi_sync.inc b/mysql-test/extra/rpl_tests/rpl_semi_sync.inc
index 456a750e89f..12053c54f4e 100644
--- a/mysql-test/extra/rpl_tests/rpl_semi_sync.inc
+++ b/mysql-test/extra/rpl_tests/rpl_semi_sync.inc
@@ -51,7 +51,6 @@ set global rpl_semi_sync_slave_enabled= 0;
--echo #
connection master;
-echo [ on master ];
set global rpl_semi_sync_master_timeout= 60000; # 60s
@@ -102,7 +101,6 @@ show status like 'Rpl_semi_sync_master_yes_tx';
reset master;
connection slave;
-echo [ on slave ];
echo [ default state of semi-sync on slave should be OFF ];
show variables like 'rpl_semi_sync_slave_enabled';
@@ -113,7 +111,6 @@ show variables like 'rpl_semi_sync_slave_enabled';
source include/start_slave.inc;
connection master;
-echo [ on master ];
# NOTE: Rpl_semi_sync_master_client will only be updated when
# semi-sync slave has started binlog dump request
@@ -159,7 +156,6 @@ show status like 'Rpl_semi_sync_master_no_tx';
show status like 'Rpl_semi_sync_master_yes_tx';
sync_slave_with_master;
-echo [ on slave ];
echo [ slave status after replicated inserts ];
show status like 'Rpl_semi_sync_slave_status';
@@ -174,7 +170,6 @@ select max(a) from t1;
--echo # include 'CREATE TEMPORARY TABLE `MyISAM_t` SELECT * FROM `Innodb_t` ;
connection master;
-echo [ on master ];
SET SESSION AUTOCOMMIT= 0;
CREATE TABLE t2(c1 INT) ENGINE=innodb;
sync_slave_with_master;
@@ -206,7 +201,6 @@ connection slave;
source include/stop_slave.inc;
connection master;
-echo [ on master ];
set global rpl_semi_sync_master_timeout= 5000;
# The first semi-sync check should be on because after slave stop,
@@ -263,7 +257,6 @@ show status like 'Rpl_semi_sync_master_yes_tx';
save_master_pos;
connection slave;
-echo [ on slave ];
echo [ slave status should be OFF ];
show status like 'Rpl_semi_sync_slave_status';
@@ -278,7 +271,6 @@ select min(a) from t1;
select max(a) from t1;
connection master;
-echo [ on master ];
# The master semi-sync status should be on again after slave catches up.
echo [ master status should be ON again after slave catches up ];
@@ -294,7 +286,6 @@ show status like 'Rpl_semi_sync_master_clients';
drop table t1;
sync_slave_with_master;
-echo [ on slave ];
source include/stop_slave.inc;
@@ -313,7 +304,6 @@ SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx';
SHOW STATUS LIKE 'Rpl_semi_sync_master_yes_tx';
connection master;
-echo [ on master ];
source include/show_master_logs.inc;
show variables like 'rpl_semi_sync_master_enabled';
@@ -333,12 +323,10 @@ show status like 'Rpl_semi_sync_master_status';
--echo #
connection slave;
-echo [ on slave ];
source include/start_slave.inc;
connection master;
-echo [ on master ];
replace_result $engine_type ENGINE_TYPE;
eval create table t1 (a int) engine = $engine_type;
@@ -352,7 +340,6 @@ show status like 'Rpl_relay%';
echo [ test reset master ];
connection master;
-echo [ on master];
reset master;
@@ -361,7 +348,6 @@ show status like 'Rpl_semi_sync_master_no_tx';
show status like 'Rpl_semi_sync_master_yes_tx';
connection slave;
-echo [ on slave ];
source include/stop_slave.inc;
reset slave;
@@ -385,7 +371,6 @@ connection slave;
source include/start_slave.inc;
connection master;
-echo [ on master ];
# Wait for dump thread to start, Rpl_semi_sync_master_clients will be
# 1 after dump thread started.
@@ -399,12 +384,10 @@ insert into t1 values (1);
insert into t1 values (2), (3);
sync_slave_with_master;
-echo [ on slave ];
select * from t1;
connection master;
-echo [ on master ];
echo [ master semi-sync status should be ON ];
show status like 'Rpl_semi_sync_master_status';
@@ -418,7 +401,6 @@ connection slave;
source include/stop_slave.inc;
reset slave;
connection master;
-echo [ on master ];
reset master;
# Kill the dump thread on master for previous slave connection and wait for it to exit
@@ -441,14 +423,12 @@ grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges;
set sql_log_bin=1;
connection slave;
-echo [ on slave ];
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges;
change master to master_user='rpl',master_password='rpl_password';
source include/start_slave.inc;
show status like 'Rpl_semi_sync_slave_status';
connection master;
-echo [ on master ];
# Wait for the semi-sync binlog dump thread to start
let $status_var= Rpl_semi_sync_master_clients;
@@ -473,12 +453,10 @@ show status like 'Rpl_semi_sync_master_yes_tx';
# Disable semi-sync on master
connection slave;
-echo [ on slave ];
source include/stop_slave.inc;
SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
connection master;
-echo [ on master ];
# Kill the dump thread on master for previous slave connection and wait for it to exit
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
@@ -499,11 +477,9 @@ show status like 'Rpl_semi_sync_master_status';
set global rpl_semi_sync_master_enabled= 0;
connection slave;
-echo [ on slave ];
SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled';
source include/start_slave.inc;
connection master;
-echo [ on master ];
insert into t1 values (8);
let $status_var= Rpl_semi_sync_master_clients;
let $status_var_value= 1;
@@ -512,23 +488,19 @@ echo [ master semi-sync clients should be 1, status should be OFF ];
show status like 'Rpl_semi_sync_master_clients';
show status like 'Rpl_semi_sync_master_status';
sync_slave_with_master;
-echo [ on slave ];
show status like 'Rpl_semi_sync_slave_status';
# Uninstall semi-sync plugin on master
connection slave;
source include/stop_slave.inc;
connection master;
-echo [ on master ];
set global rpl_semi_sync_master_enabled= 0;
connection slave;
-echo [ on slave ];
SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled';
source include/start_slave.inc;
connection master;
-echo [ on master ];
insert into t1 values (10);
sync_slave_with_master;
@@ -541,7 +513,6 @@ set global rpl_semi_sync_master_timeout= 5000; # 5s
set global rpl_semi_sync_master_enabled= 1;
connection slave;
-echo [ on slave ];
source include/stop_slave.inc;
SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
diff --git a/mysql-test/extra/rpl_tests/rpl_ssl.inc b/mysql-test/extra/rpl_tests/rpl_ssl.inc
index ad75b54ba6c..aff5499c8e5 100644
--- a/mysql-test/extra/rpl_tests/rpl_ssl.inc
+++ b/mysql-test/extra/rpl_tests/rpl_ssl.inc
@@ -89,11 +89,9 @@ if ($slave_count != $master_count)
echo slave: $slave_count;
connection master;
- echo === master ===;
select count(*) t1;
select * from t1;
connection slave;
- echo === slave ===;
select count(*) t1;
select * from t1;
query_vertical show slave status;
diff --git a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
index 40bc7746ccf..32f33b2a31d 100644
--- a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
@@ -140,11 +140,11 @@ CREATE TABLE t1 (a INT );
sync_slave_with_master;
--connection slave1
---echo # Slave1: lock table for synchronization
+--echo # lock table for synchronization
LOCK TABLES t1 WRITE;
--connection master
---echo # Master: insert into the table
+--echo # insert into the table
INSERT INTO t1 SELECT SLEEP(4);
--connection slave
@@ -155,11 +155,11 @@ let $wait_condition=
AND INFO = "INSERT INTO t1 SELECT SLEEP(4)";
--source include/wait_condition.inc
---echo # Slave: send slave stop
+--echo # send slave stop
--send STOP SLAVE
--connection slave1
---echo # Slave1: wait for stop slave
+--echo # wait for stop slave
let $wait_condition=
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO = "STOP SLAVE";
@@ -169,7 +169,7 @@ let $wait_condition=
UNLOCK TABLES;
--connection slave
---echo # Slave: wait for the slave to stop
+--echo # wait for the slave to stop
--reap
--source include/wait_for_slave_to_stop.inc
diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test
index 0f09faa0301..2ab59f56d7a 100644
--- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test
@@ -15,8 +15,6 @@ if (!$tmp_table_stm)
--die $tmp_table_stm is NULL
}
---echo
---echo [ On Master ]
connection master;
BEGIN;
DELETE FROM t1;
@@ -25,8 +23,6 @@ INSERT INTO t1 VALUES (1);
DROP TEMPORARY TABLE tt1;
COMMIT;
---echo
---echo [ On Slave ]
connection slave;
# To check if slave SQL thread is applying INSERT statement
@@ -37,16 +33,12 @@ source include/wait_show_condition.inc;
send STOP SLAVE SQL_THREAD;
---echo
---echo [ On Slave1 ]
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
---echo [ On Slave ]
connection slave;
reap;
source include/wait_for_slave_sql_to_stop.inc;
diff --git a/mysql-test/extra/rpl_tests/rpl_test_framework.inc b/mysql-test/extra/rpl_tests/rpl_test_framework.inc
index fb42d2efb9a..9613d31bf1c 100644
--- a/mysql-test/extra/rpl_tests/rpl_test_framework.inc
+++ b/mysql-test/extra/rpl_tests/rpl_test_framework.inc
@@ -62,8 +62,7 @@ while ($masters)
--let $masters= `SELECT SUBSTRING('$masters', LENGTH('$master_i') + 2)`
# Connect to master and execute statement
- --let $rpl_connection_name= server_$master_i
- --source include/rpl_connection.inc
+ connection server_$master_i;
DELETE FROM t1;
--eval INSERT INTO t1 VALUES ($next_number)
}
diff --git a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
index d1d0e06e32f..ddfba6c52c5 100644
--- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
+++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
@@ -1,11 +1,9 @@
--source include/rpl_reset.inc
---echo **** On Master ****
connection master;
eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
INSERT INTO t1 VALUES (1,1), (2,2);
sync_slave_with_master;
---echo **** On Master ****
connection master;
eval $trunc_stmt t1;
sync_slave_with_master;
@@ -14,13 +12,11 @@ let $diff_tables= master:t1, slave:t1;
source include/diff_tables.inc;
--echo ==== Test using a table with delete triggers ====
---echo **** On Master ****
connection master;
SET @count := 1;
eval CREATE TABLE t2 (a INT, b LONG) ENGINE=$engine;
CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
sync_slave_with_master;
---echo **** On Master ****
connection master;
eval $trunc_stmt t1;
sync_slave_with_master;