Commit 01ef1f0d authored by Sergei Golubchik's avatar Sergei Golubchik

fix the test to work with --lower-case-table-names=1

parent 59408093
......@@ -77,8 +77,8 @@ master-bin.000001 # Query # # use `test`; insert into t1 values(18)
master-bin.000001 # Xid # # COMMIT /* XID */
*** Test correct USE statement in SHOW BINLOG EVENTS ***
set sql_mode = 'ANSI_QUOTES';
CREATE DATABASE "db1`; SELECT 'oops!'";
use "db1`; SELECT 'oops!'";
CREATE DATABASE "db1`; select 'oops!'";
use "db1`; select 'oops!'";
CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM;
INSERT INTO t1 VALUES (1);
set sql_mode = '';
......@@ -86,41 +86,41 @@ INSERT INTO t1 VALUES (2);
set sql_mode = 'ANSI_QUOTES';
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'"
master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
master-bin.000001 # Query # # CREATE DATABASE "db1`; select 'oops!'"
master-bin.000001 # Query # # use "db1`; select 'oops!'"; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # use "db1`; select 'oops!'"; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; INSERT INTO t1 VALUES (2)
master-bin.000001 # Query # # use "db1`; select 'oops!'"; INSERT INTO t1 VALUES (2)
master-bin.000001 # Query # # COMMIT
set sql_mode = '';
set sql_quote_show_create = 0;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'"
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
master-bin.000001 # Query # # CREATE DATABASE "db1`; select 'oops!'"
master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (2)
master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (2)
master-bin.000001 # Query # # COMMIT
set sql_quote_show_create = 1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'"
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
master-bin.000001 # Query # # CREATE DATABASE "db1`; select 'oops!'"
master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (2)
master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (2)
master-bin.000001 # Query # # COMMIT
DROP TABLE t1;
use test;
***Test LOAD DATA INFILE with various identifiers that need correct quoting ***
use `db1``; SELECT 'oops!'`;
use `db1``; select 'oops!'`;
set timestamp=1000000000;
CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
`c``3` VARCHAR(7));
......@@ -134,31 +134,31 @@ fo\o bar |b"a'z!
truncate `t``1`;
use test;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f''le.txt'
INTO TABLE `db1``; SELECT 'oops!'`.`t``1`
INTO TABLE `db1``; select 'oops!'`.`t``1`
FIELDS TERMINATED BY ',' ESCAPED BY '\\' ENCLOSED BY ''''
LINES TERMINATED BY '\n'
(`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!");
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
a`1 b`2 c`3
fo\o bar |b"a'z!
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
master-bin.000001 # Query # # use `db1``; select 'oops!'`; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
`c``3` VARCHAR(7))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
master-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=#
master-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=#
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; truncate `t``1`
master-bin.000001 # Query # # use `db1``; select 'oops!'`; truncate `t``1`
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
master-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=#
master-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=#
master-bin.000001 # Query # # COMMIT
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `db1``; SELECT 'oops!'`/*!*/;
use `db1``; select 'oops!'`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
......@@ -188,7 +188,7 @@ BEGIN
/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
LOAD 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", "!")
LOAD 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", "!")
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
COMMIT
......@@ -197,10 +197,10 @@ DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
a`1 b`2 c`3
fo\o bar |b"a'z!
DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;
DROP TABLE `db1``; select 'oops!'`.`t``1`;
drop table t1,t2;
*** Test truncation of long SET expression in LOAD DATA ***
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1000));
......@@ -223,7 +223,7 @@ a b
2 A| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|A
DROP TABLE t1;
*** Test user variables whose names require correct quoting ***
use `db1``; SELECT 'oops!'`;
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));
INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100));
SELECT @`a``1`:=a1, @`a``2`:=a2, @`a``3`:=a3, @`a``4`:=a4, @`b```:=b, @```c`:=c, @```d```:=d FROM t1;
......@@ -232,9 +232,9 @@ SELECT @`a``1`:=a1, @`a``2`:=a2, @`a``3`:=a3, @`a``4`:=a4, @`b```:=b, @```c`:=c,
INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98));
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-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))
master-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))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100))
master-bin.000001 # Query # # use `db1``; select 'oops!'`; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100))
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # User var # # @`a``1`=-9223372036854775808
......@@ -244,13 +244,13 @@ master-bin.000001 # User var # # @`a``4`=18446744073709551615
master-bin.000001 # User var # # @`b```=-1.234560123456789e125
master-bin.000001 # User var # # @```c`=-1234501234567890123456789012345678901234567890123456789.0123456789
master-bin.000001 # User var # # @```d```=_latin1 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 COLLATE latin1_swedish_ci
master-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))
master-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))
master-bin.000001 # Query # # COMMIT
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `db1``; SELECT 'oops!'`/*!*/;
use `db1``; select 'oops!'`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
......@@ -291,46 +291,46 @@ DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
SELECT * FROM `db1``; SELECT 'oops!'`.t1 ORDER BY a1;
SELECT * FROM `db1``; select 'oops!'`.t1 ORDER BY a1;
a1 a2 a3 a4 b c d
-9223372036854775808 42 9223372036854775807 18446744073709551615 -1.234560123456789e125 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-9223372036854775807 4200 9223372036854775806 18446744073709551614 -6.172800617283945e124 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DROP TABLE t1;
*** Test correct quoting in foreign key error message ***
use `db1``; SELECT 'oops!'`;
use `db1``; select 'oops!'`;
CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
TRUNCATE `t``1`;
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; SELECT 'oops!'`.`t``2`, CONSTRAINT `INNODB_FOREIGN_KEY_NAME` FOREIGN KEY (`c```) REFERENCES `db1``; SELECT 'oops!'`.`t``1` (`a```))
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `INNODB_FOREIGN_KEY_NAME` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```))
DROP TABLE `t``2`;
DROP TABLE `t``1`;
*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart
include/stop_slave.inc
CREATE TABLE `db1``; SELECT 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;
INSERT INTO `db1``; SELECT 'oops!'`.`t``1` VALUES (1), (2), (5);
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1` ORDER BY 1;
CREATE TABLE `db1``; select 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;
INSERT INTO `db1``; select 'oops!'`.`t``1` VALUES (1), (2), (5);
SELECT * FROM `db1``; select 'oops!'`.`t``1` ORDER BY 1;
a`
1
2
5
set timestamp=1000000000;
# The table should be empty on the master.
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
a`
# The DELETE statement should be correctly quoted
show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query # # BEGIN
master-bin.000002 # Query # # use `test`; DELETE FROM `db1``; SELECT 'oops!'`.`t``1`
master-bin.000002 # Query # # use `test`; DELETE FROM `db1``; select 'oops!'`.`t``1`
master-bin.000002 # Query # # COMMIT
include/start_slave.inc
# The table should be empty on the slave also.
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
a`
DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;
DROP TABLE `db1``; select 'oops!'`.`t``1`;
use test;
DROP DATABASE `db1``; SELECT 'oops!'`;
DROP DATABASE `db1``; select 'oops!'`;
*** Test correct quoting of mysqlbinlog --rewrite-db option ***
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 VALUES(1);
......
......@@ -64,8 +64,8 @@ set sql_quote_show_create = 1;
connection master;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
set sql_mode = 'ANSI_QUOTES';
CREATE DATABASE "db1`; SELECT 'oops!'";
use "db1`; SELECT 'oops!'";
CREATE DATABASE "db1`; select 'oops!'";
use "db1`; select 'oops!'";
CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM;
INSERT INTO t1 VALUES (1);
set sql_mode = '';
......@@ -88,7 +88,7 @@ use test;
'fo\\o','bar'
EOF
use `db1``; SELECT 'oops!'`;
use `db1``; select 'oops!'`;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
set timestamp=1000000000;
CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3),
......@@ -105,11 +105,11 @@ truncate `t``1`;
use test;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/f''le.txt'
INTO TABLE `db1``; SELECT 'oops!'`.`t``1`
INTO TABLE `db1``; select 'oops!'`.`t``1`
FIELDS TERMINATED BY ',' ESCAPED BY '\\\\' ENCLOSED BY ''''
LINES TERMINATED BY '\\n'
(`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!");
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1);
--source include/show_binlog_events.inc
......@@ -119,10 +119,10 @@ let $MYSQLD_DATADIR= `select @@datadir`;
sync_slave_with_master;
connection slave;
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
connection master;
DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;
DROP TABLE `db1``; select 'oops!'`.`t``1`;
--remove_file $load_file
connection master;
......@@ -158,7 +158,7 @@ DROP TABLE t1;
--echo *** Test user variables whose names require correct quoting ***
use `db1``; SELECT 'oops!'`;
use `db1``; select 'oops!'`;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100));
INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100));
......@@ -172,13 +172,13 @@ let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
connection slave;
SELECT * FROM `db1``; SELECT 'oops!'`.t1 ORDER BY a1;
SELECT * FROM `db1``; select 'oops!'`.t1 ORDER BY a1;
connection master;
DROP TABLE t1;
--echo *** Test correct quoting in foreign key error message ***
use `db1``; SELECT 'oops!'`;
use `db1``; select 'oops!'`;
CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
......@@ -197,9 +197,9 @@ connection slave;
--source include/stop_slave.inc
connection master;
CREATE TABLE `db1``; SELECT 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;
INSERT INTO `db1``; SELECT 'oops!'`.`t``1` VALUES (1), (2), (5);
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1` ORDER BY 1;
CREATE TABLE `db1``; select 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap;
INSERT INTO `db1``; select 'oops!'`.`t``1` VALUES (1), (2), (5);
SELECT * FROM `db1``; select 'oops!'`.`t``1` ORDER BY 1;
# Restart the master mysqld.
# This will cause an implicit truncation of the memory-based table, which will
......@@ -230,7 +230,7 @@ set timestamp=1000000000;
--echo # The table should be empty on the master.
let $binlog_file= master-bin.000002;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
--echo # The DELETE statement should be correctly quoted
--source include/show_binlog_events.inc
......@@ -242,16 +242,16 @@ connection master;
sync_slave_with_master;
connection slave;
--echo # The table should be empty on the slave also.
SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`;
SELECT * FROM `db1``; select 'oops!'`.`t``1`;
connection master;
DROP TABLE `db1``; SELECT 'oops!'`.`t``1`;
DROP TABLE `db1``; select 'oops!'`.`t``1`;
sync_slave_with_master;
connection master;
use test;
DROP DATABASE `db1``; SELECT 'oops!'`;
DROP DATABASE `db1``; select 'oops!'`;
--echo *** Test correct quoting of mysqlbinlog --rewrite-db option ***
CREATE TABLE t1 (a INT PRIMARY KEY);
......
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