Debian Codegraph @

mysql-test/suite/rpl/r/rpl_conditional_comments.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 CREATE TABLE t1(c1 INT);
7 include/show_binlog_events.inc
8 Log_name Pos Event_type Server_id End_log_pos Info
9 master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
10
11 # Case 1:
12 # ------------------------------------------------------------------
13 # In a statement, some CCs are applied while others are not. The CCs
14 # which are not applied on master will be binlogged as common comments.
15 /*!99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!99999 ,(11)*/;
16 include/show_binlog_events.inc
17 Log_name Pos Event_type Server_id End_log_pos Info
18 master-bin.000001 # Query # # BEGIN
19 master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/
20 master-bin.000001 # Query # # COMMIT
21 include/sync_slave_sql_with_master.inc
22 include/diff_tables.inc [master:t1,slave:t1]
23
24 # Case 2:
25 # -----------------------------------------------------------------
26 # Verify whether it can be binlogged correctly when executing prepared
27 # statement.
28 PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/';
29 EXECUTE stmt;
30 DROP TABLE t1;
31 CREATE TABLE t1(c1 INT);
32 EXECUTE stmt;
33 include/sync_slave_sql_with_master.inc
34 include/diff_tables.inc [master:t1,slave:t1]
35
36 SET @value=62;
37 PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/';
38 EXECUTE stmt USING @value;
39 DROP TABLE t1;
40 CREATE TABLE t1(c1 INT);
41 EXECUTE stmt USING @value;
42 include/show_binlog_events.inc
43 Log_name Pos Event_type Server_id End_log_pos Info
44 master-bin.000001 # Query # # BEGIN
45 master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/
46 master-bin.000001 # Query # # COMMIT
47 master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
48 master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
49 master-bin.000001 # Query # # BEGIN
50 master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/
51 master-bin.000001 # Query # # COMMIT
52 master-bin.000001 # Query # # BEGIN
53 master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/
54 master-bin.000001 # Query # # COMMIT
55 master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
56 master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
57 master-bin.000001 # Query # # BEGIN
58 master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/
59 master-bin.000001 # Query # # COMMIT
60 include/sync_slave_sql_with_master.inc
61 include/diff_tables.inc [master:t1,slave:t1]
62
63 # Case 3:
64 # -----------------------------------------------------------------
65 # Verify it can restore the '!', if the it is an uncomplete conditional
66 # comments
67 SELECT c1 FROM /*!99999 t1 WHEREN;
68 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
69 #
70 # Bug#53373 Comments are not properly removed from the
71 # pre-processed query buffer.
72 #
73 CREATE/*!*/EVENT e1 ON SCHEDULE EVERY 10 DAY DO/*!*/SELECT 'abc';
74 include/show_binlog_events.inc
75 Log_name Pos Event_type Server_id End_log_pos Info
76 master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY 10 DAY DO SELECT 'abc'
77 DROP TABLE t1;
78 DROP EVENT e1;
79 include/rpl_end.inc