Commit e1fb88f2 authored by He Zhenxing's avatar He Zhenxing

Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam

parents 88e84c1f 5dd1abae
...@@ -9,10 +9,10 @@ EXECUTE stmt1 USING @var1; ...@@ -9,10 +9,10 @@ EXECUTE stmt1 USING @var1;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
SELECT HEX(f1) FROM t1; SELECT HEX(f1) FROM t1;
HEX(f1) HEX(f1)
8300 8300
......
...@@ -100,15 +100,15 @@ drop table tt1, t1; ...@@ -100,15 +100,15 @@ drop table tt1, t1;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Query # # use `test`; create table t1 (a int)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # drop database if exists mysqltest1 master-bin.000001 # Query # # drop database if exists mysqltest1
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
FLUSH STATUS; FLUSH STATUS;
show databases; show databases;
......
...@@ -66,49 +66,49 @@ COMMIT; ...@@ -66,49 +66,49 @@ COMMIT;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6) master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6)
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 2*a WHERE a > 1 master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 2*a WHERE a > 1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
......
...@@ -9,7 +9,7 @@ commit; ...@@ -9,7 +9,7 @@ commit;
*** Results of the test: the binlog must have only Write_rows events not any Update_rows *** *** Results of the test: the binlog must have only Write_rows events not any Update_rows ***
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
...@@ -24,7 +24,7 @@ commit; ...@@ -24,7 +24,7 @@ commit;
*** Results of the test: the binlog must have only one Write_rows event not two *** *** Results of the test: the binlog must have only one Write_rows event not two ***
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
......
...@@ -17,16 +17,16 @@ TRUNCATE t1b; ...@@ -17,16 +17,16 @@ TRUNCATE t1b;
TRUNCATE t1n; TRUNCATE t1n;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f mysqld-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f
mysqld-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c mysqld-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) mysqld-bin.000001 # Table_map # # table_id: # (test.t1n)
mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
...@@ -48,9 +48,9 @@ TRUNCATE t1b; ...@@ -48,9 +48,9 @@ TRUNCATE t1b;
TRUNCATE t1n; TRUNCATE t1n;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) mysqld-bin.000001 # Table_map # # table_id: # (test.t1n)
...@@ -73,14 +73,14 @@ UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; ...@@ -73,14 +73,14 @@ UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Table_map # # table_id: # (test.t1m) mysqld-bin.000001 # Table_map # # table_id: # (test.t1m)
mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Table_map # # table_id: # (test.t1b) mysqld-bin.000001 # Table_map # # table_id: # (test.t1b)
mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Table_map # # table_id: # (test.t1n) mysqld-bin.000001 # Table_map # # table_id: # (test.t1n)
mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
......
...@@ -12,11 +12,11 @@ show binlog events from <binlog_start>; ...@@ -12,11 +12,11 @@ show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
...@@ -29,7 +29,7 @@ drop table t1; ...@@ -29,7 +29,7 @@ drop table t1;
show binlog events in 'master-bin.000001' from 106; show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
...@@ -249,7 +249,7 @@ show binlog events from 0; ...@@ -249,7 +249,7 @@ show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
master-bin.000001 205 Query 1 273 use `test`; BEGIN master-bin.000001 205 Query 1 273 BEGIN
master-bin.000001 273 Table_map 1 314 table_id: # (test.t1) master-bin.000001 273 Table_map 1 314 table_id: # (test.t1)
master-bin.000001 314 Write_rows 1 348 table_id: # flags: STMT_END_F master-bin.000001 314 Write_rows 1 348 table_id: # flags: STMT_END_F
master-bin.000001 348 Table_map 1 389 table_id: # (test.t1) master-bin.000001 348 Table_map 1 389 table_id: # (test.t1)
...@@ -266,7 +266,7 @@ show binlog events from 0; ...@@ -266,7 +266,7 @@ show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb
master-bin.000001 206 Query 1 274 use `test`; BEGIN master-bin.000001 206 Query 1 274 BEGIN
master-bin.000001 274 Table_map 1 315 table_id: # (test.t1) master-bin.000001 274 Table_map 1 315 table_id: # (test.t1)
master-bin.000001 315 Write_rows 1 349 table_id: # flags: STMT_END_F master-bin.000001 315 Write_rows 1 349 table_id: # flags: STMT_END_F
master-bin.000001 349 Table_map 1 390 table_id: # (test.t1) master-bin.000001 349 Table_map 1 390 table_id: # (test.t1)
...@@ -1085,10 +1085,10 @@ show binlog events from 0; ...@@ -1085,10 +1085,10 @@ show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
master-bin.000001 227 Query 1 295 use `test`; BEGIN master-bin.000001 227 Query 1 295 BEGIN
master-bin.000001 295 Table_map 1 337 table_id: # (test.t1) master-bin.000001 295 Table_map 1 337 table_id: # (test.t1)
master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F
master-bin.000001 383 Query 1 452 use `test`; COMMIT master-bin.000001 383 Query 1 452 COMMIT
master-bin.000001 452 Query 1 528 use `test`; drop table t1 master-bin.000001 452 Query 1 528 use `test`; drop table t1
reset master; reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
...@@ -1192,32 +1192,32 @@ use test; ...@@ -1192,32 +1192,32 @@ use test;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Query # # use `test`; create table t1 (a int)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) )
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) )
master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3,tt1; drop table t1,t2,t3,tt1;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert delayed into t1 values (207); insert delayed into t1 values (207);
...@@ -1227,46 +1227,46 @@ FLUSH TABLES; ...@@ -1227,46 +1227,46 @@ FLUSH TABLES;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Query # # use `test`; create table t1 (a int)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) )
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) )
master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; FLUSH TABLES master-bin.000001 # Query # # use `test`; FLUSH TABLES
insert delayed into t1 values (null),(null),(null),(null); insert delayed into t1 values (null),(null),(null),(null);
insert delayed into t1 values (null),(null),(400),(null); insert delayed into t1 values (null),(null),(400),(null);
......
...@@ -5,16 +5,15 @@ reset master; ...@@ -5,16 +5,15 @@ reset master;
insert into t2 values (@v); insert into t2 values (@v);
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
flush logs; flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/; DELIMITER /*!*/;
ROLLBACK/*!*/; ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=10000/*!*/; SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
......
...@@ -8,10 +8,10 @@ insert into t1 select * from t2; ...@@ -8,10 +8,10 @@ insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 'a' ERROR 23000: Duplicate entry '2' for key 'a'
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; ROLLBACK master-bin.000001 # Query # # ROLLBACK
select * from t1; select * from t1;
a a
1 1
......
...@@ -6,7 +6,7 @@ show binlog events; ...@@ -6,7 +6,7 @@ show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: # master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: #
master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 213 Query 1 281 use `test`; BEGIN master-bin.000001 213 Query 1 281 BEGIN
master-bin.000001 281 Query 1 371 use `test`; insert into t1 values (1,2) master-bin.000001 281 Query 1 371 use `test`; insert into t1 values (1,2)
master-bin.000001 371 Xid 1 398 COMMIT /* XID */ master-bin.000001 371 Xid 1 398 COMMIT /* XID */
drop table t1; drop table t1;
...@@ -24,10 +24,10 @@ show binlog events from <binlog_start>; ...@@ -24,10 +24,10 @@ show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert t1 values (5) master-bin.000001 # Query # # use `test`; insert t1 values (5)
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert t2 values (5) master-bin.000001 # Query # # use `test`; insert t2 values (5)
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
drop table t1,t2; drop table t1,t2;
...@@ -39,7 +39,7 @@ drop table t1; ...@@ -39,7 +39,7 @@ drop table t1;
show binlog events in 'master-bin.000001' from 106; show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4)
master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4)
master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4)
...@@ -159,7 +159,7 @@ show binlog events from 0; ...@@ -159,7 +159,7 @@ show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
master-bin.000001 205 Query 1 273 use `test`; BEGIN master-bin.000001 205 Query 1 273 BEGIN
master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1) master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1)
master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2) master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2)
master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3) master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3)
...@@ -173,7 +173,7 @@ show binlog events from 0; ...@@ -173,7 +173,7 @@ show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb
master-bin.000001 206 Query 1 274 use `test`; BEGIN master-bin.000001 206 Query 1 274 BEGIN
master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 ) master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 )
master-bin.000001 365 Query 1 456 use `test`; insert into t1 values( 399 ) master-bin.000001 365 Query 1 456 use `test`; insert into t1 values( 399 )
master-bin.000001 456 Query 1 547 use `test`; insert into t1 values( 398 ) master-bin.000001 456 Query 1 547 use `test`; insert into t1 values( 398 )
...@@ -730,18 +730,18 @@ master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('An ...@@ -730,18 +730,18 @@ master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('An
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1 master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; FLUSH TABLES master-bin.000001 # Query # # use `test`; FLUSH TABLES
insert delayed into t1 values (null),(null),(null),(null); insert delayed into t1 values (null),(null),(null),(null);
insert delayed into t1 values (null),(null),(400),(null); insert delayed into t1 values (null),(null),(400),(null);
......
...@@ -109,35 +109,35 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -109,35 +109,35 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; drop table t1,t2
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; delete from t1 where a=10 master-bin.000001 # Query # # use `test`; delete from t1 where a=10
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; update t1 set a=11 where a=15 master-bin.000001 # Query # # use `test`; update t1 set a=11 where a=15
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert into t1 values(1) master-bin.000001 # Query # # use `test`; insert into t1 values(1)
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert ignore into t1 values(1) master-bin.000001 # Query # # use `test`; insert ignore into t1 values(1)
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; replace into t1 values(100) master-bin.000001 # Query # # use `test`; replace into t1 values(100)
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/words.dat' into table t2 ;file_id=# master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/words.dat' into table t2 ;file_id=#
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; alter table t1 add b int master-bin.000001 # Query # # use `test`; alter table t1 add b int
master-bin.000001 # Query # # use `test`; alter table t1 drop b master-bin.000001 # Query # # use `test`; alter table t1 drop b
master-bin.000001 # Query # # use `test`; create table t3 like t1 master-bin.000001 # Query # # use `test`; create table t3 like t1
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert into t1 select * from t3 master-bin.000001 # Query # # use `test`; insert into t1 select * from t3
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; replace into t1 select * from t3 master-bin.000001 # Query # # use `test`; replace into t1 select * from t3
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3; drop table t1,t2,t3;
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
INSERT DELAYED INTO t1 VALUES(1); INSERT DELAYED INTO t1 VALUES(1);
...@@ -167,9 +167,9 @@ show binlog events; ...@@ -167,9 +167,9 @@ show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert into t1 values(1) master-bin.000001 # Query # # use `test`; insert into t1 values(1)
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
drop table if exists t1; drop table if exists t1;
reset master; reset master;
create table t1 (a int auto_increment, primary key (a)) engine=blackhole; create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
...@@ -181,16 +181,16 @@ insert into t1 values (55), (NULL); ...@@ -181,16 +181,16 @@ insert into t1 values (55), (NULL);
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Intvar 1 # INSERT_ID=1
master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL) master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL)
master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Intvar 1 # INSERT_ID=3
master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL) master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL)
master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Intvar 1 # INSERT_ID=5 master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL) master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL)
master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # COMMIT
drop table t1; drop table t1;
...@@ -65,10 +65,10 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES(2) ...@@ -65,10 +65,10 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES(2)
master-bin.000001 # Query # # use `test`; INSERT INTO t1 SELECT * FROM t2 WHERE GET_LOCK('Bug#34306', 120) master-bin.000001 # Query # # use `test`; INSERT INTO t1 SELECT * FROM t2 WHERE GET_LOCK('Bug#34306', 120)
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (3) master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (3)
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (4) master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (4)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
SET GLOBAL BINLOG_FORMAT = @saved_global_binlog_format; SET GLOBAL BINLOG_FORMAT = @saved_global_binlog_format;
......
...@@ -15,15 +15,15 @@ COMMIT; ...@@ -15,15 +15,15 @@ COMMIT;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c
mysqld-bin.000001 # Query # # use `test`; BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) mysqld-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2)
mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f
mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c
mysqld-bin.000001 # Query # # use `test`; COMMIT mysqld-bin.000001 # Query # # COMMIT
mysqld-bin.000001 # Query # # BEGIN mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Table_map # # table_id: # (test.t3) mysqld-bin.000001 # Table_map # # table_id: # (test.t3)
mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
......
...@@ -28,7 +28,7 @@ from mysql.ndb_apply_status; ...@@ -28,7 +28,7 @@ from mysql.ndb_apply_status;
show binlog events from <start_pos> limit 1; show binlog events from <start_pos> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN master-bin.000001 <start_pos> Query 1 # BEGIN
# Now the insert, one step after # Now the insert, one step after
...@@ -53,7 +53,7 @@ from mysql.ndb_apply_status; ...@@ -53,7 +53,7 @@ from mysql.ndb_apply_status;
<log_name> <start_pos> <end_pos> <log_name> <start_pos> <end_pos>
show binlog events from <start_pos> limit 1; show binlog events from <start_pos> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN master-bin.000001 <start_pos> Query 1 # BEGIN
show binlog events from <start_pos> limit 1,2; show binlog events from <start_pos> limit 1,2;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
......
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
use db1;
CREATE TABLE db1.t1 (a INT) ENGINE=InnoDB;
CREATE TABLE db1.t2 (s CHAR(255)) ENGINE=MyISAM;
include/stop_slave.inc
[on master]
CREATE PROCEDURE db1.p1 ()
BEGIN
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
END//
CREATE PROCEDURE db1.p2 ()
BEGIN
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
INSERT INTO t2 VALUES ('executed db1.p2()');
END//
INSERT INTO db1.t2 VALUES ('before call db1.p1()');
use test;
BEGIN;
CALL db1.p1();
COMMIT;
INSERT INTO db1.t2 VALUES ('after call db1.p1()');
SELECT * FROM db1.t1;
a
1
2
3
4
5
SELECT * FROM db1.t2;
s
before call db1.p1()
after call db1.p1()
[on slave]
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS;
#
# If we got non-zero here, then we're suffering BUG#43263
#
SELECT 0 as 'Must be 0';
Must be 0
0
SELECT * from db1.t1;
a
1
2
3
4
5
SELECT * from db1.t2;
s
before call db1.p1()
[on master]
INSERT INTO db1.t2 VALUES ('before call db1.p2()');
BEGIN;
CALL db1.p2();
ROLLBACK;
INSERT INTO db1.t2 VALUES ('after call db1.p2()');
SELECT * FROM db1.t1;
a
1
2
3
4
5
SELECT * FROM db1.t2;
s
before call db1.p1()
after call db1.p1()
before call db1.p2()
executed db1.p2()
after call db1.p2()
[on slave]
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS;
#
# If we got non-zero here, then we're suffering BUG#43263
#
SELECT 0 as 'Must be 0';
Must be 0
0
SELECT * from db1.t1;
a
1
2
3
4
5
SELECT * from db1.t2;
s
before call db1.p1()
executed db1.p2()
#
# Clean up
#
DROP DATABASE db1;
DROP DATABASE db1;
...@@ -23,7 +23,7 @@ master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 ...@@ -23,7 +23,7 @@ master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
master-bin.000001 106 Query 1 193 drop database if exists d1 master-bin.000001 106 Query 1 193 drop database if exists d1
master-bin.000001 193 Query 1 272 create database d1 master-bin.000001 193 Query 1 272 create database d1
master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb
master-bin.000001 370 Query 1 436 use `d1`; BEGIN master-bin.000001 370 Query 1 436 BEGIN
master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1)
master-bin.000001 521 Xid 1 548 COMMIT /* XID */ master-bin.000001 521 Xid 1 548 COMMIT /* XID */
master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y
...@@ -44,11 +44,11 @@ master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 ...@@ -44,11 +44,11 @@ master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
master-bin.000001 106 Query 1 193 drop database if exists d1 master-bin.000001 106 Query 1 193 drop database if exists d1
master-bin.000001 193 Query 1 272 create database d1 master-bin.000001 193 Query 1 272 create database d1
master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb
master-bin.000001 370 Query 1 436 use `d1`; BEGIN master-bin.000001 370 Query 1 436 BEGIN
master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1)
master-bin.000001 521 Xid 1 548 COMMIT /* XID */ master-bin.000001 521 Xid 1 548 COMMIT /* XID */
master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y
master-bin.000001 633 Query 1 699 use `d1`; BEGIN master-bin.000001 633 Query 1 699 BEGIN
master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2) master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2)
master-bin.000001 784 Xid 1 811 COMMIT /* XID */ master-bin.000001 784 Xid 1 811 COMMIT /* XID */
master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y
......
...@@ -19,10 +19,10 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -19,10 +19,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG)
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # COMMIT
**** On Slave **** **** On Slave ****
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
...@@ -68,9 +68,9 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -68,9 +68,9 @@ Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG)
slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
slave-bin.000001 # Query 1 # use `test`; BEGIN slave-bin.000001 # Query 1 # BEGIN
slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # use `test`; COMMIT slave-bin.000001 # Query 1 # COMMIT
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET @@global.binlog_format= @old_binlog_format; SET @@global.binlog_format= @old_binlog_format;
...@@ -28,10 +28,10 @@ INSERT INTO t2 VALUES (3,3), (4,4); ...@@ -28,10 +28,10 @@ INSERT INTO t2 VALUES (3,3), (4,4);
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
**** On Slave **** **** On Slave ****
SHOW DATABASES; SHOW DATABASES;
Database Database
...@@ -60,10 +60,10 @@ SHOW BINLOG EVENTS; ...@@ -60,10 +60,10 @@ SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT) master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 192 Query 1 260 use `test`; BEGIN master-bin.000001 192 Query 1 260 BEGIN
master-bin.000001 260 Table_map 1 301 table_id: # (test.t1) master-bin.000001 260 Table_map 1 301 table_id: # (test.t1)
master-bin.000001 301 Write_rows 1 340 table_id: # flags: STMT_END_F master-bin.000001 301 Write_rows 1 340 table_id: # flags: STMT_END_F
master-bin.000001 340 Query 1 409 use `test`; COMMIT master-bin.000001 340 Query 1 409 COMMIT
DROP TABLE t1; DROP TABLE t1;
================ Test for BUG#17620 ================ ================ Test for BUG#17620 ================
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;
......
...@@ -150,10 +150,10 @@ a b ...@@ -150,10 +150,10 @@ a b
SHOW BINLOG EVENTS FROM 106; SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) # 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
# 206 Query # 274 use `test`; BEGIN # 206 Query # 274 BEGIN
# 274 Table_map # 316 table_id: # (test.t7) # 274 Table_map # 316 table_id: # (test.t7)
# 316 Write_rows # 372 table_id: # flags: STMT_END_F # 316 Write_rows # 372 table_id: # flags: STMT_END_F
# 372 Query # 443 use `test`; ROLLBACK # 372 Query # 443 ROLLBACK
SELECT * FROM t7 ORDER BY a,b; SELECT * FROM t7 ORDER BY a,b;
a b a b
1 2 1 2
...@@ -173,10 +173,10 @@ Warnings: ...@@ -173,10 +173,10 @@ Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back Warning 1196 Some non-transactional changed tables couldn't be rolled back
SHOW BINLOG EVENTS FROM 106; SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
# 106 Query # 174 use `test`; BEGIN # 106 Query # 174 BEGIN
# 174 Table_map # 216 table_id: # (test.t7) # 174 Table_map # 216 table_id: # (test.t7)
# 216 Write_rows # 272 table_id: # flags: STMT_END_F # 216 Write_rows # 272 table_id: # flags: STMT_END_F
# 272 Query # 343 use `test`; ROLLBACK # 272 Query # 343 ROLLBACK
SELECT * FROM t7 ORDER BY a,b; SELECT * FROM t7 ORDER BY a,b;
a b a b
1 2 1 2
...@@ -299,35 +299,35 @@ a ...@@ -299,35 +299,35 @@ a
SHOW BINLOG EVENTS FROM 106; SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
# 192 Query # 260 use `test`; BEGIN # 192 Query # 260 BEGIN
# 260 Table_map # 301 table_id: # (test.t1) # 260 Table_map # 301 table_id: # (test.t1)
# 301 Write_rows # 345 table_id: # flags: STMT_END_F # 301 Write_rows # 345 table_id: # flags: STMT_END_F
# 345 Query # 414 use `test`; COMMIT # 345 Query # 414 COMMIT
# 414 Query # 482 use `test`; BEGIN # 414 Query # 482 BEGIN
# 482 Query # 607 use `test`; CREATE TABLE `t2` ( # 482 Query # 607 use `test`; CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=InnoDB ) ENGINE=InnoDB
# 607 Table_map # 648 table_id: # (test.t2) # 607 Table_map # 648 table_id: # (test.t2)
# 648 Write_rows # 692 table_id: # flags: STMT_END_F # 648 Write_rows # 692 table_id: # flags: STMT_END_F
# 692 Xid # 719 COMMIT /* XID */ # 692 Xid # 719 COMMIT /* XID */
# 719 Query # 787 use `test`; BEGIN # 719 Query # 787 BEGIN
# 787 Query # 912 use `test`; CREATE TABLE `t3` ( # 787 Query # 912 use `test`; CREATE TABLE `t3` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=InnoDB ) ENGINE=InnoDB
# 912 Table_map # 953 table_id: # (test.t3) # 912 Table_map # 953 table_id: # (test.t3)
# 953 Write_rows # 997 table_id: # flags: STMT_END_F # 953 Write_rows # 997 table_id: # flags: STMT_END_F
# 997 Xid # 1024 COMMIT /* XID */ # 997 Xid # 1024 COMMIT /* XID */
# 1024 Query # 1092 use `test`; BEGIN # 1024 Query # 1092 BEGIN
# 1092 Query # 1217 use `test`; CREATE TABLE `t4` ( # 1092 Query # 1217 use `test`; CREATE TABLE `t4` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=InnoDB ) ENGINE=InnoDB
# 1217 Table_map # 1258 table_id: # (test.t4) # 1217 Table_map # 1258 table_id: # (test.t4)
# 1258 Write_rows # 1302 table_id: # flags: STMT_END_F # 1258 Write_rows # 1302 table_id: # flags: STMT_END_F
# 1302 Xid # 1329 COMMIT /* XID */ # 1302 Xid # 1329 COMMIT /* XID */
# 1329 Query # 1397 use `test`; BEGIN # 1329 Query # 1397 BEGIN
# 1397 Table_map # 1438 table_id: # (test.t1) # 1397 Table_map # 1438 table_id: # (test.t1)
# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F # 1438 Write_rows # 1482 table_id: # flags: STMT_END_F
# 1482 Query # 1553 use `test`; ROLLBACK # 1482 Query # 1553 ROLLBACK
SHOW TABLES; SHOW TABLES;
Tables_in_test Tables_in_test
t1 t1
...@@ -393,12 +393,12 @@ a ...@@ -393,12 +393,12 @@ a
SHOW BINLOG EVENTS FROM 106; SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
# 192 Query # 260 use `test`; BEGIN # 192 Query # 260 BEGIN
# 260 Table_map # 301 table_id: # (test.t1) # 260 Table_map # 301 table_id: # (test.t1)
# 301 Write_rows # 345 table_id: # flags: STMT_END_F # 301 Write_rows # 345 table_id: # flags: STMT_END_F
# 345 Query # 414 use `test`; COMMIT # 345 Query # 414 COMMIT
# 414 Query # 514 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB # 414 Query # 514 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
# 514 Query # 582 use `test`; BEGIN # 514 Query # 582 BEGIN
# 582 Table_map # 623 table_id: # (test.t2) # 582 Table_map # 623 table_id: # (test.t2)
# 623 Write_rows # 667 table_id: # flags: STMT_END_F # 623 Write_rows # 667 table_id: # flags: STMT_END_F
# 667 Table_map # 708 table_id: # (test.t2) # 667 Table_map # 708 table_id: # (test.t2)
...@@ -431,12 +431,12 @@ SELECT * FROM t2 ORDER BY a; ...@@ -431,12 +431,12 @@ SELECT * FROM t2 ORDER BY a;
a a
SHOW BINLOG EVENTS FROM 106; SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
# 106 Query # 174 use `test`; BEGIN # 106 Query # 174 BEGIN
# 174 Table_map # 215 table_id: # (test.t2) # 174 Table_map # 215 table_id: # (test.t2)
# 215 Write_rows # 259 table_id: # flags: STMT_END_F # 215 Write_rows # 259 table_id: # flags: STMT_END_F
# 259 Table_map # 300 table_id: # (test.t2) # 259 Table_map # 300 table_id: # (test.t2)
# 300 Write_rows # 339 table_id: # flags: STMT_END_F # 300 Write_rows # 339 table_id: # flags: STMT_END_F
# 339 Query # 410 use `test`; ROLLBACK # 339 Query # 410 ROLLBACK
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2 ORDER BY a;
a a
DROP TABLE t1,t2; DROP TABLE t1,t2;
...@@ -468,12 +468,12 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -468,12 +468,12 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # DROP DATABASE IF EXISTS mysqltest1 master-bin.000001 # Query # # DROP DATABASE IF EXISTS mysqltest1
master-bin.000001 # Query # # CREATE DATABASE mysqltest1 master-bin.000001 # Query # # CREATE DATABASE mysqltest1
master-bin.000001 # Query # # use `test`; CREATE TABLE mysqltest1.without_select (f1 BIGINT) master-bin.000001 # Query # # use `test`; CREATE TABLE mysqltest1.without_select (f1 BIGINT)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; CREATE TABLE `mysqltest1`.`with_select` ( master-bin.000001 # Query # # use `test`; CREATE TABLE `mysqltest1`.`with_select` (
`f1` int(1) NOT NULL DEFAULT '0' `f1` int(1) NOT NULL DEFAULT '0'
) )
master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select) master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
DROP DATABASE mysqltest1; DROP DATABASE mysqltest1;
end of the tests end of the tests
...@@ -20,23 +20,23 @@ show binlog events; ...@@ -20,23 +20,23 @@ show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # COMMIT
master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # COMMIT
show binlog events from 106 limit 1; show binlog events from 106 limit 1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
show binlog events from 106 limit 2; show binlog events from 106 limit 2;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
show binlog events from 106 limit 2,1; show binlog events from 106 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
...@@ -192,26 +192,26 @@ insert into t2 values (1); ...@@ -192,26 +192,26 @@ insert into t2 values (1);
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=4 master-bin.000001 # Rotate # # master-bin.000002;pos=4
show binlog events in 'master-bin.000002'; show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
master-bin.000002 # Query 1 # use `test`; BEGIN master-bin.000002 # Query 1 # BEGIN
master-bin.000002 # Table_map 1 # table_id: # (test.t2) master-bin.000002 # Table_map 1 # table_id: # (test.t2)
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Query 1 # use `test`; COMMIT master-bin.000002 # Query 1 # COMMIT
show binary logs; show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 # master-bin.000001 #
...@@ -224,26 +224,26 @@ show binlog events in 'slave-bin.000001' from 4; ...@@ -224,26 +224,26 @@ show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
slave-bin.000001 # Query 1 # use `test`; BEGIN slave-bin.000001 # Query 1 # BEGIN
slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # use `test`; COMMIT slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; drop table t1
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
slave-bin.000001 # Query 1 # use `test`; BEGIN slave-bin.000001 # Query 1 # BEGIN
slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # use `test`; COMMIT slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4; show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Query 1 # use `test`; BEGIN slave-bin.000002 # Query 1 # BEGIN
slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000002 # Query 1 # use `test`; COMMIT slave-bin.000002 # Query 1 # COMMIT
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
...@@ -301,14 +301,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); ...@@ -301,14 +301,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
select * from t1; select * from t1;
a b a b
1 1 1 1
......
...@@ -20,13 +20,13 @@ show binlog events; ...@@ -20,13 +20,13 @@ show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Xid 1 # COMMIT /* XID */
master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Xid 1 # COMMIT /* XID */
...@@ -36,7 +36,7 @@ master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_in ...@@ -36,7 +36,7 @@ master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_in
show binlog events from 106 limit 2; show binlog events from 106 limit 2;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # BEGIN
show binlog events from 106 limit 2,1; show binlog events from 106 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
...@@ -192,13 +192,13 @@ insert into t2 values (1); ...@@ -192,13 +192,13 @@ insert into t2 values (1);
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
...@@ -208,7 +208,7 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -208,7 +208,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB
master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB
master-bin.000002 # Query 1 # use `test`; BEGIN master-bin.000002 # Query 1 # BEGIN
master-bin.000002 # Table_map 1 # table_id: # (test.t2) master-bin.000002 # Table_map 1 # table_id: # (test.t2)
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Xid 1 # COMMIT /* XID */ master-bin.000002 # Xid 1 # COMMIT /* XID */
...@@ -301,14 +301,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); ...@@ -301,14 +301,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
select * from t1; select * from t1;
a b a b
1 1 1 1
......
...@@ -17,20 +17,20 @@ show binlog events from <binlog_start>; ...@@ -17,20 +17,20 @@ show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Update_rows # # table_id: # master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
SELECT * FROM t1; SELECT * FROM t1;
a b a b
1 1 1 1
......
source include/master-slave.inc;
source include/have_innodb.inc;
source include/have_binlog_format_statement.inc;
disable_warnings;
DROP DATABASE IF EXISTS db1;
enable_warnings;
CREATE DATABASE db1;
use db1;
CREATE TABLE db1.t1 (a INT) ENGINE=InnoDB;
CREATE TABLE db1.t2 (s CHAR(255)) ENGINE=MyISAM;
sync_slave_with_master;
source include/stop_slave.inc;
connection master;
echo [on master];
DELIMITER //;
CREATE PROCEDURE db1.p1 ()
BEGIN
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
END//
CREATE PROCEDURE db1.p2 ()
BEGIN
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
INSERT INTO t2 VALUES ('executed db1.p2()');
END//
DELIMITER ;//
INSERT INTO db1.t2 VALUES ('before call db1.p1()');
# Note: the master_log_pos is set to be the position of the BEGIN + 1,
# so before fix of BUG#43263 if the BEGIN is ignored, then all the
# INSERTS in p1 will be replicated in AUTOCOMMIT=1 mode and the slave
# SQL thread will stop right before the first INSERT. After fix of
# BUG#43263, BEGIN will not be ignored by the replication db rules,
# and then the whole transaction will be executed before slave SQL
# stop.
let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
let $master_pos= `SELECT $master_pos + 1`;
use test;
BEGIN;
CALL db1.p1();
COMMIT;
# The position where the following START SLAVE UNTIL will stop at
let $master_end_trans_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
INSERT INTO db1.t2 VALUES ('after call db1.p1()');
SELECT * FROM db1.t1;
SELECT * FROM db1.t2;
connection slave;
echo [on slave];
replace_result $master_pos MASTER_POS;
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_pos;
source include/wait_for_slave_sql_to_stop.inc;
let $slave_sql_stop_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
let $result= query_get_value(SELECT $slave_sql_stop_pos - $master_end_trans_pos as result, result, 1);
--echo #
--echo # If we got non-zero here, then we're suffering BUG#43263
--echo #
eval SELECT $result as 'Must be 0';
SELECT * from db1.t1;
SELECT * from db1.t2;
connection master;
echo [on master];
INSERT INTO db1.t2 VALUES ('before call db1.p2()');
# See comments above.
let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
let $master_pos= `SELECT $master_pos + 1`;
BEGIN;
CALL db1.p2();
disable_warnings;
ROLLBACK;
enable_warnings;
let $master_end_trans_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
INSERT INTO db1.t2 VALUES ('after call db1.p2()');
SELECT * FROM db1.t1;
SELECT * FROM db1.t2;
connection slave;
echo [on slave];
replace_result $master_pos MASTER_POS;
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_pos;
source include/wait_for_slave_sql_to_stop.inc;
let $slave_sql_stop_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
let $result= query_get_value(SELECT $slave_sql_stop_pos - $master_end_trans_pos as result, result, 1);
--echo #
--echo # If we got non-zero here, then we're suffering BUG#43263
--echo #
eval SELECT $result as 'Must be 0';
SELECT * from db1.t1;
SELECT * from db1.t2;
--echo #
--echo # Clean up
--echo #
connection master;
DROP DATABASE db1;
connection slave;
DROP DATABASE db1;
...@@ -317,14 +317,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); ...@@ -317,14 +317,14 @@ insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # COMMIT
select * from t1; select * from t1;
a b a b
1 1 1 1
......
...@@ -28,7 +28,7 @@ from mysql.ndb_apply_status; ...@@ -28,7 +28,7 @@ from mysql.ndb_apply_status;
show binlog events from <start_pos> limit 1; show binlog events from <start_pos> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN master-bin.000001 <start_pos> Query 1 # BEGIN
# Now the insert, one step after # Now the insert, one step after
...@@ -53,7 +53,7 @@ from mysql.ndb_apply_status; ...@@ -53,7 +53,7 @@ from mysql.ndb_apply_status;
<log_name> <start_pos> <end_pos> <log_name> <start_pos> <end_pos>
show binlog events from <start_pos> limit 1; show binlog events from <start_pos> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN master-bin.000001 <start_pos> Query 1 # BEGIN
show binlog events from <start_pos> limit 1,2; show binlog events from <start_pos> limit 1,2;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
......
...@@ -1502,7 +1502,8 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all) ...@@ -1502,7 +1502,8 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all)
YESNO(thd->transaction.stmt.modified_non_trans_table))); YESNO(thd->transaction.stmt.modified_non_trans_table)));
if (!in_transaction || all) if (!in_transaction || all)
{ {
Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE); Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"),
TRUE, TRUE, THD::KILLED_NO_VALUE);
qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE)
error= binlog_end_trans(thd, trx_data, &qev, all); error= binlog_end_trans(thd, trx_data, &qev, all);
goto end; goto end;
...@@ -1557,7 +1558,8 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) ...@@ -1557,7 +1558,8 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all)
transactional table in that statement as well, which needs to be transactional table in that statement as well, which needs to be
rolled back on the slave. rolled back on the slave.
*/ */
Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE); Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"),
TRUE, TRUE, THD::KILLED_NO_VALUE);
qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE)
error= binlog_end_trans(thd, trx_data, &qev, all); error= binlog_end_trans(thd, trx_data, &qev, all);
} }
...@@ -4370,7 +4372,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event) ...@@ -4370,7 +4372,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event)
transaction is either a BEGIN..COMMIT block or a single transaction is either a BEGIN..COMMIT block or a single
statement in autocommit mode. statement in autocommit mode.
*/ */
Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"), TRUE, FALSE); Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"), TRUE, TRUE);
/* /*
Imagine this is rollback due to net timeout, after all Imagine this is rollback due to net timeout, after all
statements of the transaction succeeded. Then we want a statements of the transaction succeeded. Then we want a
......
...@@ -3008,7 +3008,10 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli, ...@@ -3008,7 +3008,10 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli,
::do_apply_event(), then the companion SET also have so ::do_apply_event(), then the companion SET also have so
we don't need to reset_one_shot_variables(). we don't need to reset_one_shot_variables().
*/ */
if (rpl_filter->db_ok(thd->db)) if (!strncmp(query_arg, "BEGIN", q_len_arg) ||
!strncmp(query_arg, "COMMIT", q_len_arg) ||
!strncmp(query_arg, "ROLLBACK", q_len_arg) ||
rpl_filter->db_ok(thd->db))
{ {
thd->set_time((time_t)when); thd->set_time((time_t)when);
thd->query_length= q_len_arg; thd->query_length= q_len_arg;
......
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