summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2019-10-21 17:17:09 +0300
committerMichael Widenius <monty@mariadb.org>2019-10-21 17:17:09 +0300
commit06d2e1d828140d887adb68b05c85d5107baf816c (patch)
treefa3cbcadb16c80c0163d44bfdd6ef418aa8004f8 /mysql-test/suite/rpl/r
parent7def2877e3d7bd5335a0a53c20c01948407ab775 (diff)
downloadmariadb-git-06d2e1d828140d887adb68b05c85d5107baf816c.tar.gz
read-only slave using statement replication should replicate tmp tables
Relates to MDEV-17863 DROP TEMPORARY TABLE creates a transaction in binary log on read only server Other things: - Fixed that insert into normal_table select from tmp_table is replicated as row events if tmp_table doesn't exists on slave.
Diffstat (limited to 'mysql-test/suite/rpl/r')
-rw-r--r--mysql-test/suite/rpl/r/rpl_read_only2.result53
1 files changed, 53 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_read_only2.result b/mysql-test/suite/rpl/r/rpl_read_only2.result
new file mode 100644
index 00000000000..c457f49e67d
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_read_only2.result
@@ -0,0 +1,53 @@
+include/master-slave.inc
+[connection master]
+#
+# Ensure that read-only slave logs temporary table statements under statement based
+# replication. This is related to MDEV-17863.
+#
+connection slave;
+set global read_only=1;
+connection master;
+create table t1(a int) engine=MyISAM;
+create temporary table tmp1 (a int) engine=MyISAM;
+insert into t1 values(1);
+insert into tmp1 values (2);
+insert into t1 select * from tmp1;
+insert into t1 values(3);
+select * from t1;
+a
+1
+2
+3
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+drop table t1;
+drop temporary table tmp1;
+connection slave;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; create table t1(a int) engine=MyISAM
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; create temporary table tmp1 (a int) engine=MyISAM
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `test`; insert into t1 values(1)
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `test`; insert into tmp1 values (2)
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `test`; insert into t1 select * from tmp1
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Query # # use `test`; insert into t1 values(3)
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; analyze table t1
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tmp1` /* generated by server */
+set global read_only=0;
+connection master;
+include/rpl_end.inc