1
include/master-slave.inc
3
CREATE TABLE t1(c1 INT);
4
show binlog events from <binlog_start>;
5
Log_name Pos Event_type Server_id End_log_pos Info
6
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
9
# ------------------------------------------------------------------
10
# In a statement, some CCs are applied while others are not. The CCs
11
# which are not applied on master will be binlogged as common comments.
12
/*!99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!99999 ,(11)*/;
13
show binlog events from <binlog_start>;
14
Log_name Pos Event_type Server_id End_log_pos Info
15
master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/
16
include/diff_tables.inc [master:t1,slave:t1]
19
# -----------------------------------------------------------------
20
# Verify whether it can be binlogged correctly when executing prepared
22
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/';
25
CREATE TABLE t1(c1 INT);
27
include/diff_tables.inc [master:t1,slave:t1]
30
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/';
31
EXECUTE stmt USING @value;
33
CREATE TABLE t1(c1 INT);
34
EXECUTE stmt USING @value;
35
show binlog events from <binlog_start>;
36
Log_name Pos Event_type Server_id End_log_pos Info
37
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/
38
master-bin.000001 # Query # # use `test`; DROP TABLE t1
39
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
40
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/
41
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/
42
master-bin.000001 # Query # # use `test`; DROP TABLE t1
43
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
44
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/
45
include/diff_tables.inc [master:t1,slave:t1]
48
# -----------------------------------------------------------------
49
# Verify it can restore the '!', if the it is an uncomplete conditional
51
SELECT c1 FROM /*!99999 t1 WHEREN;
52
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!99999 t1 WHEREN' at line 1