Merge lp:~laurynas-biveinis/percona-server/bug1280875-5.5 into lp:percona-server/5.5

Proposed by Laurynas Biveinis on 2014-07-29
Status: Merged
Approved by: Laurynas Biveinis on 2014-07-29
Approved revision: 671
Merged at revision: 686
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1280875-5.5
Merge into: lp:percona-server/5.5
Diff against target: 342 lines (+58/-58)
2 files modified
mysql-test/suite/rpl/r/rpl_mdev382.result (+41/-41)
mysql-test/suite/rpl/t/rpl_mdev382.test (+17/-17)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1280875-5.5
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve on 2014-07-29
Review via email: mp+228607@code.launchpad.net
To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mysql-test/suite/rpl/r/rpl_mdev382.result'
--- mysql-test/suite/rpl/r/rpl_mdev382.result 2013-06-26 07:01:13 +0000
+++ mysql-test/suite/rpl/r/rpl_mdev382.result 2014-07-29 07:39:09 +0000
@@ -77,8 +77,8 @@
77master-bin.000001 # Xid # # COMMIT /* XID */77master-bin.000001 # Xid # # COMMIT /* XID */
78*** Test correct USE statement in SHOW BINLOG EVENTS ***78*** Test correct USE statement in SHOW BINLOG EVENTS ***
79set sql_mode = 'ANSI_QUOTES';79set sql_mode = 'ANSI_QUOTES';
80CREATE DATABASE "db1`; SELECT 'oops!'";80CREATE DATABASE "db1`; select 'oops!'";
81use "db1`; SELECT 'oops!'";81use "db1`; select 'oops!'";
82CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM;82CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM;
83INSERT INTO t1 VALUES (1);83INSERT INTO t1 VALUES (1);
84set sql_mode = '';84set sql_mode = '';
@@ -86,41 +86,41 @@
86set sql_mode = 'ANSI_QUOTES';86set sql_mode = 'ANSI_QUOTES';
87show binlog events from <binlog_start>;87show binlog events from <binlog_start>;
88Log_name Pos Event_type Server_id End_log_pos Info88Log_name Pos Event_type Server_id End_log_pos Info
89master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'"89master-bin.000001 # Query # # CREATE DATABASE "db1`; select 'oops!'"
90master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM90master-bin.000001 # Query # # use "db1`; select 'oops!'"; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
91master-bin.000001 # Query # # BEGIN91master-bin.000001 # Query # # BEGIN
92master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; INSERT INTO t1 VALUES (1)92master-bin.000001 # Query # # use "db1`; select 'oops!'"; INSERT INTO t1 VALUES (1)
93master-bin.000001 # Query # # COMMIT93master-bin.000001 # Query # # COMMIT
94master-bin.000001 # Query # # BEGIN94master-bin.000001 # Query # # BEGIN
95master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; INSERT INTO t1 VALUES (2)95master-bin.000001 # Query # # use "db1`; select 'oops!'"; INSERT INTO t1 VALUES (2)
96master-bin.000001 # Query # # COMMIT96master-bin.000001 # Query # # COMMIT
97set sql_mode = '';97set sql_mode = '';
98set sql_quote_show_create = 0;98set sql_quote_show_create = 0;
99show binlog events from <binlog_start>;99show binlog events from <binlog_start>;
100Log_name Pos Event_type Server_id End_log_pos Info100Log_name Pos Event_type Server_id End_log_pos Info
101master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'"101master-bin.000001 # Query # # CREATE DATABASE "db1`; select 'oops!'"
102master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM102master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
103master-bin.000001 # Query # # BEGIN103master-bin.000001 # Query # # BEGIN
104master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (1)104master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (1)
105master-bin.000001 # Query # # COMMIT105master-bin.000001 # Query # # COMMIT
106master-bin.000001 # Query # # BEGIN106master-bin.000001 # Query # # BEGIN
107master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (2)107master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (2)
108master-bin.000001 # Query # # COMMIT108master-bin.000001 # Query # # COMMIT
109set sql_quote_show_create = 1;109set sql_quote_show_create = 1;
110show binlog events from <binlog_start>;110show binlog events from <binlog_start>;
111Log_name Pos Event_type Server_id End_log_pos Info111Log_name Pos Event_type Server_id End_log_pos Info
112master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'"112master-bin.000001 # Query # # CREATE DATABASE "db1`; select 'oops!'"
113master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM113master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
114master-bin.000001 # Query # # BEGIN114master-bin.000001 # Query # # BEGIN
115master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (1)115master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (1)
116master-bin.000001 # Query # # COMMIT116master-bin.000001 # Query # # COMMIT
117master-bin.000001 # Query # # BEGIN117master-bin.000001 # Query # # BEGIN
118master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (2)118master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (2)
119master-bin.000001 # Query # # COMMIT119master-bin.000001 # Query # # COMMIT
120DROP TABLE t1;120DROP TABLE t1;
121use test;121use test;
122***Test LOAD DATA INFILE with various identifiers that need correct quoting ***122***Test LOAD DATA INFILE with various identifiers that need correct quoting ***
123use `db1``; SELECT 'oops!'`;123use `db1``; select 'oops!'`;
124set timestamp=1000000000;124set timestamp=1000000000;
125CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),125CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
126`c``3` VARCHAR(7));126`c``3` VARCHAR(7));
@@ -134,32 +134,32 @@
134truncate `t``1`;134truncate `t``1`;
135use test;135use test;
136LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f''le.txt'136LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f''le.txt'
137 INTO TABLE `db1``; SELECT 'oops!'`.`t``1`137 INTO TABLE `db1``; select 'oops!'`.`t``1`
138 FIELDS TERMINATED BY ',' ESCAPED BY '\\' ENCLOSED BY ''''138 FIELDS TERMINATED BY ',' ESCAPED BY '\\' ENCLOSED BY ''''
139 LINES TERMINATED BY '\n'139 LINES TERMINATED BY '\n'
140 (`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!");140 (`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!");
141SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;141SELECT * FROM `db1``; select 'oops!'`.`t``1`;
142a`1 b`2 c`3142a`1 b`2 c`3
143fo\o bar |b"a'z!143fo\o bar |b"a'z!
144show binlog events from <binlog_start>;144show binlog events from <binlog_start>;
145Log_name Pos Event_type Server_id End_log_pos Info145Log_name Pos Event_type Server_id End_log_pos Info
146master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),146master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
147`c``3` VARCHAR(7))147`c``3` VARCHAR(7))
148master-bin.000001 # Query # # BEGIN148master-bin.000001 # Query # # BEGIN
149master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#149master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
150master-bin.000001 # Execute_load_query # # use `db1``; SELECT 'oops!'`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f\'le.txt' INTO TABLE `t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, @`b```) SET `b``2`= @`b```, `c``3`= concat('|', "b""a'z", "!") ;file_id=#150master-bin.000001 # Execute_load_query # # use `db1``; select 'oops!'`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f\'le.txt' INTO TABLE `t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, @`b```) SET `b``2`= @`b```, `c``3`= concat('|', "b""a'z", "!") ;file_id=#
151master-bin.000001 # Xid # # COMMIT /* XID */151master-bin.000001 # Xid # # COMMIT /* XID */
152master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; truncate `t``1`152master-bin.000001 # Query # # use `db1``; select 'oops!'`; truncate `t``1`
153master-bin.000001 # Query # # BEGIN153master-bin.000001 # Query # # BEGIN
154master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#154master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
155master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f\'le.txt' INTO TABLE `db1``; SELECT 'oops!'`.`t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, `b``2`) SET `c``3`= concat('|', "b""a'z", "!") ;file_id=#155master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f\'le.txt' INTO TABLE `db1``; select 'oops!'`.`t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, `b``2`) SET `c``3`= concat('|', "b""a'z", "!") ;file_id=#
156master-bin.000001 # Xid # # COMMIT /* XID */156master-bin.000001 # Xid # # COMMIT /* XID */
157/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;157/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
158/*!40019 SET @@session.max_insert_delayed_threads=0*/;158/*!40019 SET @@session.max_insert_delayed_threads=0*/;
159/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;159/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
160DELIMITER /*!*/;160DELIMITER /*!*/;
161ROLLBACK/*!*/;161ROLLBACK/*!*/;
162use `db1``; SELECT 'oops!'`/*!*/;162use `db1``; select 'oops!'`/*!*/;
163SET TIMESTAMP=1000000000/*!*/;163SET TIMESTAMP=1000000000/*!*/;
164SET @@session.pseudo_thread_id=999999999/*!*/;164SET @@session.pseudo_thread_id=999999999/*!*/;
165SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;165SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
@@ -187,7 +187,7 @@
187/*!*/;187/*!*/;
188use `test`/*!*/;188use `test`/*!*/;
189SET TIMESTAMP=1000000000/*!*/;189SET TIMESTAMP=1000000000/*!*/;
190LOAD DATA LOCAL INFILE '<name>' INTO TABLE `db1``; SELECT 'oops!'`.`t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, `b``2`) SET `c``3`= concat('|', "b""a'z", "!")190LOAD DATA LOCAL INFILE '<name>' INTO TABLE `db1``; select 'oops!'`.`t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, `b``2`) SET `c``3`= concat('|', "b""a'z", "!")
191/*!*/;191/*!*/;
192COMMIT/*!*/;192COMMIT/*!*/;
193DELIMITER ;193DELIMITER ;
@@ -195,10 +195,10 @@
195ROLLBACK /* added by mysqlbinlog */;195ROLLBACK /* added by mysqlbinlog */;
196/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;196/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
197/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;197/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
198SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;198SELECT * FROM `db1``; select 'oops!'`.`t``1`;
199a`1 b`2 c`3199a`1 b`2 c`3
200fo\o bar |b"a'z!200fo\o bar |b"a'z!
201DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;201DROP TABLE `db1``; select 'oops!'`.`t``1`;
202drop table t1,t2;202drop table t1,t2;
203*** Test truncation of long SET expression in LOAD DATA ***203*** Test truncation of long SET expression in LOAD DATA ***
204CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1000));204CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1000));
@@ -221,7 +221,7 @@
2212 A| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|A2212 A| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|A
222DROP TABLE t1;222DROP TABLE t1;
223*** Test user variables whose names require correct quoting ***223*** Test user variables whose names require correct quoting ***
224use `db1``; SELECT 'oops!'`;224use `db1``; select 'oops!'`;
225CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100));225CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100));
226INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100));226INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100));
227SELECT @`a``1`:=a1, @`a``2`:=a2, @`a``3`:=a3, @`a``4`:=a4, @`b```:=b, @```c`:=c, @```d```:=d FROM t1;227SELECT @`a``1`:=a1, @`a``2`:=a2, @`a``3`:=a3, @`a``4`:=a4, @`b```:=b, @```c`:=c, @```d```:=d FROM t1;
@@ -230,9 +230,9 @@
230INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98));230INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98));
231show binlog events from <binlog_start>;231show binlog events from <binlog_start>;
232Log_name Pos Event_type Server_id End_log_pos Info232Log_name Pos Event_type Server_id End_log_pos Info
233master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100))233master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100))
234master-bin.000001 # Query # # BEGIN234master-bin.000001 # Query # # BEGIN
235master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100))235master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100))
236master-bin.000001 # Xid # # COMMIT /* XID */236master-bin.000001 # Xid # # COMMIT /* XID */
237master-bin.000001 # Query # # BEGIN237master-bin.000001 # Query # # BEGIN
238master-bin.000001 # User var # # @`a``1`=-9223372036854775808238master-bin.000001 # User var # # @`a``1`=-9223372036854775808
@@ -242,14 +242,14 @@
242master-bin.000001 # User var # # @`b```=-1.234560123456789e125242master-bin.000001 # User var # # @`b```=-1.234560123456789e125
243master-bin.000001 # User var # # @```c`=-1234501234567890123456789012345678901234567890123456789.0123456789243master-bin.000001 # User var # # @```c`=-1234501234567890123456789012345678901234567890123456789.0123456789
244master-bin.000001 # User var # # @```d```=_latin1 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 COLLATE latin1_swedish_ci244master-bin.000001 # User var # # @```d```=_latin1 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 COLLATE latin1_swedish_ci
245master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98))245master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98))
246master-bin.000001 # Xid # # COMMIT /* XID */246master-bin.000001 # Xid # # COMMIT /* XID */
247/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;247/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
248/*!40019 SET @@session.max_insert_delayed_threads=0*/;248/*!40019 SET @@session.max_insert_delayed_threads=0*/;
249/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;249/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
250DELIMITER /*!*/;250DELIMITER /*!*/;
251ROLLBACK/*!*/;251ROLLBACK/*!*/;
252use `db1``; SELECT 'oops!'`/*!*/;252use `db1``; select 'oops!'`/*!*/;
253SET TIMESTAMP=1000000000/*!*/;253SET TIMESTAMP=1000000000/*!*/;
254SET @@session.pseudo_thread_id=999999999/*!*/;254SET @@session.pseudo_thread_id=999999999/*!*/;
255SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;255SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
@@ -287,44 +287,44 @@
287ROLLBACK /* added by mysqlbinlog */;287ROLLBACK /* added by mysqlbinlog */;
288/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;288/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
289/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;289/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
290SELECT * FROM `db1``; SELECT 'oops!'`.t1 ORDER BY a1;290SELECT * FROM `db1``; select 'oops!'`.t1 ORDER BY a1;
291a1 a2 a3 a4 b c d291a1 a2 a3 a4 b c d
292-9223372036854775808 42 9223372036854775807 18446744073709551615 -1.234560123456789e125 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx292-9223372036854775808 42 9223372036854775807 18446744073709551615 -1.234560123456789e125 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
293-9223372036854775807 4200 9223372036854775806 18446744073709551614 -6.172800617283945e124 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx293-9223372036854775807 4200 9223372036854775806 18446744073709551614 -6.172800617283945e124 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
294DROP TABLE t1;294DROP TABLE t1;
295*** Test correct quoting in foreign key error message ***295*** Test correct quoting in foreign key error message ***
296use `db1``; SELECT 'oops!'`;296use `db1``; select 'oops!'`;
297CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;297CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
298CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,298CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
299FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;299FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
300TRUNCATE `t``1`;300TRUNCATE `t``1`;
301ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; SELECT 'oops!'`.`t``2`, CONSTRAINT `t``INNODB_FOREIGN_KEY_NAME` FOREIGN KEY (`c```) REFERENCES `db1``; SELECT 'oops!'`.`t``1` (`a```))301ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `t``INNODB_FOREIGN_KEY_NAME` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```))
302DROP TABLE `t``2`;302DROP TABLE `t``2`;
303DROP TABLE `t``1`;303DROP TABLE `t``1`;
304*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart304*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart
305include/stop_slave.inc305include/stop_slave.inc
306CREATE TABLE `db1``; SELECT 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;306CREATE TABLE `db1``; select 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;
307INSERT INTO `db1``; SELECT 'oops!'`.`t``1` VALUES (1), (2), (5);307INSERT INTO `db1``; select 'oops!'`.`t``1` VALUES (1), (2), (5);
308SELECT * FROM `db1``; SELECT 'oops!'`.`t``1` ORDER BY 1;308SELECT * FROM `db1``; select 'oops!'`.`t``1` ORDER BY 1;
309a`309a`
31013101
31123112
31253125
313set timestamp=1000000000;313set timestamp=1000000000;
314# The table should be empty on the master.314# The table should be empty on the master.
315SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;315SELECT * FROM `db1``; select 'oops!'`.`t``1`;
316a`316a`
317# The DELETE statement should be correctly quoted317# The DELETE statement should be correctly quoted
318show binlog events in 'master-bin.000002' from <binlog_start>;318show binlog events in 'master-bin.000002' from <binlog_start>;
319Log_name Pos Event_type Server_id End_log_pos Info319Log_name Pos Event_type Server_id End_log_pos Info
320master-bin.000002 # Query # # BEGIN320master-bin.000002 # Query # # BEGIN
321master-bin.000002 # Query # # use `test`; DELETE FROM `db1``; SELECT 'oops!'`.`t``1`321master-bin.000002 # Query # # use `test`; DELETE FROM `db1``; select 'oops!'`.`t``1`
322master-bin.000002 # Query # # COMMIT322master-bin.000002 # Query # # COMMIT
323include/start_slave.inc323include/start_slave.inc
324# The table should be empty on the slave also.324# The table should be empty on the slave also.
325SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;325SELECT * FROM `db1``; select 'oops!'`.`t``1`;
326a`326a`
327DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;327DROP TABLE `db1``; select 'oops!'`.`t``1`;
328use test;328use test;
329DROP DATABASE `db1``; SELECT 'oops!'`;329DROP DATABASE `db1``; select 'oops!'`;
330include/rpl_end.inc330include/rpl_end.inc
331331
=== modified file 'mysql-test/suite/rpl/t/rpl_mdev382.test'
--- mysql-test/suite/rpl/t/rpl_mdev382.test 2013-06-26 07:01:13 +0000
+++ mysql-test/suite/rpl/t/rpl_mdev382.test 2014-07-29 07:39:09 +0000
@@ -64,8 +64,8 @@
64connection master;64connection master;
65let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);65let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
66set sql_mode = 'ANSI_QUOTES';66set sql_mode = 'ANSI_QUOTES';
67CREATE DATABASE "db1`; SELECT 'oops!'";67CREATE DATABASE "db1`; select 'oops!'";
68use "db1`; SELECT 'oops!'";68use "db1`; select 'oops!'";
69CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM;69CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM;
70INSERT INTO t1 VALUES (1);70INSERT INTO t1 VALUES (1);
71set sql_mode = '';71set sql_mode = '';
@@ -88,7 +88,7 @@
88'fo\\o','bar'88'fo\\o','bar'
89EOF89EOF
9090
91use `db1``; SELECT 'oops!'`;91use `db1``; select 'oops!'`;
92let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);92let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
93set timestamp=1000000000;93set timestamp=1000000000;
94CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),94CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
@@ -105,11 +105,11 @@
105use test;105use test;
106--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR106--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
107eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/f''le.txt'107eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/f''le.txt'
108 INTO TABLE `db1``; SELECT 'oops!'`.`t``1`108 INTO TABLE `db1``; select 'oops!'`.`t``1`
109 FIELDS TERMINATED BY ',' ESCAPED BY '\\\\' ENCLOSED BY ''''109 FIELDS TERMINATED BY ',' ESCAPED BY '\\\\' ENCLOSED BY ''''
110 LINES TERMINATED BY '\\n'110 LINES TERMINATED BY '\\n'
111 (`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!");111 (`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!");
112SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;112SELECT * FROM `db1``; select 'oops!'`.`t``1`;
113let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1);113let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1);
114114
115--source include/show_binlog_events.inc115--source include/show_binlog_events.inc
@@ -119,10 +119,10 @@
119119
120sync_slave_with_master;120sync_slave_with_master;
121connection slave;121connection slave;
122SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;122SELECT * FROM `db1``; select 'oops!'`.`t``1`;
123connection master;123connection master;
124124
125DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;125DROP TABLE `db1``; select 'oops!'`.`t``1`;
126--remove_file $load_file126--remove_file $load_file
127127
128connection master;128connection master;
@@ -158,7 +158,7 @@
158158
159159
160--echo *** Test user variables whose names require correct quoting ***160--echo *** Test user variables whose names require correct quoting ***
161use `db1``; SELECT 'oops!'`;161use `db1``; select 'oops!'`;
162let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);162let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
163CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100));163CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100));
164INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100));164INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100));
@@ -172,13 +172,13 @@
172172
173sync_slave_with_master;173sync_slave_with_master;
174connection slave;174connection slave;
175SELECT * FROM `db1``; SELECT 'oops!'`.t1 ORDER BY a1;175SELECT * FROM `db1``; select 'oops!'`.t1 ORDER BY a1;
176176
177connection master;177connection master;
178DROP TABLE t1;178DROP TABLE t1;
179179
180--echo *** Test correct quoting in foreign key error message ***180--echo *** Test correct quoting in foreign key error message ***
181use `db1``; SELECT 'oops!'`;181use `db1``; select 'oops!'`;
182CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;182CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
183CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,183CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
184 FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;184 FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
@@ -197,9 +197,9 @@
197--source include/stop_slave.inc197--source include/stop_slave.inc
198198
199connection master;199connection master;
200CREATE TABLE `db1``; SELECT 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;200CREATE TABLE `db1``; select 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;
201INSERT INTO `db1``; SELECT 'oops!'`.`t``1` VALUES (1), (2), (5);201INSERT INTO `db1``; select 'oops!'`.`t``1` VALUES (1), (2), (5);
202SELECT * FROM `db1``; SELECT 'oops!'`.`t``1` ORDER BY 1;202SELECT * FROM `db1``; select 'oops!'`.`t``1` ORDER BY 1;
203203
204# Restart the master mysqld.204# Restart the master mysqld.
205# This will cause an implicit truncation of the memory-based table, which will205# This will cause an implicit truncation of the memory-based table, which will
@@ -230,7 +230,7 @@
230--echo # The table should be empty on the master.230--echo # The table should be empty on the master.
231let $binlog_file= master-bin.000002;231let $binlog_file= master-bin.000002;
232let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);232let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
233SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;233SELECT * FROM `db1``; select 'oops!'`.`t``1`;
234234
235--echo # The DELETE statement should be correctly quoted235--echo # The DELETE statement should be correctly quoted
236--source include/show_binlog_events.inc236--source include/show_binlog_events.inc
@@ -242,15 +242,15 @@
242sync_slave_with_master;242sync_slave_with_master;
243connection slave;243connection slave;
244--echo # The table should be empty on the slave also.244--echo # The table should be empty on the slave also.
245SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;245SELECT * FROM `db1``; select 'oops!'`.`t``1`;
246246
247connection master;247connection master;
248DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;248DROP TABLE `db1``; select 'oops!'`.`t``1`;
249sync_slave_with_master;249sync_slave_with_master;
250250
251251
252connection master;252connection master;
253use test;253use test;
254DROP DATABASE `db1``; SELECT 'oops!'`;254DROP DATABASE `db1``; select 'oops!'`;
255255
256--source include/rpl_end.inc256--source include/rpl_end.inc

Subscribers

People subscribed via source and target branches