Commit de78f2e5 authored by unknown's avatar unknown

BUG#6883: Added tests for create/drop temporary table, UNLOCK TABLES

If a create table can not do implicit commit, the stmt now fails
CREATE/DROP TEMPORARY TABLE is now flushed to binlog


mysql-test/include/rpl_stmt_seq.inc:
  Documentation, cleared up code
mysql-test/r/rpl_ddl.result:
  New results
mysql-test/t/rpl_ddl.test:
  Added tests for create/drop temporary table
  Added tests for different types of locks in UNLOCK TABLES
  Cleared up code/documentation
sql/sql_parse.cc:
  If A CREATE TABLE fails to do implicit commit, then the stmt now fails (DROP works in same way)
  CREATE/DROP TEMOPORARY TABLE is now flushed to binlog
parent 6e7dd94e
...@@ -21,7 +21,9 @@ eval SELECT CONCAT('######## ','$my_stmt',' ########') as ""; ...@@ -21,7 +21,9 @@ eval SELECT CONCAT('######## ','$my_stmt',' ########') as "";
--enable_query_log --enable_query_log
### Predict the number of the current log ###############################################################
# Predict the number of the current log
###############################################################
# Disable the logging of the log number computation. # Disable the logging of the log number computation.
--disable_query_log --disable_query_log
# $_log_num_n should contain the number of the current binlog in numeric style. # $_log_num_n should contain the number of the current binlog in numeric style.
...@@ -38,7 +40,9 @@ let $_log_num_s= `select @aux`; ...@@ -38,7 +40,9 @@ let $_log_num_s= `select @aux`;
# eval SELECT '$log_num' ; # eval SELECT '$log_num' ;
--enable_query_log --enable_query_log
# INSERT + command to be tested + ROLLBACK ###############################################################
# INSERT
###############################################################
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
...@@ -49,6 +53,7 @@ eval INSERT INTO t1 SET f1= $MAX + 1; ...@@ -49,6 +53,7 @@ eval INSERT INTO t1 SET f1= $MAX + 1;
# results before DDL(to be tested) # results before DDL(to be tested)
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master; sync_slave_with_master;
...@@ -59,8 +64,12 @@ SELECT '-------- switch to slave --------' as ""; ...@@ -59,8 +64,12 @@ SELECT '-------- switch to slave --------' as "";
# results before DDL(to be tested) # results before DDL(to be tested)
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
###############################################################
# command to be tested
###############################################################
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
...@@ -71,6 +80,7 @@ let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT; ...@@ -71,6 +80,7 @@ let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
# results after DDL(to be tested) # results after DDL(to be tested)
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master; sync_slave_with_master;
...@@ -81,8 +91,12 @@ SELECT '-------- switch to slave --------' as ""; ...@@ -81,8 +91,12 @@ SELECT '-------- switch to slave --------' as "";
# results after DDL(to be tested) # results after DDL(to be tested)
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
###############################################################
# ROLLBACK
###############################################################
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
...@@ -93,11 +107,15 @@ SELECT MAX(f1) FROM t1; ...@@ -93,11 +107,15 @@ SELECT MAX(f1) FROM t1;
# Try to detect if the DDL command caused that the INSERT is committed # Try to detect if the DDL command caused that the INSERT is committed
# $MAX holds the highest/last value just before the insert of MAX + 1 # $MAX holds the highest/last value just before the insert of MAX + 1
--disable_query_log --disable_query_log
eval SELECT CONCAT('TEST-INFO: MASTER: The INSERT is ', eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')) AS "" IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')),
FROM d1.t1; IF((MAX(f1) = $MAX + 1) XOR NOT $my_master_commit,
' (Succeeded)',
' (Failed)')) AS ""
FROM mysqltest1.t1;
--enable_query_log --enable_query_log
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
sync_slave_with_master; sync_slave_with_master;
...@@ -108,13 +126,20 @@ SELECT '-------- switch to slave --------' as ""; ...@@ -108,13 +126,20 @@ SELECT '-------- switch to slave --------' as "";
# results after final ROLLBACK # results after final ROLLBACK
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
--disable_query_log --disable_query_log
eval SELECT CONCAT('TEST-INFO: SLAVE: The INSERT is ', eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')) AS "" IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')),
FROM d1.t1; IF((MAX(f1) = $MAX + 1) XOR NOT $my_slave_commit,
' (Succeeded)',
' (Failed)')) AS ""
FROM mysqltest1.t1;
--enable_query_log --enable_query_log
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
--replace_column 2 # 5 #
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
###############################################################
# Manipulate binlog
###############################################################
#let $manipulate= 0; #let $manipulate= 0;
let $manipulate= 1; let $manipulate= 1;
while ($manipulate) while ($manipulate)
......
...@@ -5,40 +5,40 @@ reset slave; ...@@ -5,40 +5,40 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
SET AUTOCOMMIT = 1; SET AUTOCOMMIT = 1;
DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS d3; DROP DATABASE IF EXISTS mysqltest3;
CREATE DATABASE d1; CREATE DATABASE mysqltest1;
CREATE DATABASE d2; CREATE DATABASE mysqltest2;
CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO d1.t1 SET f1= 0; INSERT INTO mysqltest1.t1 SET f1= 0;
CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB";
CREATE INDEX my_idx6 ON d1.t6(f1); CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO d1.t7 SET f1= 0; INSERT INTO mysqltest1.t7 SET f1= 0;
CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB";
COMMIT; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
SET AUTOCOMMIT = 0; SET AUTOCOMMIT = 0;
use d1; use mysqltest1;
-------- switch to slave -------- -------- switch to slave --------
SET AUTOCOMMIT = 1; SET AUTOCOMMIT = 0;
use d1; use mysqltest1;
-------- switch to master ------- -------- switch to master -------
...@@ -51,34 +51,35 @@ MAX(f1) ...@@ -51,34 +51,35 @@ MAX(f1)
1 1
SHOW BINLOG EVENTS IN 'master-bin.000001'; SHOW BINLOG EVENTS IN 'master-bin.000001';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 DROP DATABASE IF EXISTS d1 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 138 Query 1 138 DROP DATABASE IF EXISTS d2 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
master-bin.000001 197 Query 1 197 DROP DATABASE IF EXISTS d3 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
master-bin.000001 256 Query 1 256 CREATE DATABASE d1 master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
master-bin.000001 307 Query 1 307 CREATE DATABASE d2 master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
master-bin.000001 358 Query 1 358 use `test`; CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 440 Query 1 440 use `test`; INSERT INTO d1.t1 SET f1= 0 master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
master-bin.000001 502 Query 1 502 use `test`; CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 584 Query 1 584 use `test`; CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 666 Query 1 666 use `test`; CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 748 Query 1 748 use `test`; CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 830 Query 1 830 use `test`; CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 912 Query 1 912 use `test`; CREATE INDEX my_idx6 ON d1.t6(f1) master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
master-bin.000001 980 Query 1 980 use `test`; CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1062 Query 1 1062 use `test`; INSERT INTO d1.t7 SET f1= 0 master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
master-bin.000001 1124 Query 1 1124 use `test`; CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1206 Query 1 1206 use `test`; CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1288 Query 1 1288 use `test`; CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1371 Query 1 1371 use `test`; CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1454 Query 1 1454 use `test`; CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1537 Query 1 1537 use `test`; CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1620 Query 1 1620 use `test`; CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1703 Query 1 1703 use `test`; CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1786 Query 1 1786 use `test`; CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1869 Query 1 1869 use `test`; CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1952 Query 1 1952 use `test`; CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 2035 Query 1 2035 use `test`; CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
...@@ -86,35 +87,36 @@ MAX(f1) ...@@ -86,35 +87,36 @@ MAX(f1)
0 0
SHOW BINLOG EVENTS IN 'slave-bin.000001'; SHOW BINLOG EVENTS IN 'slave-bin.000001';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 slave-bin.000001 # Start 2 # Server ver: VERSION, Binlog ver: 3
slave-bin.000001 79 Query 2 79 use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 161 Query 1 161 DROP DATABASE IF EXISTS d1 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
slave-bin.000001 220 Query 1 220 DROP DATABASE IF EXISTS d2 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
slave-bin.000001 279 Query 1 279 DROP DATABASE IF EXISTS d3 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
slave-bin.000001 338 Query 1 338 CREATE DATABASE d1 slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
slave-bin.000001 389 Query 1 389 CREATE DATABASE d2 slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
slave-bin.000001 440 Query 1 440 use `test`; CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 522 Query 1 522 use `test`; INSERT INTO d1.t1 SET f1= 0 slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
slave-bin.000001 584 Query 1 584 use `test`; CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 666 Query 1 666 use `test`; CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 748 Query 1 748 use `test`; CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 830 Query 1 830 use `test`; CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 912 Query 1 912 use `test`; CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 994 Query 1 994 use `test`; CREATE INDEX my_idx6 ON d1.t6(f1) slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
slave-bin.000001 1062 Query 1 1062 use `test`; CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1144 Query 1 1144 use `test`; INSERT INTO d1.t7 SET f1= 0 slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
slave-bin.000001 1206 Query 1 1206 use `test`; CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1288 Query 1 1288 use `test`; CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1370 Query 1 1370 use `test`; CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1453 Query 1 1453 use `test`; CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1536 Query 1 1536 use `test`; CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1619 Query 1 1619 use `test`; CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1702 Query 1 1702 use `test`; CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1785 Query 1 1785 use `test`; CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1868 Query 1 1868 use `test`; CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1951 Query 1 1951 use `test`; CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2034 Query 1 2034 use `test`; CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2117 Query 1 2117 use `test`; CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
-------- switch to master ------- -------- switch to master -------
COMMIT; COMMIT;
...@@ -123,37 +125,38 @@ MAX(f1) ...@@ -123,37 +125,38 @@ MAX(f1)
1 1
SHOW BINLOG EVENTS IN 'master-bin.000001'; SHOW BINLOG EVENTS IN 'master-bin.000001';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 DROP DATABASE IF EXISTS d1 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 138 Query 1 138 DROP DATABASE IF EXISTS d2 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
master-bin.000001 197 Query 1 197 DROP DATABASE IF EXISTS d3 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
master-bin.000001 256 Query 1 256 CREATE DATABASE d1 master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
master-bin.000001 307 Query 1 307 CREATE DATABASE d2 master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
master-bin.000001 358 Query 1 358 use `test`; CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 440 Query 1 440 use `test`; INSERT INTO d1.t1 SET f1= 0 master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
master-bin.000001 502 Query 1 502 use `test`; CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 584 Query 1 584 use `test`; CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 666 Query 1 666 use `test`; CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 748 Query 1 748 use `test`; CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 830 Query 1 830 use `test`; CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 912 Query 1 912 use `test`; CREATE INDEX my_idx6 ON d1.t6(f1) master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
master-bin.000001 980 Query 1 980 use `test`; CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1062 Query 1 1062 use `test`; INSERT INTO d1.t7 SET f1= 0 master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
master-bin.000001 1124 Query 1 1124 use `test`; CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1206 Query 1 1206 use `test`; CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1288 Query 1 1288 use `test`; CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1371 Query 1 1371 use `test`; CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1454 Query 1 1454 use `test`; CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1537 Query 1 1537 use `test`; CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1620 Query 1 1620 use `test`; CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1703 Query 1 1703 use `test`; CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1786 Query 1 1786 use `test`; CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1869 Query 1 1869 use `test`; CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1952 Query 1 1952 use `test`; CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 2035 Query 1 2035 use `test`; CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 2118 Query 1 2118 use `d1`; BEGIN master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
master-bin.000001 2156 Query 1 2118 use `d1`; INSERT INTO t1 SET f1= 0 + 1 master-bin.000001 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000001 2217 Query 1 2217 use `d1`; COMMIT master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
master-bin.000001 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
...@@ -161,36 +164,37 @@ MAX(f1) ...@@ -161,36 +164,37 @@ MAX(f1)
1 1
SHOW BINLOG EVENTS IN 'slave-bin.000001'; SHOW BINLOG EVENTS IN 'slave-bin.000001';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 slave-bin.000001 # Start 2 # Server ver: VERSION, Binlog ver: 3
slave-bin.000001 79 Query 2 79 use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 161 Query 1 161 DROP DATABASE IF EXISTS d1 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
slave-bin.000001 220 Query 1 220 DROP DATABASE IF EXISTS d2 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
slave-bin.000001 279 Query 1 279 DROP DATABASE IF EXISTS d3 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
slave-bin.000001 338 Query 1 338 CREATE DATABASE d1 slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
slave-bin.000001 389 Query 1 389 CREATE DATABASE d2 slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
slave-bin.000001 440 Query 1 440 use `test`; CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 522 Query 1 522 use `test`; INSERT INTO d1.t1 SET f1= 0 slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
slave-bin.000001 584 Query 1 584 use `test`; CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 666 Query 1 666 use `test`; CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 748 Query 1 748 use `test`; CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 830 Query 1 830 use `test`; CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 912 Query 1 912 use `test`; CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 994 Query 1 994 use `test`; CREATE INDEX my_idx6 ON d1.t6(f1) slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
slave-bin.000001 1062 Query 1 1062 use `test`; CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1144 Query 1 1144 use `test`; INSERT INTO d1.t7 SET f1= 0 slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
slave-bin.000001 1206 Query 1 1206 use `test`; CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1288 Query 1 1288 use `test`; CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1370 Query 1 1370 use `test`; CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1453 Query 1 1453 use `test`; CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1536 Query 1 1536 use `test`; CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1619 Query 1 1619 use `test`; CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1702 Query 1 1702 use `test`; CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1785 Query 1 1785 use `test`; CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1868 Query 1 1868 use `test`; CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1951 Query 1 1951 use `test`; CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2034 Query 1 2034 use `test`; CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2117 Query 1 2117 use `test`; CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2200 Query 1 2200 use `d1`; INSERT INTO t1 SET f1= 0 + 1 slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
slave-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -198,79 +202,81 @@ SELECT MAX(f1) FROM t1; ...@@ -198,79 +202,81 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
1 1
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000001'; SHOW BINLOG EVENTS IN 'master-bin.000001';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 DROP DATABASE IF EXISTS d1 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 138 Query 1 138 DROP DATABASE IF EXISTS d2 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
master-bin.000001 197 Query 1 197 DROP DATABASE IF EXISTS d3 master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
master-bin.000001 256 Query 1 256 CREATE DATABASE d1 master-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
master-bin.000001 307 Query 1 307 CREATE DATABASE d2 master-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
master-bin.000001 358 Query 1 358 use `test`; CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 440 Query 1 440 use `test`; INSERT INTO d1.t1 SET f1= 0 master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
master-bin.000001 502 Query 1 502 use `test`; CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 584 Query 1 584 use `test`; CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 666 Query 1 666 use `test`; CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 748 Query 1 748 use `test`; CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 830 Query 1 830 use `test`; CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 912 Query 1 912 use `test`; CREATE INDEX my_idx6 ON d1.t6(f1) master-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
master-bin.000001 980 Query 1 980 use `test`; CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1062 Query 1 1062 use `test`; INSERT INTO d1.t7 SET f1= 0 master-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
master-bin.000001 1124 Query 1 1124 use `test`; CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1206 Query 1 1206 use `test`; CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1288 Query 1 1288 use `test`; CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1371 Query 1 1371 use `test`; CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1454 Query 1 1454 use `test`; CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1537 Query 1 1537 use `test`; CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1620 Query 1 1620 use `test`; CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1703 Query 1 1703 use `test`; CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1786 Query 1 1786 use `test`; CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1869 Query 1 1869 use `test`; CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 1952 Query 1 1952 use `test`; CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 2035 Query 1 2035 use `test`; CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
master-bin.000001 2118 Query 1 2118 use `d1`; BEGIN master-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
master-bin.000001 2156 Query 1 2118 use `d1`; INSERT INTO t1 SET f1= 0 + 1 master-bin.000001 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000001 2217 Query 1 2217 use `d1`; COMMIT master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
master-bin.000001 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
1 1
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000001'; SHOW BINLOG EVENTS IN 'slave-bin.000001';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 slave-bin.000001 # Start 2 # Server ver: VERSION, Binlog ver: 3
slave-bin.000001 79 Query 2 79 use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
slave-bin.000001 161 Query 1 161 DROP DATABASE IF EXISTS d1 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest1
slave-bin.000001 220 Query 1 220 DROP DATABASE IF EXISTS d2 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest2
slave-bin.000001 279 Query 1 279 DROP DATABASE IF EXISTS d3 slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest3
slave-bin.000001 338 Query 1 338 CREATE DATABASE d1 slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest1
slave-bin.000001 389 Query 1 389 CREATE DATABASE d2 slave-bin.000001 # Query 1 # CREATE DATABASE mysqltest2
slave-bin.000001 440 Query 1 440 use `test`; CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 522 Query 1 522 use `test`; INSERT INTO d1.t1 SET f1= 0 slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t1 SET f1= 0
slave-bin.000001 584 Query 1 584 use `test`; CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 666 Query 1 666 use `test`; CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 748 Query 1 748 use `test`; CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 830 Query 1 830 use `test`; CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 912 Query 1 912 use `test`; CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 994 Query 1 994 use `test`; CREATE INDEX my_idx6 ON d1.t6(f1) slave-bin.000001 # Query 1 # use `test`; CREATE INDEX my_idx6 ON mysqltest1.t6(f1)
slave-bin.000001 1062 Query 1 1062 use `test`; CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1144 Query 1 1144 use `test`; INSERT INTO d1.t7 SET f1= 0 slave-bin.000001 # Query 1 # use `test`; INSERT INTO mysqltest1.t7 SET f1= 0
slave-bin.000001 1206 Query 1 1206 use `test`; CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1288 Query 1 1288 use `test`; CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1370 Query 1 1370 use `test`; CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1453 Query 1 1453 use `test`; CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1536 Query 1 1536 use `test`; CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1619 Query 1 1619 use `test`; CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1702 Query 1 1702 use `test`; CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1785 Query 1 1785 use `test`; CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1868 Query 1 1868 use `test`; CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 1951 Query 1 1951 use `test`; CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2034 Query 1 2034 use `test`; CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2117 Query 1 2117 use `test`; CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000001 # Query 1 # use `test`; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB"
slave-bin.000001 2200 Query 1 2200 use `d1`; INSERT INTO t1 SET f1= 0 + 1 slave-bin.000001 # Query 1 # use `test`; CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT)
slave-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 0 + 1
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -318,7 +324,7 @@ SELECT MAX(f1) FROM t1; ...@@ -318,7 +324,7 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
1 1
TEST-INFO: MASTER: The INSERT is not committed TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000002'; SHOW BINLOG EVENTS IN 'master-bin.000002';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
...@@ -327,7 +333,7 @@ SELECT MAX(f1) FROM t1; ...@@ -327,7 +333,7 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
1 1
TEST-INFO: SLAVE: The INSERT is not committed TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000002'; SHOW BINLOG EVENTS IN 'slave-bin.000002';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
...@@ -363,9 +369,9 @@ MAX(f1) ...@@ -363,9 +369,9 @@ MAX(f1)
2 2
SHOW BINLOG EVENTS IN 'master-bin.000003'; SHOW BINLOG EVENTS IN 'master-bin.000003';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000003 4 Query 1 4 use `d1`; BEGIN master-bin.000003 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000003 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 1 + 1 master-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
master-bin.000003 103 Query 1 103 use `d1`; COMMIT master-bin.000003 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
...@@ -373,7 +379,7 @@ MAX(f1) ...@@ -373,7 +379,7 @@ MAX(f1)
2 2
SHOW BINLOG EVENTS IN 'slave-bin.000003'; SHOW BINLOG EVENTS IN 'slave-bin.000003';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000003 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 1 + 1 slave-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -381,22 +387,22 @@ SELECT MAX(f1) FROM t1; ...@@ -381,22 +387,22 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
2 2
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000003'; SHOW BINLOG EVENTS IN 'master-bin.000003';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000003 4 Query 1 4 use `d1`; BEGIN master-bin.000003 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000003 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 1 + 1 master-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
master-bin.000003 103 Query 1 103 use `d1`; COMMIT master-bin.000003 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
2 2
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000003'; SHOW BINLOG EVENTS IN 'slave-bin.000003';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000003 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 1 + 1 slave-bin.000003 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 1 + 1
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -431,9 +437,9 @@ MAX(f1) ...@@ -431,9 +437,9 @@ MAX(f1)
3 3
SHOW BINLOG EVENTS IN 'master-bin.000004'; SHOW BINLOG EVENTS IN 'master-bin.000004';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000004 4 Query 1 4 use `d1`; BEGIN master-bin.000004 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000004 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 2 + 1 master-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
master-bin.000004 103 Query 1 103 use `d1`; COMMIT master-bin.000004 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
...@@ -441,7 +447,7 @@ MAX(f1) ...@@ -441,7 +447,7 @@ MAX(f1)
3 3
SHOW BINLOG EVENTS IN 'slave-bin.000004'; SHOW BINLOG EVENTS IN 'slave-bin.000004';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000004 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 2 + 1 slave-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -449,22 +455,22 @@ SELECT MAX(f1) FROM t1; ...@@ -449,22 +455,22 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
3 3
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000004'; SHOW BINLOG EVENTS IN 'master-bin.000004';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000004 4 Query 1 4 use `d1`; BEGIN master-bin.000004 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000004 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 2 + 1 master-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
master-bin.000004 103 Query 1 103 use `d1`; COMMIT master-bin.000004 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
3 3
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000004'; SHOW BINLOG EVENTS IN 'slave-bin.000004';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000004 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 2 + 1 slave-bin.000004 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 2 + 1
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -498,9 +504,9 @@ MAX(f1) ...@@ -498,9 +504,9 @@ MAX(f1)
4 4
SHOW BINLOG EVENTS IN 'master-bin.000005'; SHOW BINLOG EVENTS IN 'master-bin.000005';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000005 4 Query 1 4 use `d1`; BEGIN master-bin.000005 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000005 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 3 + 1 master-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
master-bin.000005 103 Query 1 103 use `d1`; COMMIT master-bin.000005 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
...@@ -508,7 +514,7 @@ MAX(f1) ...@@ -508,7 +514,7 @@ MAX(f1)
4 4
SHOW BINLOG EVENTS IN 'slave-bin.000005'; SHOW BINLOG EVENTS IN 'slave-bin.000005';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000005 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 3 + 1 slave-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -516,22 +522,22 @@ SELECT MAX(f1) FROM t1; ...@@ -516,22 +522,22 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
4 4
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000005'; SHOW BINLOG EVENTS IN 'master-bin.000005';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000005 4 Query 1 4 use `d1`; BEGIN master-bin.000005 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000005 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 3 + 1 master-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
master-bin.000005 103 Query 1 103 use `d1`; COMMIT master-bin.000005 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
4 4
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000005'; SHOW BINLOG EVENTS IN 'slave-bin.000005';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000005 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 3 + 1 slave-bin.000005 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 3 + 1
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -541,7 +547,7 @@ flush logs; ...@@ -541,7 +547,7 @@ flush logs;
-------- switch to master ------- -------- switch to master -------
######## DROP TABLE d1.t2 ######## ######## DROP TABLE mysqltest1.t2 ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 4 + 1; INSERT INTO t1 SET f1= 4 + 1;
...@@ -559,16 +565,16 @@ SHOW BINLOG EVENTS IN 'slave-bin.000006'; ...@@ -559,16 +565,16 @@ SHOW BINLOG EVENTS IN 'slave-bin.000006';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
DROP TABLE d1.t2; DROP TABLE mysqltest1.t2;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
5 5
SHOW BINLOG EVENTS IN 'master-bin.000006'; SHOW BINLOG EVENTS IN 'master-bin.000006';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000006 4 Query 1 4 use `d1`; BEGIN master-bin.000006 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000006 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 4 + 1 master-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
master-bin.000006 103 Query 1 103 use `d1`; COMMIT master-bin.000006 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000006 142 Query 1 142 use `d1`; DROP TABLE d1.t2 master-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
...@@ -576,8 +582,8 @@ MAX(f1) ...@@ -576,8 +582,8 @@ MAX(f1)
5 5
SHOW BINLOG EVENTS IN 'slave-bin.000006'; SHOW BINLOG EVENTS IN 'slave-bin.000006';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000006 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 4 + 1 slave-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
slave-bin.000006 65 Query 1 65 use `d1`; DROP TABLE d1.t2 slave-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -585,24 +591,24 @@ SELECT MAX(f1) FROM t1; ...@@ -585,24 +591,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
5 5
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000006'; SHOW BINLOG EVENTS IN 'master-bin.000006';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000006 4 Query 1 4 use `d1`; BEGIN master-bin.000006 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000006 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 4 + 1 master-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
master-bin.000006 103 Query 1 103 use `d1`; COMMIT master-bin.000006 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000006 142 Query 1 142 use `d1`; DROP TABLE d1.t2 master-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
5 5
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000006'; SHOW BINLOG EVENTS IN 'slave-bin.000006';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000006 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 4 + 1 slave-bin.000006 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 4 + 1
slave-bin.000006 65 Query 1 65 use `d1`; DROP TABLE d1.t2 slave-bin.000006 # Query 1 # use `mysqltest1`; DROP TABLE mysqltest1.t2
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -612,15 +618,15 @@ flush logs; ...@@ -612,15 +618,15 @@ flush logs;
-------- switch to master ------- -------- switch to master -------
SHOW TABLES LIKE 't2'; SHOW TABLES LIKE 't2';
Tables_in_d1 (t2) Tables_in_mysqltest1 (t2)
-------- switch to slave -------- -------- switch to slave --------
SHOW TABLES LIKE 't2'; SHOW TABLES LIKE 't2';
Tables_in_d1 (t2) Tables_in_mysqltest1 (t2)
-------- switch to master ------- -------- switch to master -------
######## RENAME TABLE d1.t3 to d1.t20 ######## ######## DROP TEMPORARY TABLE mysqltest1.t23 ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 5 + 1; INSERT INTO t1 SET f1= 5 + 1;
...@@ -638,50 +644,125 @@ SHOW BINLOG EVENTS IN 'slave-bin.000007'; ...@@ -638,50 +644,125 @@ SHOW BINLOG EVENTS IN 'slave-bin.000007';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
RENAME TABLE d1.t3 to d1.t20; DROP TEMPORARY TABLE mysqltest1.t23;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
6 6
SHOW BINLOG EVENTS IN 'master-bin.000007'; SHOW BINLOG EVENTS IN 'master-bin.000007';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000007 4 Query 1 4 use `d1`; BEGIN
master-bin.000007 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000007 103 Query 1 103 use `d1`; COMMIT
master-bin.000007 142 Query 1 142 use `d1`; RENAME TABLE d1.t3 to d1.t20
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
6 5
SHOW BINLOG EVENTS IN 'slave-bin.000007'; SHOW BINLOG EVENTS IN 'slave-bin.000007';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000007 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000007 65 Query 1 65 use `d1`; RENAME TABLE d1.t3 to d1.t20
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
6 5
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000007'; SHOW BINLOG EVENTS IN 'master-bin.000007';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000007 4 Query 1 4 use `d1`; BEGIN master-bin.000007 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000007 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 5 + 1 master-bin.000007 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000007 103 Query 1 103 use `d1`; COMMIT master-bin.000007 # Query 1 # use `mysqltest1`; DROP TEMPORARY TABLE mysqltest1.t23
master-bin.000007 142 Query 1 142 use `d1`; RENAME TABLE d1.t3 to d1.t20 master-bin.000007 # Query 1 # use `mysqltest1`; ROLLBACK
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
6 6
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000007'; SHOW BINLOG EVENTS IN 'slave-bin.000007';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000007 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 5 + 1 slave-bin.000007 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000007 65 Query 1 65 use `d1`; RENAME TABLE d1.t3 to d1.t20 slave-bin.000007 # Query 1 # use `mysqltest1`; DROP TEMPORARY TABLE mysqltest1.t23
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
SHOW TABLES LIKE 't23';
Tables_in_mysqltest1 (t23)
-------- switch to slave --------
SHOW TABLES LIKE 't23';
Tables_in_mysqltest1 (t23)
-------- switch to master -------
######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 5 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'master-bin.000008';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'slave-bin.000008';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'master-bin.000008';
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000008 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000008 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
SHOW BINLOG EVENTS IN 'slave-bin.000008';
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000008';
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000008 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
master-bin.000008 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
6
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000008';
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000008 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 5 + 1
slave-bin.000008 # Query 1 # use `mysqltest1`; RENAME TABLE mysqltest1.t3 to mysqltest1.t20
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -691,53 +772,53 @@ flush logs; ...@@ -691,53 +772,53 @@ flush logs;
-------- switch to master ------- -------- switch to master -------
SHOW TABLES LIKE 't20'; SHOW TABLES LIKE 't20';
Tables_in_d1 (t20) Tables_in_mysqltest1 (t20)
t20 t20
-------- switch to slave -------- -------- switch to slave --------
SHOW TABLES LIKE 't20'; SHOW TABLES LIKE 't20';
Tables_in_d1 (t20) Tables_in_mysqltest1 (t20)
t20 t20
-------- switch to master ------- -------- switch to master -------
######## ALTER TABLE d1.t4 ADD column f2 BIGINT ######## ######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 6 + 1; INSERT INTO t1 SET f1= 6 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
7 7
SHOW BINLOG EVENTS IN 'master-bin.000008'; SHOW BINLOG EVENTS IN 'master-bin.000009';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
6 6
SHOW BINLOG EVENTS IN 'slave-bin.000008'; SHOW BINLOG EVENTS IN 'slave-bin.000009';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
ALTER TABLE d1.t4 ADD column f2 BIGINT; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
7 7
SHOW BINLOG EVENTS IN 'master-bin.000008'; SHOW BINLOG EVENTS IN 'master-bin.000009';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000008 4 Query 1 4 use `d1`; BEGIN master-bin.000009 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000008 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 6 + 1 master-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
master-bin.000008 103 Query 1 103 use `d1`; COMMIT master-bin.000009 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000008 142 Query 1 142 use `d1`; ALTER TABLE d1.t4 ADD column f2 BIGINT master-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
7 7
SHOW BINLOG EVENTS IN 'slave-bin.000008'; SHOW BINLOG EVENTS IN 'slave-bin.000009';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000008 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 6 + 1 slave-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
slave-bin.000008 65 Query 1 65 use `d1`; ALTER TABLE d1.t4 ADD column f2 BIGINT slave-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -745,24 +826,24 @@ SELECT MAX(f1) FROM t1; ...@@ -745,24 +826,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
7 7
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000008'; SHOW BINLOG EVENTS IN 'master-bin.000009';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000008 4 Query 1 4 use `d1`; BEGIN master-bin.000009 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000008 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 6 + 1 master-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
master-bin.000008 103 Query 1 103 use `d1`; COMMIT master-bin.000009 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000008 142 Query 1 142 use `d1`; ALTER TABLE d1.t4 ADD column f2 BIGINT master-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
7 7
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000008'; SHOW BINLOG EVENTS IN 'slave-bin.000009';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000008 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 6 + 1 slave-bin.000009 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 6 + 1
slave-bin.000008 65 Query 1 65 use `d1`; ALTER TABLE d1.t4 ADD column f2 BIGINT slave-bin.000009 # Query 1 # use `mysqltest1`; ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -771,56 +852,56 @@ flush logs; ...@@ -771,56 +852,56 @@ flush logs;
flush logs; flush logs;
-------- switch to master ------- -------- switch to master -------
describe d1.t4; describe mysqltest1.t4;
Field Type Null Key Default Extra Field Type Null Key Default Extra
f1 bigint(20) YES NULL f1 bigint(20) YES NULL
f2 bigint(20) YES NULL f2 bigint(20) YES NULL
-------- switch to slave -------- -------- switch to slave --------
describe d1.t4; describe mysqltest1.t4;
Field Type Null Key Default Extra Field Type Null Key Default Extra
f1 bigint(20) YES NULL f1 bigint(20) YES NULL
f2 bigint(20) YES NULL f2 bigint(20) YES NULL
-------- switch to master ------- -------- switch to master -------
######## CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB" ######## ######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB" ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 7 + 1; INSERT INTO t1 SET f1= 7 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
8 8
SHOW BINLOG EVENTS IN 'master-bin.000009'; SHOW BINLOG EVENTS IN 'master-bin.000010';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
7 7
SHOW BINLOG EVENTS IN 'slave-bin.000009'; SHOW BINLOG EVENTS IN 'slave-bin.000010';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB";
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
8 8
SHOW BINLOG EVENTS IN 'master-bin.000009'; SHOW BINLOG EVENTS IN 'master-bin.000010';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000009 4 Query 1 4 use `d1`; BEGIN master-bin.000010 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000009 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 7 + 1 master-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
master-bin.000009 103 Query 1 103 use `d1`; COMMIT master-bin.000010 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000009 142 Query 1 142 use `d1`; CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
8 8
SHOW BINLOG EVENTS IN 'slave-bin.000009'; SHOW BINLOG EVENTS IN 'slave-bin.000010';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000009 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 7 + 1 slave-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
slave-bin.000009 65 Query 1 65 use `d1`; CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -828,24 +909,24 @@ SELECT MAX(f1) FROM t1; ...@@ -828,24 +909,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
8 8
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000009'; SHOW BINLOG EVENTS IN 'master-bin.000010';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000009 4 Query 1 4 use `d1`; BEGIN master-bin.000010 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000009 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 7 + 1 master-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
master-bin.000009 103 Query 1 103 use `d1`; COMMIT master-bin.000010 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000009 142 Query 1 142 use `d1`; CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB" master-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
8 8
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000009'; SHOW BINLOG EVENTS IN 'slave-bin.000010';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000009 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 7 + 1 slave-bin.000010 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 7 + 1
slave-bin.000009 65 Query 1 65 use `d1`; CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB" slave-bin.000010 # Query 1 # use `mysqltest1`; CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB"
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -855,43 +936,110 @@ flush logs; ...@@ -855,43 +936,110 @@ flush logs;
-------- switch to master ------- -------- switch to master -------
######## TRUNCATE TABLE d1.t7 ######## ######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 8 + 1; INSERT INTO t1 SET f1= 8 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
9 9
SHOW BINLOG EVENTS IN 'master-bin.000010'; SHOW BINLOG EVENTS IN 'master-bin.000011';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
8 8
SHOW BINLOG EVENTS IN 'slave-bin.000010'; SHOW BINLOG EVENTS IN 'slave-bin.000011';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
TRUNCATE TABLE d1.t7; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
9 9
SHOW BINLOG EVENTS IN 'master-bin.000010'; SHOW BINLOG EVENTS IN 'master-bin.000011';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
8
SHOW BINLOG EVENTS IN 'slave-bin.000011';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT MAX(f1) FROM t1;
MAX(f1)
8
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000011';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000010 4 Query 1 4 use `d1`; BEGIN master-bin.000011 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000010 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 8 + 1 master-bin.000011 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
master-bin.000010 103 Query 1 103 use `d1`; COMMIT master-bin.000011 # Query 1 # use `mysqltest1`; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT)
master-bin.000010 142 Query 1 142 use `d1`; TRUNCATE TABLE d1.t7 master-bin.000011 # Query 1 # use `mysqltest1`; ROLLBACK
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
9 9
SHOW BINLOG EVENTS IN 'slave-bin.000010';
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000011';
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000011 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
slave-bin.000011 # Query 1 # use `mysqltest1`; CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT)
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
######## TRUNCATE TABLE mysqltest1.t7 ########
-------- switch to master -------
INSERT INTO t1 SET f1= 8 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'master-bin.000012';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'slave-bin.000012';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
TRUNCATE TABLE mysqltest1.t7;
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'master-bin.000012';
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000012 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
master-bin.000012 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
9
SHOW BINLOG EVENTS IN 'slave-bin.000012';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000010 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 8 + 1 slave-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
slave-bin.000010 65 Query 1 65 use `d1`; TRUNCATE TABLE d1.t7 slave-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -899,24 +1047,24 @@ SELECT MAX(f1) FROM t1; ...@@ -899,24 +1047,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
9 9
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000010'; SHOW BINLOG EVENTS IN 'master-bin.000012';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000010 4 Query 1 4 use `d1`; BEGIN master-bin.000012 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000010 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 8 + 1 master-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
master-bin.000010 103 Query 1 103 use `d1`; COMMIT master-bin.000012 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000010 142 Query 1 142 use `d1`; TRUNCATE TABLE d1.t7 master-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
9 9
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000010'; SHOW BINLOG EVENTS IN 'slave-bin.000012';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000010 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 8 + 1 slave-bin.000012 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 8 + 1
slave-bin.000010 65 Query 1 65 use `d1`; TRUNCATE TABLE d1.t7 slave-bin.000012 # Query 1 # use `mysqltest1`; TRUNCATE TABLE mysqltest1.t7
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -925,50 +1073,50 @@ flush logs; ...@@ -925,50 +1073,50 @@ flush logs;
flush logs; flush logs;
-------- switch to master ------- -------- switch to master -------
SELECT * FROM d1.t7; SELECT * FROM mysqltest1.t7;
f1 f1
-------- switch to slave -------- -------- switch to slave --------
SELECT * FROM d1.t7; SELECT * FROM mysqltest1.t7;
f1 f1
-------- switch to master ------- -------- switch to master -------
######## LOCK TABLES d1.t1 WRITE, d1.t8 READ ######## ######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 9 + 1; INSERT INTO t1 SET f1= 9 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10 10
SHOW BINLOG EVENTS IN 'master-bin.000011'; SHOW BINLOG EVENTS IN 'master-bin.000013';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
9 9
SHOW BINLOG EVENTS IN 'slave-bin.000011'; SHOW BINLOG EVENTS IN 'slave-bin.000013';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
LOCK TABLES d1.t1 WRITE, d1.t8 READ; LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10 10
SHOW BINLOG EVENTS IN 'master-bin.000011'; SHOW BINLOG EVENTS IN 'master-bin.000013';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000011 4 Query 1 4 use `d1`; BEGIN master-bin.000013 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000011 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 9 + 1 master-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
master-bin.000011 103 Query 1 103 use `d1`; COMMIT master-bin.000013 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10 10
SHOW BINLOG EVENTS IN 'slave-bin.000011'; SHOW BINLOG EVENTS IN 'slave-bin.000013';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000011 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 9 + 1 slave-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -976,22 +1124,22 @@ SELECT MAX(f1) FROM t1; ...@@ -976,22 +1124,22 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10 10
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000011'; SHOW BINLOG EVENTS IN 'master-bin.000013';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000011 4 Query 1 4 use `d1`; BEGIN master-bin.000013 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000011 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 9 + 1 master-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
master-bin.000011 103 Query 1 103 use `d1`; COMMIT master-bin.000013 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10 10
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000011'; SHOW BINLOG EVENTS IN 'slave-bin.000013';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000011 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 9 + 1 slave-bin.000013 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 9 + 1
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -1001,7 +1149,6 @@ flush logs; ...@@ -1001,7 +1149,6 @@ flush logs;
-------- switch to master ------- -------- switch to master -------
UNLOCK TABLES; UNLOCK TABLES;
LOCK TABLES d1.t1 WRITE, d1.t8 READ;
######## UNLOCK TABLES ######## ######## UNLOCK TABLES ########
...@@ -1010,14 +1157,14 @@ INSERT INTO t1 SET f1= 10 + 1; ...@@ -1010,14 +1157,14 @@ INSERT INTO t1 SET f1= 10 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
11 11
SHOW BINLOG EVENTS IN 'master-bin.000012'; SHOW BINLOG EVENTS IN 'master-bin.000014';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10 10
SHOW BINLOG EVENTS IN 'slave-bin.000012'; SHOW BINLOG EVENTS IN 'slave-bin.000014';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
...@@ -1025,19 +1172,140 @@ UNLOCK TABLES; ...@@ -1025,19 +1172,140 @@ UNLOCK TABLES;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
11 11
SHOW BINLOG EVENTS IN 'master-bin.000012'; SHOW BINLOG EVENTS IN 'master-bin.000014';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000014';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000014';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000014';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
LOCK TABLES mysqltest1.t1 READ;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'master-bin.000015';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000015';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'master-bin.000015';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000012 4 Query 1 4 use `d1`; BEGIN
master-bin.000012 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 10 + 1
master-bin.000012 104 Query 1 104 use `d1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000015';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
ROLLBACK;
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000015';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000015';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master -------
flush logs;
-------- switch to slave --------
flush logs;
-------- switch to master -------
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
######## UNLOCK TABLES ########
-------- switch to master -------
INSERT INTO t1 SET f1= 10 + 1;
SELECT MAX(f1) FROM t1;
MAX(f1)
11 11
SHOW BINLOG EVENTS IN 'slave-bin.000012'; SHOW BINLOG EVENTS IN 'master-bin.000016';
Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
10
SHOW BINLOG EVENTS IN 'slave-bin.000016';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000012 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 10 + 1
-------- switch to master -------
UNLOCK TABLES;
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'master-bin.000016';
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000016 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
master-bin.000016 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave --------
SELECT MAX(f1) FROM t1;
MAX(f1)
11
SHOW BINLOG EVENTS IN 'slave-bin.000016';
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -1045,22 +1313,22 @@ SELECT MAX(f1) FROM t1; ...@@ -1045,22 +1313,22 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
11 11
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000012'; SHOW BINLOG EVENTS IN 'master-bin.000016';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000012 4 Query 1 4 use `d1`; BEGIN master-bin.000016 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000012 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 10 + 1 master-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
master-bin.000012 104 Query 1 104 use `d1`; COMMIT master-bin.000016 # Query 1 # use `mysqltest1`; COMMIT
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
11 11
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000012'; SHOW BINLOG EVENTS IN 'slave-bin.000016';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000012 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 10 + 1 slave-bin.000016 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 10 + 1
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -1070,43 +1338,43 @@ flush logs; ...@@ -1070,43 +1338,43 @@ flush logs;
-------- switch to master ------- -------- switch to master -------
######## DROP INDEX my_idx6 ON d1.t6 ######## ######## DROP INDEX my_idx6 ON mysqltest1.t6 ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 11 + 1; INSERT INTO t1 SET f1= 11 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
12 12
SHOW BINLOG EVENTS IN 'master-bin.000013'; SHOW BINLOG EVENTS IN 'master-bin.000017';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
11 11
SHOW BINLOG EVENTS IN 'slave-bin.000013'; SHOW BINLOG EVENTS IN 'slave-bin.000017';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
DROP INDEX my_idx6 ON d1.t6; DROP INDEX my_idx6 ON mysqltest1.t6;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
12 12
SHOW BINLOG EVENTS IN 'master-bin.000013'; SHOW BINLOG EVENTS IN 'master-bin.000017';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000013 4 Query 1 4 use `d1`; BEGIN master-bin.000017 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000013 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 11 + 1 master-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
master-bin.000013 104 Query 1 104 use `d1`; COMMIT master-bin.000017 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000013 143 Query 1 143 use `d1`; DROP INDEX my_idx6 ON d1.t6 master-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
12 12
SHOW BINLOG EVENTS IN 'slave-bin.000013'; SHOW BINLOG EVENTS IN 'slave-bin.000017';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000013 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 11 + 1 slave-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
slave-bin.000013 66 Query 1 66 use `d1`; DROP INDEX my_idx6 ON d1.t6 slave-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -1114,24 +1382,24 @@ SELECT MAX(f1) FROM t1; ...@@ -1114,24 +1382,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
12 12
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000013'; SHOW BINLOG EVENTS IN 'master-bin.000017';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000013 4 Query 1 4 use `d1`; BEGIN master-bin.000017 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000013 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 11 + 1 master-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
master-bin.000013 104 Query 1 104 use `d1`; COMMIT master-bin.000017 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000013 143 Query 1 143 use `d1`; DROP INDEX my_idx6 ON d1.t6 master-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
12 12
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000013'; SHOW BINLOG EVENTS IN 'slave-bin.000017';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000013 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 11 + 1 slave-bin.000017 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 11 + 1
slave-bin.000013 66 Query 1 66 use `d1`; DROP INDEX my_idx6 ON d1.t6 slave-bin.000017 # Query 1 # use `mysqltest1`; DROP INDEX my_idx6 ON mysqltest1.t6
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -1140,52 +1408,52 @@ flush logs; ...@@ -1140,52 +1408,52 @@ flush logs;
flush logs; flush logs;
-------- switch to master ------- -------- switch to master -------
SHOW INDEX FROM d1.t6; SHOW INDEX FROM mysqltest1.t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-------- switch to slave -------- -------- switch to slave --------
SHOW INDEX FROM d1.t6; SHOW INDEX FROM mysqltest1.t6;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-------- switch to master ------- -------- switch to master -------
######## CREATE INDEX my_idx5 ON d1.t5(f1) ######## ######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 12 + 1; INSERT INTO t1 SET f1= 12 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
13 13
SHOW BINLOG EVENTS IN 'master-bin.000014'; SHOW BINLOG EVENTS IN 'master-bin.000018';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
12 12
SHOW BINLOG EVENTS IN 'slave-bin.000014'; SHOW BINLOG EVENTS IN 'slave-bin.000018';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
CREATE INDEX my_idx5 ON d1.t5(f1); CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
13 13
SHOW BINLOG EVENTS IN 'master-bin.000014'; SHOW BINLOG EVENTS IN 'master-bin.000018';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000014 4 Query 1 4 use `d1`; BEGIN master-bin.000018 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000014 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 12 + 1 master-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
master-bin.000014 104 Query 1 104 use `d1`; COMMIT master-bin.000018 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000014 143 Query 1 143 use `d1`; CREATE INDEX my_idx5 ON d1.t5(f1) master-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
13 13
SHOW BINLOG EVENTS IN 'slave-bin.000014'; SHOW BINLOG EVENTS IN 'slave-bin.000018';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000014 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 12 + 1 slave-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
slave-bin.000014 66 Query 1 66 use `d1`; CREATE INDEX my_idx5 ON d1.t5(f1) slave-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -1193,24 +1461,24 @@ SELECT MAX(f1) FROM t1; ...@@ -1193,24 +1461,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
13 13
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000014'; SHOW BINLOG EVENTS IN 'master-bin.000018';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000014 4 Query 1 4 use `d1`; BEGIN master-bin.000018 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000014 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 12 + 1 master-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
master-bin.000014 104 Query 1 104 use `d1`; COMMIT master-bin.000018 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000014 143 Query 1 143 use `d1`; CREATE INDEX my_idx5 ON d1.t5(f1) master-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
13 13
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000014'; SHOW BINLOG EVENTS IN 'slave-bin.000018';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000014 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 12 + 1 slave-bin.000018 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 12 + 1
slave-bin.000014 66 Query 1 66 use `d1`; CREATE INDEX my_idx5 ON d1.t5(f1) slave-bin.000018 # Query 1 # use `mysqltest1`; CREATE INDEX my_idx5 ON mysqltest1.t5(f1)
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -1219,54 +1487,54 @@ flush logs; ...@@ -1219,54 +1487,54 @@ flush logs;
flush logs; flush logs;
-------- switch to master ------- -------- switch to master -------
SHOW INDEX FROM d1.t5; SHOW INDEX FROM mysqltest1.t5;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
-------- switch to slave -------- -------- switch to slave --------
SHOW INDEX FROM d1.t5; SHOW INDEX FROM mysqltest1.t5;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE
-------- switch to master ------- -------- switch to master -------
######## DROP DATABASE d2 ######## ######## DROP DATABASE mysqltest2 ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 13 + 1; INSERT INTO t1 SET f1= 13 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
14 14
SHOW BINLOG EVENTS IN 'master-bin.000015'; SHOW BINLOG EVENTS IN 'master-bin.000019';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
13 13
SHOW BINLOG EVENTS IN 'slave-bin.000015'; SHOW BINLOG EVENTS IN 'slave-bin.000019';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
DROP DATABASE d2; DROP DATABASE mysqltest2;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
14 14
SHOW BINLOG EVENTS IN 'master-bin.000015'; SHOW BINLOG EVENTS IN 'master-bin.000019';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000015 4 Query 1 4 use `d1`; BEGIN master-bin.000019 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000015 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 13 + 1 master-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
master-bin.000015 104 Query 1 104 use `d1`; COMMIT master-bin.000019 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000015 143 Query 1 143 DROP DATABASE d2 master-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
14 14
SHOW BINLOG EVENTS IN 'slave-bin.000015'; SHOW BINLOG EVENTS IN 'slave-bin.000019';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000015 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 13 + 1 slave-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
slave-bin.000015 66 Query 1 66 DROP DATABASE d2 slave-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -1274,24 +1542,24 @@ SELECT MAX(f1) FROM t1; ...@@ -1274,24 +1542,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
14 14
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000015'; SHOW BINLOG EVENTS IN 'master-bin.000019';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000015 4 Query 1 4 use `d1`; BEGIN master-bin.000019 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000015 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 13 + 1 master-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
master-bin.000015 104 Query 1 104 use `d1`; COMMIT master-bin.000019 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000015 143 Query 1 143 DROP DATABASE d2 master-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
14 14
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000015'; SHOW BINLOG EVENTS IN 'slave-bin.000019';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000015 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 13 + 1 slave-bin.000019 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 13 + 1
slave-bin.000015 66 Query 1 66 DROP DATABASE d2 slave-bin.000019 # Query 1 # DROP DATABASE mysqltest2
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -1300,52 +1568,52 @@ flush logs; ...@@ -1300,52 +1568,52 @@ flush logs;
flush logs; flush logs;
-------- switch to master ------- -------- switch to master -------
SHOW DATABASES LIKE "d2"; SHOW DATABASES LIKE "mysqltest2";
Database (d2) Database (mysqltest2)
-------- switch to slave -------- -------- switch to slave --------
SHOW DATABASES LIKE "d2"; SHOW DATABASES LIKE "mysqltest2";
Database (d2) Database (mysqltest2)
-------- switch to master ------- -------- switch to master -------
######## CREATE DATABASE d3 ######## ######## CREATE DATABASE mysqltest3 ########
-------- switch to master ------- -------- switch to master -------
INSERT INTO t1 SET f1= 14 + 1; INSERT INTO t1 SET f1= 14 + 1;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
15 15
SHOW BINLOG EVENTS IN 'master-bin.000016'; SHOW BINLOG EVENTS IN 'master-bin.000020';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
14 14
SHOW BINLOG EVENTS IN 'slave-bin.000016'; SHOW BINLOG EVENTS IN 'slave-bin.000020';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
-------- switch to master ------- -------- switch to master -------
CREATE DATABASE d3; CREATE DATABASE mysqltest3;
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
15 15
SHOW BINLOG EVENTS IN 'master-bin.000016'; SHOW BINLOG EVENTS IN 'master-bin.000020';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000016 4 Query 1 4 use `d1`; BEGIN master-bin.000020 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000016 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 14 + 1 master-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
master-bin.000016 104 Query 1 104 use `d1`; COMMIT master-bin.000020 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000016 143 Query 1 143 CREATE DATABASE d3 master-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
15 15
SHOW BINLOG EVENTS IN 'slave-bin.000016'; SHOW BINLOG EVENTS IN 'slave-bin.000020';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000016 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 14 + 1 slave-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
slave-bin.000016 66 Query 1 66 CREATE DATABASE d3 slave-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to master ------- -------- switch to master -------
ROLLBACK; ROLLBACK;
...@@ -1353,24 +1621,24 @@ SELECT MAX(f1) FROM t1; ...@@ -1353,24 +1621,24 @@ SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
15 15
TEST-INFO: MASTER: The INSERT is committed TEST-INFO: MASTER: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'master-bin.000016'; SHOW BINLOG EVENTS IN 'master-bin.000020';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000016 4 Query 1 4 use `d1`; BEGIN master-bin.000020 # Query 1 # use `mysqltest1`; BEGIN
master-bin.000016 42 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 14 + 1 master-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
master-bin.000016 104 Query 1 104 use `d1`; COMMIT master-bin.000020 # Query 1 # use `mysqltest1`; COMMIT
master-bin.000016 143 Query 1 143 CREATE DATABASE d3 master-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to slave -------- -------- switch to slave --------
SELECT MAX(f1) FROM t1; SELECT MAX(f1) FROM t1;
MAX(f1) MAX(f1)
15 15
TEST-INFO: SLAVE: The INSERT is committed TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
SHOW BINLOG EVENTS IN 'slave-bin.000016'; SHOW BINLOG EVENTS IN 'slave-bin.000020';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000016 4 Query 1 4 use `d1`; INSERT INTO t1 SET f1= 14 + 1 slave-bin.000020 # Query 1 # use `mysqltest1`; INSERT INTO t1 SET f1= 14 + 1
slave-bin.000016 66 Query 1 66 CREATE DATABASE d3 slave-bin.000020 # Query 1 # CREATE DATABASE mysqltest3
-------- switch to master ------- -------- switch to master -------
flush logs; flush logs;
...@@ -1379,16 +1647,16 @@ flush logs; ...@@ -1379,16 +1647,16 @@ flush logs;
flush logs; flush logs;
-------- switch to master ------- -------- switch to master -------
SHOW DATABASES LIKE "d3"; SHOW DATABASES LIKE "mysqltest3";
Database (d3) Database (mysqltest3)
d3 mysqltest3
-------- switch to slave -------- -------- switch to slave --------
SHOW DATABASES LIKE "d3"; SHOW DATABASES LIKE "mysqltest3";
Database (d3) Database (mysqltest3)
d3 mysqltest3
-------- switch to master ------- -------- switch to master -------
DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS d3; DROP DATABASE IF EXISTS mysqltest3;
######################## rpl-ddl.test ######################## ######################## rpl_ddl.test ########################
# # # #
# DDL statements (sometimes with implicit COMMIT) executed # # DDL statements (sometimes with implicit COMMIT) executed #
# by the master and it's propagation into the slave # # by the master and it's propagation into the slave #
...@@ -28,89 +28,65 @@ ...@@ -28,89 +28,65 @@
# eval SELECT CONCAT('######## ','$my_stmt',' ########') as ""; # eval SELECT CONCAT('######## ','$my_stmt',' ########') as "";
# #
######## tested DDL commands
#
# let $my_stmt= COMMIT;
# let $my_stmt= ROLLBACK;
# let $my_stmt= SET AUTOCOMMIT=1;
# let $my_stmt= START TRANSACTION;
# let $my_stmt= BEGIN;
# let $my_stmt= DROP TABLE d1.t2;
# let $my_stmt= RENAME TABLE d1.t3 to d1.t20; <- wrong syntax !!
# let $my_stmt= ALTER TABLE d1.t4 ADD column f2 BIGINT;
# let $my_stmt= CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB";
# let $my_stmt= TRUNCATE TABLE d1.t7;
# let $my_stmt= LOCK TABLES d1.t1 WRITE, d1.t8 READ;
# let $my_stmt= UNLOCK TABLES;
# let $my_stmt= DROP INDEX my_idx6 ON d1.t6;
# let $my_stmt= CREATE INDEX my_idx5 ON d1.t5(f1);
# let $my_stmt= DROP DATABASE d2;
# let $my_stmt= CREATE DATABASE d3;
#
# FIXME: @code{LOAD MASTER DATA} is not tested
#
#############################################
--source include/have_innodb.inc --source include/have_innodb.inc
source include/master-slave.inc; --source include/master-slave.inc
###############################################################
######## some preparations # Some preparations
# ###############################################################
SET AUTOCOMMIT = 1; SET AUTOCOMMIT = 1;
# #
# 1. DROP all objects, which probably already exist, but must be created here # 1. DROP all objects, which probably already exist, but must be created here
# #
--disable_warnings --disable_warnings
DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS d3; DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings --enable_warnings
# #
# 2. CREATE all objects needed # 2. CREATE all objects needed
# working database is d1 # working database is mysqltest1
# working (transactional!) is d1.t1 # working (transactional!) is mysqltest1.t1
# #
CREATE DATABASE d1; CREATE DATABASE mysqltest1;
CREATE DATABASE d2; CREATE DATABASE mysqltest2;
CREATE TABLE d1.t1 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO d1.t1 SET f1= 0; INSERT INTO mysqltest1.t1 SET f1= 0;
CREATE TABLE d1.t2 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t3 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t4 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t5 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t6 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE= "InnoDB";
CREATE INDEX my_idx6 ON d1.t6(f1); CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
CREATE TABLE d1.t7 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE= "InnoDB";
INSERT INTO d1.t7 SET f1= 0; INSERT INTO mysqltest1.t7 SET f1= 0;
CREATE TABLE d1.t8 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t9 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t10 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t11 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t12 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t13 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t14 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t15 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t16 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t17 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t18 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE= "InnoDB";
CREATE TABLE d1.t19 (f1 BIGINT) ENGINE= "InnoDB"; CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE= "InnoDB";
# CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
COMMIT; # Just to be sure
# #
# 3. master sessions: never do AUTOCOMMIT # 3. master sessions: never do AUTOCOMMIT
# slave sessions: do AUTOCOMMIT, because we want to see fresh values # slave sessions: never do AUTOCOMMIT
# every time #
# default database is d1
SET AUTOCOMMIT = 0; SET AUTOCOMMIT = 0;
use d1; use mysqltest1;
sync_slave_with_master; sync_slave_with_master;
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
SET AUTOCOMMIT = 1; SET AUTOCOMMIT = 0;
use d1; use mysqltest1;
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
...@@ -122,27 +98,48 @@ SELECT '-------- switch to master -------' as ""; ...@@ -122,27 +98,48 @@ SELECT '-------- switch to master -------' as "";
# sequences are nearly independend of the previous statements. # sequences are nearly independend of the previous statements.
--disable_abort_on_error --disable_abort_on_error
###### banal case: (explicit) COMMIT and ROLLBACK ###############################################################
# just for checking if the test sequence is usable # Banal case: (explicit) COMMIT and ROLLBACK
# Just for checking if the test sequence is usable
###############################################################
let $my_stmt= COMMIT; let $my_stmt= COMMIT;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
let $my_stmt= ROLLBACK; let $my_stmt= ROLLBACK;
let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
###### cases with commands very similar to COMMIT ###############################################################
# Cases with commands very similar to COMMIT
###############################################################
let $my_stmt= SET AUTOCOMMIT=1; let $my_stmt= SET AUTOCOMMIT=1;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SET AUTOCOMMIT=0; SET AUTOCOMMIT=0;
#
let $my_stmt= START TRANSACTION; let $my_stmt= START TRANSACTION;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
#
let $my_stmt= BEGIN; let $my_stmt= BEGIN;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
###### cases with commands, which create or drop objects ###############################################################
#### (BASE) TABLES and (UPDATABLE) VIEWs # Cases with (BASE) TABLES and (UPDATABLE) VIEWs
let $my_stmt= DROP TABLE d1.t2; ###############################################################
let $my_stmt= DROP TABLE mysqltest1.t2;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't2'; SHOW TABLES LIKE 't2';
connection slave; connection slave;
...@@ -154,8 +151,31 @@ connection master; ...@@ -154,8 +151,31 @@ connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#
let $my_stmt= RENAME TABLE d1.t3 to d1.t20; # Note: Since this test is executed with a skip-innodb slave, the
# slave incorrectly commits the insert. One can *not* have InnoDB on
# master and MyISAM on slave and expect that a transactional rollback
# after a CREATE TEMPORARY TABLE should work correctly on the slave.
# For this to work properly the handler on the slave must be able to
# handle transactions (e.g. InnoDB or NDB).
let $my_stmt= DROP TEMPORARY TABLE mysqltest1.t23;
let $my_master_commit= false;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't23';
connection slave;
--disable_query_log
SELECT '-------- switch to slave --------' as "";
--enable_query_log
SHOW TABLES LIKE 't23';
connection master;
--disable_query_log
SELECT '-------- switch to master -------' as "";
--enable_query_log
let $my_stmt= RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SHOW TABLES LIKE 't20'; SHOW TABLES LIKE 't20';
connection slave; connection slave;
...@@ -167,102 +187,158 @@ connection master; ...@@ -167,102 +187,158 @@ connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#
let $my_stmt= ALTER TABLE d1.t4 ADD column f2 BIGINT; let $my_stmt= ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
describe d1.t4; describe mysqltest1.t4;
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
describe d1.t4; describe mysqltest1.t4;
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#
let $my_stmt= CREATE TABLE d1.t21 (f1 BIGINT) ENGINE= "InnoDB"; let $my_stmt= CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "InnoDB";
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
#
let $my_stmt= TRUNCATE TABLE d1.t7; # Note: Since this test is executed with a skip-innodb slave, the
# slave incorrectly commits the insert. One can *not* have InnoDB on
# master and MyISAM on slave and expect that a transactional rollback
# after a CREATE TEMPORARY TABLE should work correctly on the slave.
# For this to work properly the handler on the slave must be able to
# handle transactions (e.g. InnoDB or NDB).
let $my_stmt= CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
let $my_master_commit= false;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SELECT * FROM d1.t7;
let $my_stmt= TRUNCATE TABLE mysqltest1.t7;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
SELECT * FROM mysqltest1.t7;
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
SELECT * FROM d1.t7; SELECT * FROM mysqltest1.t7;
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#
# MySQL insists in locking d1.t1, because rpl_stmt_seq performs an INSERT into ###############################################################
# this table. # Cases with LOCK/UNLOCK
let $my_stmt= LOCK TABLES d1.t1 WRITE, d1.t8 READ; ###############################################################
# MySQL insists in locking mysqltest1.t1, because rpl_stmt_seq performs an
# INSERT into this table.
let $my_stmt= LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
UNLOCK TABLES; UNLOCK TABLES;
#
LOCK TABLES d1.t1 WRITE, d1.t8 READ; # No prior locking
let $my_stmt= UNLOCK TABLES; let $my_stmt= UNLOCK TABLES;
let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
#
#### INDEXES # With prior read locking
let $my_stmt= DROP INDEX my_idx6 ON d1.t6; LOCK TABLES mysqltest1.t1 READ;
let $my_stmt= UNLOCK TABLES;
let $my_master_commit= false;
let $my_slave_commit= false;
--source include/rpl_stmt_seq.inc
# With prior write locking
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
let $my_stmt= UNLOCK TABLES;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc
###############################################################
# Cases with INDEXES
###############################################################
let $my_stmt= DROP INDEX my_idx6 ON mysqltest1.t6;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SHOW INDEX FROM d1.t6; SHOW INDEX FROM mysqltest1.t6;
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
SHOW INDEX FROM d1.t6; SHOW INDEX FROM mysqltest1.t6;
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#
let $my_stmt= CREATE INDEX my_idx5 ON d1.t5(f1); let $my_stmt= CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SHOW INDEX FROM d1.t5; SHOW INDEX FROM mysqltest1.t5;
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
SHOW INDEX FROM d1.t5; SHOW INDEX FROM mysqltest1.t5;
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#### DATABASES ###############################################################
let $my_stmt= DROP DATABASE d2; # Cases with DATABASE
###############################################################
let $my_stmt= DROP DATABASE mysqltest2;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SHOW DATABASES LIKE "d2"; SHOW DATABASES LIKE "mysqltest2";
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
SHOW DATABASES LIKE "d2"; SHOW DATABASES LIKE "mysqltest2";
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
#
let $my_stmt= CREATE DATABASE d3; let $my_stmt= CREATE DATABASE mysqltest3;
let $my_master_commit= true;
let $my_slave_commit= true;
--source include/rpl_stmt_seq.inc --source include/rpl_stmt_seq.inc
SHOW DATABASES LIKE "d3"; SHOW DATABASES LIKE "mysqltest3";
connection slave; connection slave;
--disable_query_log --disable_query_log
SELECT '-------- switch to slave --------' as ""; SELECT '-------- switch to slave --------' as "";
--enable_query_log --enable_query_log
SHOW DATABASES LIKE "d3"; SHOW DATABASES LIKE "mysqltest3";
connection master; connection master;
--disable_query_log --disable_query_log
SELECT '-------- switch to master -------' as ""; SELECT '-------- switch to master -------' as "";
--enable_query_log --enable_query_log
###############################################################
# Cleanup
###############################################################
--disable_warnings --disable_warnings
DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS d3; DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings --enable_warnings
...@@ -2410,10 +2410,19 @@ mysql_execute_command(THD *thd) ...@@ -2410,10 +2410,19 @@ mysql_execute_command(THD *thd)
case SQLCOM_CREATE_TABLE: case SQLCOM_CREATE_TABLE:
{ {
/* If CREATE TABLE of non-temporary table, do implicit commit */ /* If CREATE TABLE of non-temporary table, do implicit commit */
if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) && if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
end_active_trans(thd)) {
res= -1; if (end_active_trans(thd))
{
res= -1;
break;
}
}
else
{
/* So that CREATE TEMPORARY TABLE gets flushed to binlog */
thd->options|= (OPTION_STATUS_NO_TRANS_UPDATE);
}
/* Skip first table, which is the table we are creating */ /* Skip first table, which is the table we are creating */
TABLE_LIST *create_table, *create_table_local; TABLE_LIST *create_table, *create_table_local;
tables= lex->unlink_first_table(tables, &create_table, tables= lex->unlink_first_table(tables, &create_table,
...@@ -2979,6 +2988,9 @@ mysql_execute_command(THD *thd) ...@@ -2979,6 +2988,9 @@ mysql_execute_command(THD *thd)
*/ */
if (thd->slave_thread) if (thd->slave_thread)
lex->drop_if_exists= 1; lex->drop_if_exists= 1;
/* So that DROP TEMPORARY TABLE gets flushed to binlog */
thd->options|= (OPTION_STATUS_NO_TRANS_UPDATE);
} }
res= mysql_rm_table(thd,tables,lex->drop_if_exists, lex->drop_temporary); res= mysql_rm_table(thd,tables,lex->drop_if_exists, lex->drop_temporary);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment