summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-09-22 15:30:24 +0300
committerMichael Widenius <monty@askmonty.org>2012-09-22 15:30:24 +0300
commit3e83c4e8f90851040be921443b52144a2862444a (patch)
treef76ee35018c73f2034e0e6e42c89c038f920f495 /mysql-test/suite
parent513923868545338c00390f35f63b92efd55f50bb (diff)
parent79feec77ed4a7121e68be1dc16f79dcad6c5d25e (diff)
downloadmariadb-git-3e83c4e8f90851040be921443b52144a2862444a.tar.gz
Automatic merge
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/binlog/r/binlog_innodb_row.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_binlog.result79
-rw-r--r--mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result88
-rw-r--r--mysql-test/suite/binlog/r/binlog_unsafe.result1
-rw-r--r--mysql-test/suite/heap/heap_hash.result19
-rw-r--r--mysql-test/suite/heap/heap_hash.test13
-rw-r--r--mysql-test/suite/innodb/r/auto_increment_dup.result33
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result24
-rw-r--r--mysql-test/suite/innodb/r/innodb-lock.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug56947.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result5
-rw-r--r--mysql-test/suite/innodb/t/auto_increment_dup.test51
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test24
-rw-r--r--mysql-test/suite/maria/maria3.result2
-rw-r--r--mysql-test/suite/maria/mrr.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result4
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_send.test3
-rw-r--r--mysql-test/suite/rpl/r/rpl_auto_increment.result19
-rw-r--r--mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff4
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddatalocal.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev382.result84
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev382.test34
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_stop_slave.test10
-rw-r--r--mysql-test/suite/sys_vars/r/all_vars.result1
-rw-r--r--mysql-test/suite/sys_vars/r/expensive_subquery_limit_basic.result52
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_merge_sort_block_size_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/t/expensive_subquery_limit_basic.test38
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_merge_sort_block_size_basic.test19
30 files changed, 496 insertions, 153 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_innodb_row.result b/mysql-test/suite/binlog/r/binlog_innodb_row.result
index 61f961f16da..043f363c9c7 100644
--- a/mysql-test/suite/binlog/r/binlog_innodb_row.result
+++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result
@@ -69,6 +69,8 @@ INSERT INTO t1 VALUES (1);
START TRANSACTION;
INSERT INTO t2 VALUES (1);
INSERT IGNORE INTO t1 VALUES (1);
+Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
COMMIT;
INSERT INTO t1 VALUES (2);
START TRANSACTION;
diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
index 95477d13b50..a3ee21b9957 100644
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result
@@ -578,13 +578,46 @@ DROP PROCEDURE p4;
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
+insert into t1 values(5);
set insert_id=128;
-insert into t1 values(null);
+insert into t1 values(null) /* Not binlogged */;
+ERROR 22003: Out of range value for column 'id' at row 1
+set insert_id=128;
+insert ignore into t1 values(null) /* Insert 128 */;
+Warnings:
+Warning 167 Out of range value for column 'id' at row 1
+set insert_id=5;
+insert into t1 values(null) /* Not binlogged */;
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+set insert_id=5;
+insert ignore into t1 values(null) /* Insert 5 */;
Warnings:
-Warning 1264 Out of range value for column 'id' at row 1
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
select * from t1;
id
-127
+5
+drop table t1;
+create table t1 (id tinyint auto_increment primary key) engine=myisam;
+set insert_id=128;
+insert into t1 values(5),(null) /* Insert_id 128 */;
+ERROR 22003: Out of range value for column 'id' at row 2
+set insert_id=128;
+insert ignore into t1 values (4),(null) /* Insert_id 128 */;
+Warnings:
+Warning 167 Out of range value for column 'id' at row 2
+set insert_id=5;
+insert into t1 values(3),(null) /* Insert_id 5 */;
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+set insert_id=5;
+insert ignore into t1 values(2),(null) /* Insert_id 5 */;
+Warnings:
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
+select * from t1 order by id;
+id
+2
+3
+4
+5
drop table t1;
create table t1 (a int);
create table if not exists t2 select * from t1;
@@ -603,36 +636,19 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-master-bin.000001 # Query # # use `test`; create table t1 (a int)
+master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) engine=myisam
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` (
- `a` int(11) DEFAULT NULL
-)
-master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
- `a` int(11) DEFAULT NULL
-)
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
-master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
-master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-drop table t1,t2,t3,tt1;
-create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
-insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
-insert /*! delayed */ into t1 values (null);
-insert delayed into t1 values (300);
-FLUSH TABLES;
-show binlog events from <binlog_start>;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
@@ -659,8 +675,15 @@ master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt1` /* generated by server */
-master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */
+drop table t1,t2,t3,tt1;
+reset master;
+create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
+insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
+insert /*! delayed */ into t1 values (null);
+insert delayed into t1 values (300);
+FLUSH TABLES;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
diff --git a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
index cdcc96b94b0..15610296d5c 100644
--- a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
+++ b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
@@ -1,3 +1,4 @@
+reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
insert /*! delayed */ into t1 values (null);
@@ -5,9 +6,6 @@ insert delayed into t1 values (300);
FLUSH TABLES;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT' COLLATE 'latin1_swedish_ci'))
-master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert /* before delayed */ /* after delayed */ into t1 values (207)
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index 062f4f4e906..68e76921ff3 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -387,13 +387,46 @@ DROP PROCEDURE p4;
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
+insert into t1 values(5);
set insert_id=128;
-insert into t1 values(null);
+insert into t1 values(null) /* Not binlogged */;
+ERROR 22003: Out of range value for column 'id' at row 1
+set insert_id=128;
+insert ignore into t1 values(null) /* Insert 128 */;
+Warnings:
+Warning 167 Out of range value for column 'id' at row 1
+set insert_id=5;
+insert into t1 values(null) /* Not binlogged */;
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+set insert_id=5;
+insert ignore into t1 values(null) /* Insert 5 */;
Warnings:
-Warning 1264 Out of range value for column 'id' at row 1
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
select * from t1;
id
-127
+5
+drop table t1;
+create table t1 (id tinyint auto_increment primary key) engine=myisam;
+set insert_id=128;
+insert into t1 values(5),(null) /* Insert_id 128 */;
+ERROR 22003: Out of range value for column 'id' at row 2
+set insert_id=128;
+insert ignore into t1 values (4),(null) /* Insert_id 128 */;
+Warnings:
+Warning 167 Out of range value for column 'id' at row 2
+set insert_id=5;
+insert into t1 values(3),(null) /* Insert_id 5 */;
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+set insert_id=5;
+insert ignore into t1 values(2),(null) /* Insert_id 5 */;
+Warnings:
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
+select * from t1 order by id;
+id
+2
+3
+4
+5
drop table t1;
create table t1 (a int);
create table if not exists t2 select * from t1;
@@ -408,35 +441,33 @@ show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Intvar # # INSERT_ID=127
-master-bin.000001 # Query # # use `test`; insert into t1 values(null)
+master-bin.000001 # Query # # use `test`; insert into t1 values(5)
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Intvar # # INSERT_ID=128
+master-bin.000001 # Query # # use `test`; insert ignore into t1 values(null) /* Insert 128 */
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Intvar # # INSERT_ID=5
+master-bin.000001 # Query # # use `test`; insert ignore into t1 values(null) /* Insert 5 */
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-master-bin.000001 # Query # # use `test`; create table t1 (a int)
-master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1
-master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
-master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
+master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) engine=myisam
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
+master-bin.000001 # Intvar # # INSERT_ID=128
+master-bin.000001 # Query # # use `test`; insert into t1 values(5),(null) /* Insert_id 128 */
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Intvar # # INSERT_ID=128
+master-bin.000001 # Query # # use `test`; insert ignore into t1 values (4),(null) /* Insert_id 128 */
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Intvar # # INSERT_ID=5
+master-bin.000001 # Query # # use `test`; insert into t1 values(3),(null) /* Insert_id 5 */
master-bin.000001 # Query # # COMMIT
-drop table t1,t2,t3,tt1;
-create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
-insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
-insert /*! delayed */ into t1 values (null);
-insert delayed into t1 values (300);
-FLUSH TABLES;
-show binlog events from <binlog_start>;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Intvar # # INSERT_ID=127
-master-bin.000001 # Query # # use `test`; insert into t1 values(null)
+master-bin.000001 # Intvar # # INSERT_ID=5
+master-bin.000001 # Query # # use `test`; insert ignore into t1 values(2),(null) /* Insert_id 5 */
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; create table t1 (a int)
@@ -452,8 +483,15 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt1` /* generated by server */
-master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */
+drop table t1,t2,t3,tt1;
+reset master;
+create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
+insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
+insert /*! delayed */ into t1 values (null);
+insert delayed into t1 values (300);
+FLUSH TABLES;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result
index 2cc1ebdd2d7..043b3d1e7a6 100644
--- a/mysql-test/suite/binlog/r/binlog_unsafe.result
+++ b/mysql-test/suite/binlog/r/binlog_unsafe.result
@@ -2682,6 +2682,7 @@ CREATE TABLE insert_2_keys (a INT UNIQUE KEY, b INT UNIQUE KEY);
INSERT INTO insert_2_keys values (1, 1);
INSERT IGNORE INTO insert_table SELECT * FROM filler_table;
Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.
TRUNCATE TABLE insert_table;
INSERT INTO insert_table SELECT * FROM filler_table ON DUPLICATE KEY UPDATE a = 1;
diff --git a/mysql-test/suite/heap/heap_hash.result b/mysql-test/suite/heap/heap_hash.result
index 453bfc0c165..ac62427c81c 100644
--- a/mysql-test/suite/heap/heap_hash.result
+++ b/mysql-test/suite/heap/heap_hash.result
@@ -427,4 +427,23 @@ INDEX(col_int_key) USING HASH) ENGINE = HEAP;
INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
DROP TABLE t1;
+#
+# Bug #1002564: Wrong result for a lookup query from a heap table
+#
+CREATE TABLE t1 (c1 VARCHAR(10) NOT NULL, KEY i1 (c1(3))) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES ('foo1'), ('bar2'), ('baz3');
+explain SELECT * FROM t1 WHERE c1='bar2';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i1 i1 5 const 2 Using where
+SELECT * FROM t1 WHERE c1='bar2';
+c1
+bar2
+ALTER TABLE t1 DROP KEY i1, ADD KEY il (c1(3)) using btree;
+explain SELECT * FROM t1 WHERE c1='bar2';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref il il 5 const 1 Using where
+SELECT * FROM t1 WHERE c1='bar2';
+c1
+bar2
+DROP TABLE t1;
End of 5.5 tests
diff --git a/mysql-test/suite/heap/heap_hash.test b/mysql-test/suite/heap/heap_hash.test
index 80ae01e9547..80d6ef9c8f2 100644
--- a/mysql-test/suite/heap/heap_hash.test
+++ b/mysql-test/suite/heap/heap_hash.test
@@ -316,4 +316,17 @@ DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
DROP TABLE t1;
+--echo #
+--echo # Bug #1002564: Wrong result for a lookup query from a heap table
+--echo #
+
+CREATE TABLE t1 (c1 VARCHAR(10) NOT NULL, KEY i1 (c1(3))) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES ('foo1'), ('bar2'), ('baz3');
+explain SELECT * FROM t1 WHERE c1='bar2';
+SELECT * FROM t1 WHERE c1='bar2';
+ALTER TABLE t1 DROP KEY i1, ADD KEY il (c1(3)) using btree;
+explain SELECT * FROM t1 WHERE c1='bar2';
+SELECT * FROM t1 WHERE c1='bar2';
+DROP TABLE t1;
+
--echo End of 5.5 tests
diff --git a/mysql-test/suite/innodb/r/auto_increment_dup.result b/mysql-test/suite/innodb/r/auto_increment_dup.result
new file mode 100644
index 00000000000..5bf901cb212
--- /dev/null
+++ b/mysql-test/suite/innodb/r/auto_increment_dup.result
@@ -0,0 +1,33 @@
+drop table if exists t1;
+CREATE TABLE t1(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+k INT,
+c CHAR(1),
+UNIQUE KEY(k)) ENGINE=InnoDB;
+#
+# Connection 1
+#
+SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1';
+affected rows: 0
+INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1';
+#
+# Connection 2
+#
+SET DEBUG_SYNC='start_ha_write_row WAIT_FOR continue2';
+affected rows: 0
+SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1';
+affected rows: 0
+INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 0
+affected rows: 4
+info: Records: 3 Duplicates: 1 Warnings: 0
+SET DEBUG_SYNC='RESET';
+SELECT * FROM t1 ORDER BY k;
+id k c
+1 1 NULL
+4 2 1
+2 3 NULL
+5 4 NULL
+6 5 NULL
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index 9eb89bead74..8c4c1c20590 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -2,7 +2,7 @@ drop table if exists t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
9223372036854775807 NULL
@@ -10,7 +10,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (127, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
127 NULL
@@ -18,7 +18,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (255, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
255 NULL
@@ -26,7 +26,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (32767, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
32767 NULL
@@ -34,7 +34,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (65535, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
65535 NULL
@@ -42,7 +42,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (8388607, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
8388607 NULL
@@ -50,7 +50,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (16777215, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
16777215 NULL
@@ -58,7 +58,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2147483647, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
2147483647 NULL
@@ -66,7 +66,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (4294967295, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
4294967295 NULL
@@ -74,7 +74,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1 c2
9223372036854775807 NULL
@@ -567,7 +567,7 @@ Variable_name Value
auto_increment_increment 65535
auto_increment_offset 65535
INSERT INTO t1 VALUES (NULL),(NULL);
-ERROR 22003: Out of range value for column 't1' at row 167
+ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1;
c1
1
@@ -858,7 +858,7 @@ PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 SELECT c1 FROM t1;
Got one of the listed errors
INSERT INTO t2 SELECT NULL FROM t1;
-Got one of the listed errors
+ERROR 22003: Out of range value for column 'c1' at row 1
DROP TABLE t1;
DROP TABLE t2;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
diff --git a/mysql-test/suite/innodb/r/innodb-lock.result b/mysql-test/suite/innodb/r/innodb-lock.result
index 439a8d6513c..7191bcd238a 100644
--- a/mysql-test/suite/innodb/r/innodb-lock.result
+++ b/mysql-test/suite/innodb/r/innodb-lock.result
@@ -98,8 +98,12 @@ CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB;
INSERT INTO t1 VALUES(3,1);
BEGIN;
INSERT IGNORE INTO t1 VALUES(3,14);
+Warnings:
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
BEGIN;
INSERT IGNORE INTO t1 VALUES(3,23);
+Warnings:
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
SELECT * FROM t1 FOR UPDATE;
COMMIT;
a b
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 17fe766616a..2af2a7b80bf 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -816,6 +816,8 @@ id
1
2
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
+Warnings:
+Warning 1062 Duplicate entry '1-1' for key 'PRIMARY'
commit;
select id,id3 from t1;
id id3
diff --git a/mysql-test/suite/innodb/r/innodb_bug56947.result b/mysql-test/suite/innodb/r/innodb_bug56947.result
index b279069d834..8b864b62e81 100644
--- a/mysql-test/suite/innodb/r/innodb_bug56947.result
+++ b/mysql-test/suite/innodb/r/innodb_bug56947.result
@@ -3,6 +3,6 @@ SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb;
CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
alter table bug56947 add unique index (a);
-ERROR HY000: Table 'test.bug56947#1' already exists
+ERROR 42S01: Table 'test.bug56947#1' already exists
drop table `bug56947#1`;
drop table bug56947;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index 2b3d24551c7..be2b4b28f6a 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -1480,10 +1480,15 @@ k a c
1 6 2
2 7 NULL
insert ignore into t2 values (null,6,1),(10,8,1);
+Warnings:
+Warning 1062 Duplicate entry '6' for key 'idx_1'
select last_insert_id();
last_insert_id()
0
insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
+Warnings:
+Warning 1062 Duplicate entry '6' for key 'idx_1'
+Warning 1062 Duplicate entry '8' for key 'idx_1'
select last_insert_id();
last_insert_id()
11
diff --git a/mysql-test/suite/innodb/t/auto_increment_dup.test b/mysql-test/suite/innodb/t/auto_increment_dup.test
new file mode 100644
index 00000000000..ad439024f65
--- /dev/null
+++ b/mysql-test/suite/innodb/t/auto_increment_dup.test
@@ -0,0 +1,51 @@
+##########################################################################
+# LP bug #1035225 / MySQL bug #66301: INSERT ... ON DUPLICATE KEY UPDATE +
+# innodb_autoinc_lock_mode=1 is broken
+##########################################################################
+
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+CREATE TABLE t1(
+ id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ k INT,
+ c CHAR(1),
+ UNIQUE KEY(k)) ENGINE=InnoDB;
+
+--enable_info
+
+--connect(con1, localhost, root)
+--connect(con2, localhost, root)
+
+--connection con1
+
+--echo #
+--echo # Connection 1
+--echo #
+SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1';
+--send INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1'
+
+--connection con2
+--echo #
+--echo # Connection 2
+--echo #
+SET DEBUG_SYNC='start_ha_write_row WAIT_FOR continue2';
+SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1';
+INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
+
+--connection con1
+--reap
+--disable_info
+SET DEBUG_SYNC='RESET';
+SELECT * FROM t1 ORDER BY k;
+
+--disconnect con1
+--disconnect con2
+
+--connection default
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 4f54a8ff957..888c73bacdf 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -11,7 +11,7 @@ drop table if exists t1;
#
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
@@ -22,14 +22,14 @@ DROP TABLE t1;
# TINYINT
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (127, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (255, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
@@ -38,14 +38,14 @@ DROP TABLE t1;
#
CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (32767, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (65535, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
@@ -54,14 +54,14 @@ DROP TABLE t1;
#
CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (8388607, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (16777215, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
@@ -70,14 +70,14 @@ DROP TABLE t1;
#
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2147483647, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (4294967295, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
@@ -86,7 +86,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
--- error ER_DUP_ENTRY,1062
+-- error 167
INSERT INTO t1 (c2) VALUES ('innodb');
SELECT * FROM t1;
DROP TABLE t1;
@@ -349,7 +349,7 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
SELECT * FROM t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
SHOW VARIABLES LIKE "%auto_inc%";
---error ER_WARN_DATA_OUT_OF_RANGE
+--error 167
INSERT INTO t1 VALUES (NULL),(NULL);
SELECT * FROM t1;
DROP TABLE t1;
@@ -437,7 +437,7 @@ CREATE TABLE t2(
PRIMARY KEY) ENGINE=InnoDB;
-- error ER_DUP_ENTRY,1062
INSERT INTO t2 SELECT c1 FROM t1;
--- error ER_DUP_ENTRY,1467
+-- error 167
INSERT INTO t2 SELECT NULL FROM t1;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 37613875f38..27d72b75930 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -452,6 +452,8 @@ SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE t1 (id int(11) PRIMARY KEY auto_increment,f1 varchar(10) NOT NULL UNIQUE);
INSERT IGNORE INTO t1 (f1) VALUES ("test1");
INSERT IGNORE INTO t1 (f1) VALUES ("test1");
+Warnings:
+Warning 1062 Duplicate entry 'test1' for key 'f1'
INSERT IGNORE INTO t1 (f1) VALUES ("test2");
SELECT * FROM t1;
id f1
diff --git a/mysql-test/suite/maria/mrr.result b/mysql-test/suite/maria/mrr.result
index af7789eebff..06be64566e5 100644
--- a/mysql-test/suite/maria/mrr.result
+++ b/mysql-test/suite/maria/mrr.result
@@ -277,6 +277,8 @@ bb-1 NULL cc-2 NULL-1
drop table t1, t2, t3, t4;
create table t1 (a int, b int not null,unique key (a,b),index(b));
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
+Warnings:
+Warning 1062 Duplicate entry '6-6' for key 'a'
create table t2 like t1;
insert into t2 select * from t1;
alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
index 3c19a37c95d..505dd587d0b 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
@@ -38,7 +38,11 @@ c1 c2 c3 c4
2008-01-01 00:00:00 NULL 2008-01-02 2008-01-03 00:00:00
2009-01-29 11:11:27 2009-01-29 00:00:00 2009-01-29 2009-01-29 00:00:00
INSERT IGNORE INTO t1(c1,c2) VALUES('20070525','20070527') /* doesnt throw error */;
+Warnings:
+Warning 1062 Duplicate entry '2007-05-25 00:00:00' for key 'PRIMARY'
INSERT IGNORE INTO t1(c1,c2) VALUES(19840905,830907) /* doesnt throw error */;
+Warnings:
+Warning 1062 Duplicate entry '1983-09-07 00:00:00' for key 'c2'
SELECT * FROM t1 WHERE c1='20070527' /* Returns no rows */;
c1 c2 c3 c4
INSERT INTO t1(c1) VALUES('20070525') ON DUPLICATE KEY UPDATE c1='20070527';
diff --git a/mysql-test/suite/plugins/t/feedback_plugin_send.test b/mysql-test/suite/plugins/t/feedback_plugin_send.test
index 3324ef469fe..45b507f8e78 100644
--- a/mysql-test/suite/plugins/t/feedback_plugin_send.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_send.test
@@ -1,3 +1,6 @@
+# Restart of server does not work for embedded.
+--source include/not_embedded.inc
+
source feedback_plugin_load.test;
if (!$MTR_FEEDBACK_PLUGIN) {
diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result
index 8b41a01cb6e..41bacd78f52 100644
--- a/mysql-test/suite/rpl/r/rpl_auto_increment.result
+++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result
@@ -125,6 +125,10 @@ insert into t1 values(600),(NULL),(NULL);
ERROR 23000: Duplicate entry '600' for key 'PRIMARY'
set @@insert_id=600;
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
+Warnings:
+Warning 1062 Duplicate entry '600' for key 'PRIMARY'
+Warning 1062 Duplicate entry '600' for key 'PRIMARY'
+Warning 1062 Duplicate entry '600' for key 'PRIMARY'
select * from t1;
a
1
@@ -186,7 +190,7 @@ set auto_increment_offset=4;
insert into t1 values(null);
insert into t1 values(null);
insert into t1 values(null);
-ERROR 23000: Duplicate entry '125' for key 'PRIMARY'
+ERROR 22003: Out of range value for column 'a' at row 1
select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a;
a mod(a-@@auto_increment_offset,@@auto_increment_increment)
103 0
@@ -196,21 +200,19 @@ create table t2 (a tinyint unsigned not null auto_increment primary key) engine=
set auto_increment_increment=10;
set auto_increment_offset=1;
set insert_id=1000;
+insert into t2 values(10);
insert into t2 values(null);
-Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
+ERROR 22003: Out of range value for column 'a' at row 1
select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 order by a;
a mod(a-@@auto_increment_offset,@@auto_increment_increment)
-251 0
+10 9
create table t3 like t1;
set auto_increment_increment=1000;
set auto_increment_offset=700;
insert into t3 values(null);
-Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
+ERROR 22003: Out of range value for column 'a' at row 1
select * from t3 order by a;
a
-127
select * from t1 order by a;
a
103
@@ -218,10 +220,9 @@ a
125
select * from t2 order by a;
a
-251
+10
select * from t3 order by a;
a
-127
drop table t1,t2,t3;
set auto_increment_increment=1;
set auto_increment_offset=1;
diff --git a/mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff b/mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff
index 5e0e7db5b63..ddb10d604c6 100644
--- a/mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff
+++ b/mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff
@@ -1,5 +1,5 @@
---- suite/rpl/r/rpl_insert_delayed.result 2012-02-06 21:37:21.000000000 +0100
-+++ suite/rpl/r/rpl_insert_delayed,stmt.reject 2012-02-06 23:12:55.000000000 +0100
+--- suite/rpl/r/rpl_insert_delayed.result 2012-09-18 01:37:45.317521958 +0300
++++ suite/rpl/r/rpl_insert_delayed,stmt.reject 2012-09-18 01:36:16.637514667 +0300
@@ -15,17 +15,17 @@
insert delayed into t1 values(10, "my name");
flush table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result
index 257d5f580e8..16fd3f19c4a 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result
@@ -14,6 +14,8 @@ select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
drop table t1;
create table t1(a int primary key);
load data local infile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
+Warnings:
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result
index 50da7e67bba..bbc57006d0d 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev382.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev382.result
@@ -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,44 @@ 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 # # COMMIT
+master-bin.000002 # Query # # DELETE FROM `db1``; select 'oops!'`.`t``1`
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);
diff --git a/mysql-test/suite/rpl/t/rpl_mdev382.test b/mysql-test/suite/rpl/t/rpl_mdev382.test
index e84a29137bc..d88eeaa463e 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev382.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev382.test
@@ -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);
diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
index c9c8f043668..ab388f3eebc 100644
--- a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
@@ -21,6 +21,16 @@
connection slave;
--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
+if(!$connection_id)
+{
+ # Something went wrong (timing)
+ # Show process list so that we can debug. In this case we will abort with
+ # wrong result
+ -- echo "Could not find connect id. Dumping process list for debugging"
+ SELECT * FROM information_schema.processlist;
+ exit;
+}
+
set @time_before_kill := (select CURRENT_TIMESTAMP);
--echo [Time before the query]
diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result
index 692545ae0fb..1bd4e394f6a 100644
--- a/mysql-test/suite/sys_vars/r/all_vars.result
+++ b/mysql-test/suite/sys_vars/r/all_vars.result
@@ -10,6 +10,5 @@ there should be *no* long test name listed below:
select distinct variable_name as `there should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
there should be *no* variables listed below:
-expensive_subquery_limit
drop table t1;
drop table t2;
diff --git a/mysql-test/suite/sys_vars/r/expensive_subquery_limit_basic.result b/mysql-test/suite/sys_vars/r/expensive_subquery_limit_basic.result
new file mode 100644
index 00000000000..1617de21001
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/expensive_subquery_limit_basic.result
@@ -0,0 +1,52 @@
+SET @start_global_value = @@global.expensive_subquery_limit;
+SELECT @start_global_value;
+@start_global_value
+100
+select @@global.expensive_subquery_limit;
+@@global.expensive_subquery_limit
+100
+select @@session.expensive_subquery_limit;
+@@session.expensive_subquery_limit
+100
+show global variables like 'expensive_subquery_limit';
+Variable_name Value
+expensive_subquery_limit 100
+show session variables like 'expensive_subquery_limit';
+Variable_name Value
+expensive_subquery_limit 100
+select * from information_schema.global_variables where variable_name='expensive_subquery_limit';
+VARIABLE_NAME VARIABLE_VALUE
+EXPENSIVE_SUBQUERY_LIMIT 100
+select * from information_schema.session_variables where variable_name='expensive_subquery_limit';
+VARIABLE_NAME VARIABLE_VALUE
+EXPENSIVE_SUBQUERY_LIMIT 100
+set global expensive_subquery_limit=10;
+set session expensive_subquery_limit=20;
+select @@global.expensive_subquery_limit;
+@@global.expensive_subquery_limit
+10
+select @@session.expensive_subquery_limit;
+@@session.expensive_subquery_limit
+20
+show global variables like 'expensive_subquery_limit';
+Variable_name Value
+expensive_subquery_limit 10
+show session variables like 'expensive_subquery_limit';
+Variable_name Value
+expensive_subquery_limit 20
+select * from information_schema.global_variables where variable_name='expensive_subquery_limit';
+VARIABLE_NAME VARIABLE_VALUE
+EXPENSIVE_SUBQUERY_LIMIT 10
+select * from information_schema.session_variables where variable_name='expensive_subquery_limit';
+VARIABLE_NAME VARIABLE_VALUE
+EXPENSIVE_SUBQUERY_LIMIT 20
+set global expensive_subquery_limit=1.1;
+ERROR 42000: Incorrect argument type to variable 'expensive_subquery_limit'
+set global expensive_subquery_limit=1e1;
+ERROR 42000: Incorrect argument type to variable 'expensive_subquery_limit'
+set global expensive_subquery_limit="foo";
+ERROR 42000: Incorrect argument type to variable 'expensive_subquery_limit'
+SET @@global.expensive_subquery_limit = @start_global_value;
+SELECT @@global.expensive_subquery_limit;
+@@global.expensive_subquery_limit
+100
diff --git a/mysql-test/suite/sys_vars/r/innodb_merge_sort_block_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_merge_sort_block_size_basic.result
new file mode 100644
index 00000000000..90c2954e43d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_merge_sort_block_size_basic.result
@@ -0,0 +1,24 @@
+SELECT @@global.innodb_merge_sort_block_size;
+@@global.innodb_merge_sort_block_size
+1048576
+SELECT @@session.innodb_merge_sort_block_size;
+@@session.innodb_merge_sort_block_size
+1048576
+SET @old_global=@@global.innodb_merge_sort_block_size;
+SET @old_session=@@session.innodb_merge_sort_block_size;
+SET @@global.innodb_merge_sort_block_size = 2*1024*1024;
+SET @@session.innodb_merge_sort_block_size = 4*1024*1024;
+SELECT @@global.innodb_merge_sort_block_size;
+@@global.innodb_merge_sort_block_size
+2097152
+SELECT @@session.innodb_merge_sort_block_size;
+@@session.innodb_merge_sort_block_size
+4194304
+SET @@global.innodb_merge_sort_block_size = 1024*1024*1024+1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_merge_sort_block_size value: '1073741825'
+SELECT @@global.innodb_merge_sort_block_size;
+@@global.innodb_merge_sort_block_size
+1073741824
+SET @@global.innodb_merge_sort_block_size=@old_global;
+SET @@session.innodb_merge_sort_block_size=@old_session;
diff --git a/mysql-test/suite/sys_vars/t/expensive_subquery_limit_basic.test b/mysql-test/suite/sys_vars/t/expensive_subquery_limit_basic.test
new file mode 100644
index 00000000000..c86433e94f5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/expensive_subquery_limit_basic.test
@@ -0,0 +1,38 @@
+SET @start_global_value = @@global.expensive_subquery_limit;
+SELECT @start_global_value;
+
+#
+# exists as global and session
+#
+select @@global.expensive_subquery_limit;
+select @@session.expensive_subquery_limit;
+show global variables like 'expensive_subquery_limit';
+show session variables like 'expensive_subquery_limit';
+select * from information_schema.global_variables where variable_name='expensive_subquery_limit';
+select * from information_schema.session_variables where variable_name='expensive_subquery_limit';
+
+#
+# show that it's writable
+#
+set global expensive_subquery_limit=10;
+set session expensive_subquery_limit=20;
+select @@global.expensive_subquery_limit;
+select @@session.expensive_subquery_limit;
+show global variables like 'expensive_subquery_limit';
+show session variables like 'expensive_subquery_limit';
+select * from information_schema.global_variables where variable_name='expensive_subquery_limit';
+select * from information_schema.session_variables where variable_name='expensive_subquery_limit';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global expensive_subquery_limit=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global expensive_subquery_limit=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global expensive_subquery_limit="foo";
+
+SET @@global.expensive_subquery_limit = @start_global_value;
+SELECT @@global.expensive_subquery_limit;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_merge_sort_block_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_merge_sort_block_size_basic.test
new file mode 100644
index 00000000000..2ec4870f345
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_merge_sort_block_size_basic.test
@@ -0,0 +1,19 @@
+--source include/have_xtradb.inc
+
+SELECT @@global.innodb_merge_sort_block_size;
+SELECT @@session.innodb_merge_sort_block_size;
+
+SET @old_global=@@global.innodb_merge_sort_block_size;
+SET @old_session=@@session.innodb_merge_sort_block_size;
+
+SET @@global.innodb_merge_sort_block_size = 2*1024*1024;
+SET @@session.innodb_merge_sort_block_size = 4*1024*1024;
+
+SELECT @@global.innodb_merge_sort_block_size;
+SELECT @@session.innodb_merge_sort_block_size;
+
+SET @@global.innodb_merge_sort_block_size = 1024*1024*1024+1;
+SELECT @@global.innodb_merge_sort_block_size;
+
+SET @@global.innodb_merge_sort_block_size=@old_global;
+SET @@session.innodb_merge_sort_block_size=@old_session;