~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_conditional_comments.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include/master-slave.inc
 
2
[connection master]
 
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)
 
7
 
 
8
# Case 1:
 
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]
 
17
 
 
18
# Case 2:
 
19
# -----------------------------------------------------------------
 
20
# Verify whether it can be binlogged correctly when executing prepared
 
21
# statement.
 
22
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/';
 
23
EXECUTE stmt;
 
24
DROP TABLE t1;
 
25
CREATE TABLE t1(c1 INT);
 
26
EXECUTE stmt;
 
27
include/diff_tables.inc [master:t1,slave:t1]
 
28
 
 
29
SET @value=62;
 
30
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/';
 
31
EXECUTE stmt USING @value;
 
32
DROP TABLE t1;
 
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]
 
46
 
 
47
# Case 3:
 
48
# -----------------------------------------------------------------
 
49
# Verify it can restore the '!', if the it is an uncomplete conditional
 
50
# comments
 
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
 
53
DROP TABLE t1;
 
54
include/rpl_end.inc