summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/CMakeLists.txt2
-rwxr-xr-xmysql-test/collections/default.weekly3
-rw-r--r--mysql-test/include/ctype_filesort2.inc9
-rw-r--r--mysql-test/include/index_merge_ror_cpk.inc3
-rw-r--r--mysql-test/include/mtr_check.sql15
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process.cc2
-rw-r--r--mysql-test/lib/My/SysInfo.pm3
-rwxr-xr-xmysql-test/mysql-test-run.pl1
-rw-r--r--mysql-test/r/comments.result6
-rw-r--r--mysql-test/r/ctype_utf16.result15
-rw-r--r--mysql-test/r/ctype_utf16le.result15
-rw-r--r--mysql-test/r/ctype_utf32.result15
-rw-r--r--mysql-test/r/ctype_utf8mb4.result15
-rw-r--r--mysql-test/r/derived_view.result2
-rw-r--r--mysql-test/r/distinct.result40
-rw-r--r--mysql-test/r/error_simulation.result2
-rw-r--r--mysql-test/r/events_trans.result1
-rw-r--r--mysql-test/r/func_compress.result1
-rw-r--r--mysql-test/r/func_group.result11
-rw-r--r--mysql-test/r/func_misc.result10
-rw-r--r--mysql-test/r/func_regexp.result2
-rw-r--r--mysql-test/r/func_str.result1
-rw-r--r--mysql-test/r/gis-precise.result3
-rw-r--r--mysql-test/r/gis.result21
-rw-r--r--mysql-test/r/index_intersect_innodb.result16
-rw-r--r--mysql-test/r/index_merge_innodb.result3
-rw-r--r--mysql-test/r/index_merge_myisam.result3
-rw-r--r--mysql-test/r/join_outer.result2
-rw-r--r--mysql-test/r/join_outer_jcl6.result2
-rw-r--r--mysql-test/r/mysqld--help.result4
-rw-r--r--mysql-test/r/mysqldump.result14
-rw-r--r--mysql-test/r/partition.result67
-rw-r--r--mysql-test/r/partition_order.result2
-rw-r--r--mysql-test/r/ps.result11
-rw-r--r--mysql-test/r/range_vs_index_merge.result3
-rw-r--r--mysql-test/r/range_vs_index_merge_innodb.result7
-rw-r--r--mysql-test/r/rpl_mysqldump_slave.result7
-rw-r--r--mysql-test/r/select.result6
-rw-r--r--mysql-test/r/select_jcl6.result6
-rw-r--r--mysql-test/r/select_pkeycache.result6
-rw-r--r--mysql-test/r/selectivity.result17
-rw-r--r--mysql-test/r/selectivity_innodb.result17
-rw-r--r--mysql-test/r/ssl.result4
-rw-r--r--mysql-test/r/stat_tables_par.result4
-rw-r--r--mysql-test/r/stat_tables_par_innodb.result28
-rw-r--r--mysql-test/r/subselect.result4
-rw-r--r--mysql-test/r/subselect2.result4
-rw-r--r--mysql-test/r/subselect4.result27
-rw-r--r--mysql-test/r/subselect_exists_to_in.result4
-rw-r--r--mysql-test/r/subselect_extra.result4
-rw-r--r--mysql-test/r/subselect_no_mat.result4
-rw-r--r--mysql-test/r/subselect_no_opts.result4
-rw-r--r--mysql-test/r/subselect_no_scache.result4
-rw-r--r--mysql-test/r/subselect_no_semijoin.result4
-rw-r--r--mysql-test/r/subselect_sj.result16
-rw-r--r--mysql-test/r/subselect_sj2.result17
-rw-r--r--mysql-test/r/subselect_sj2_jcl6.result17
-rw-r--r--mysql-test/r/subselect_sj2_mat.result17
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result16
-rw-r--r--mysql-test/r/type_datetime.result4
-rw-r--r--mysql-test/r/udf_debug_sync.result20
-rw-r--r--mysql-test/r/union_crash-714.result5
-rw-r--r--mysql-test/r/view.result2
-rw-r--r--mysql-test/r/xml.result3
-rw-r--r--mysql-test/std_data/cacert.pem31
-rw-r--r--mysql-test/std_data/client-cert.pem95
-rw-r--r--mysql-test/std_data/client-key.pem26
-rw-r--r--mysql-test/std_data/server-cert.pem90
-rw-r--r--mysql-test/std_data/server-key.pem20
-rw-r--r--mysql-test/std_data/server8k-cert.pem116
-rw-r--r--mysql-test/std_data/server8k-key.pem110
-rw-r--r--mysql-test/suite.pm12
-rw-r--r--mysql-test/suite/federated/federated_maybe_16324629.result16
-rw-r--r--mysql-test/suite/federated/federated_maybe_16324629.test23
-rw-r--r--mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result39
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result7
-rw-r--r--mysql-test/suite/innodb/r/row_lock.result16
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test75
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test4
-rw-r--r--mysql-test/suite/innodb/t/row_lock.test53
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-create-options.result (renamed from mysql-test/suite/innodb/r/innodb-create-options.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-zip.result (renamed from mysql-test/suite/innodb/r/innodb-zip.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug36169.result (renamed from mysql-test/suite/innodb/r/innodb_bug36169.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug36172.result (renamed from mysql-test/suite/innodb/r/innodb_bug36172.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug52745.result (renamed from mysql-test/suite/innodb/r/innodb_bug52745.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug53591.result (renamed from mysql-test/suite/innodb/r/innodb_bug53591.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug56680.result (renamed from mysql-test/suite/innodb/r/innodb_bug56680.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result (renamed from mysql-test/suite/innodb/r/innodb_cmp_drop_table.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result (renamed from mysql-test/suite/innodb/r/innodb_index_large_prefix.result)0
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result (renamed from mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb-create-options.test (renamed from mysql-test/suite/innodb/t/innodb-create-options.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb-zip.test (renamed from mysql-test/suite/innodb/t/innodb-zip.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36169.test (renamed from mysql-test/suite/innodb/t/innodb_bug36169.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36172.test (renamed from mysql-test/suite/innodb/t/innodb_bug36172.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug52745.test (renamed from mysql-test/suite/innodb/t/innodb_bug52745.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug53591.test (renamed from mysql-test/suite/innodb/t/innodb_bug53591.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug56680.test (renamed from mysql-test/suite/innodb/t/innodb_bug56680.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt (renamed from mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test (renamed from mysql-test/suite/innodb/t/innodb_cmp_drop_table.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test (renamed from mysql-test/suite/innodb/t/innodb_index_large_prefix.test)0
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test (renamed from mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test)0
-rw-r--r--mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/progress_report_time_basic.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result5
-rw-r--r--mysql-test/suite/vcol/t/vcol_misc.test7
-rw-r--r--mysql-test/t/comments.test2
-rw-r--r--mysql-test/t/distinct.test38
-rw-r--r--mysql-test/t/error_simulation.test2
-rw-r--r--mysql-test/t/events_trans.test1
-rw-r--r--mysql-test/t/func_group.test12
-rw-r--r--mysql-test/t/func_misc.test11
-rw-r--r--mysql-test/t/gis-precise.test3
-rw-r--r--mysql-test/t/gis.test18
-rw-r--r--mysql-test/t/mysqldump.test15
-rw-r--r--mysql-test/t/partition.test332
-rw-r--r--mysql-test/t/ps.test15
-rw-r--r--mysql-test/t/range_vs_index_merge.test3
-rw-r--r--mysql-test/t/rpl_mysqldump_slave.test9
-rw-r--r--mysql-test/t/selectivity.test20
-rw-r--r--mysql-test/t/stat_tables_par.test4
-rw-r--r--mysql-test/t/subselect4.test35
-rw-r--r--mysql-test/t/subselect_sj.test18
-rw-r--r--mysql-test/t/subselect_sj2.test18
-rw-r--r--mysql-test/t/udf_debug_sync.test40
-rw-r--r--mysql-test/t/union_crash-714.test9
-rw-r--r--mysql-test/t/xml.test5
128 files changed, 1660 insertions, 349 deletions
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt
index 227e490331f..2948fb88069 100644
--- a/mysql-test/CMakeLists.txt
+++ b/mysql-test/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly
index 40f0548f374..a03e2593cfe 100755
--- a/mysql-test/collections/default.weekly
+++ b/mysql-test/collections/default.weekly
@@ -5,3 +5,6 @@ perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
+
+# Run innodb compression tests
+perl mysql-test-run.pl --force --debug-server --comment=innodb_compression --vardir=var-innodb-zip --big-test --testcase-timeout=60 --parallel=auto --experimental=collections/default.experimental --suite=innodb_zip
diff --git a/mysql-test/include/ctype_filesort2.inc b/mysql-test/include/ctype_filesort2.inc
index 7b09eb482a5..7b576034136 100644
--- a/mysql-test/include/ctype_filesort2.inc
+++ b/mysql-test/include/ctype_filesort2.inc
@@ -14,3 +14,12 @@ SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
ALTER TABLE t1 ADD KEY(a);
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
DROP TABLE IF EXISTS t1;
+--echo #
+--echo # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
+--echo # OUT-OF-ORDER RESULTS
+--echo #
+CREATE TABLE t1 SELECT ('a a') as n;
+INSERT INTO t1 VALUES('a b');
+SELECT * FROM t1 ORDER BY LOWER(n) ASC;
+SELECT * FROM t1 ORDER BY LOWER(n) DESC;
+DROP TABLE t1;
diff --git a/mysql-test/include/index_merge_ror_cpk.inc b/mysql-test/include/index_merge_ror_cpk.inc
index 3912aa34026..df42745b4fc 100644
--- a/mysql-test/include/index_merge_ror_cpk.inc
+++ b/mysql-test/include/index_merge_ror_cpk.inc
@@ -79,8 +79,11 @@ select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
# Verify that CPK is always used for index intersection scans
# (this is because it is used as a filter, not for retrieval)
explain select * from t1 where badkey=1 and key1=10;
+set @tmp_index_merge_ror_cpk=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
--replace_column 9 ROWS
explain select * from t1 where pk1 < 7500 and key1 = 10;
+set optimizer_switch=@tmp_index_merge_ror_cpk;
# Verify that keys with 'tails' of PK members are ok.
explain select * from t1 where pktail1ok=1 and key1=10;
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql
index 31e89b84ae9..e34e32ad1a6 100644
--- a/mysql-test/include/mtr_check.sql
+++ b/mysql-test/include/mtr_check.sql
@@ -1,4 +1,5 @@
--- Copyright (c) 2008, 2011, Oracle and/or its affiliates
+-- Copyright (c) 2008, 2013, Oracle and/or its affiliates
+-- Copyright (c) 2009, 2013, SkySQL Ab
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -57,6 +58,16 @@ BEGIN
WHERE table_schema='mysql' AND table_name != 'ndb_apply_status'
ORDER BY columns_in_mysql;
+ -- Dump all events, there should be none
+ SELECT * FROM INFORMATION_SCHEMA.EVENTS;
+ -- Dump all triggers except mtr internals, there should be none
+ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS
+ WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert');
+ -- Dump all created procedures, there should be none
+ SELECT * FROM INFORMATION_SCHEMA.ROUTINES;
+
+ SHOW STATUS LIKE 'slave_open_temp_tables';
+
-- Checksum system tables to make sure they have been properly
-- restored after test
checksum table
@@ -85,7 +96,5 @@ BEGIN
select * from information_schema.session_variables
where variable_name = 'debug_sync';
- show status like 'slave_open_temp_tables';
-
END||
diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc
index 007acf77617..f19ca622278 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2011, Oracle and/or its affiliates
+/* Copyright (c) 2008, 2012, Oracle and/or its affiliates
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SysInfo.pm b/mysql-test/lib/My/SysInfo.pm
index 36c50ab91d1..4cca116620e 100644
--- a/mysql-test/lib/My/SysInfo.pm
+++ b/mysql-test/lib/My/SysInfo.pm
@@ -1,6 +1,5 @@
# -*- cperl -*-
-# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 0e0dac16aa3..689320f7cd4 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -174,6 +174,7 @@ my @DEFAULT_SUITES= qw(
heap-
innodb-
innodb_fts-
+ innodb_zip-
maria-
multi_source-
optimizer_unfixed_bugs-
diff --git a/mysql-test/r/comments.result b/mysql-test/r/comments.result
index ce817b5012f..c13eb510326 100644
--- a/mysql-test/r/comments.result
+++ b/mysql-test/r/comments.result
@@ -35,6 +35,12 @@ select 1 /*M!50000 +1 */;
select 1 /*M!50300 +1 */;
1 +1
2
+select 2 /*M!99999 +1 */;
+2 +1
+3
+select 2 /*M!100000 +1 */;
+2 +1
+3
select 2 /*M!999999 +1 */;
2
2
diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result
index 6925da6b206..5c75bc098e3 100644
--- a/mysql-test/r/ctype_utf16.result
+++ b/mysql-test/r/ctype_utf16.result
@@ -671,6 +671,21 @@ FF9D EFBE9D
D800DF84 F0908E84
DBC0DC00 F4808080
DROP TABLE IF EXISTS t1;
+#
+# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
+# OUT-OF-ORDER RESULTS
+#
+CREATE TABLE t1 SELECT ('a a') as n;
+INSERT INTO t1 VALUES('a b');
+SELECT * FROM t1 ORDER BY LOWER(n) ASC;
+n
+a a
+a b
+SELECT * FROM t1 ORDER BY LOWER(n) DESC;
+n
+a b
+a a
+DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf16_bin
diff --git a/mysql-test/r/ctype_utf16le.result b/mysql-test/r/ctype_utf16le.result
index 8f63dda2adc..baf3f4bb0f8 100644
--- a/mysql-test/r/ctype_utf16le.result
+++ b/mysql-test/r/ctype_utf16le.result
@@ -714,6 +714,21 @@ HEX(a) HEX(CONVERT(a USING utf8mb4))
00D884DF F0908E84
C0DB00DC F4808080
DROP TABLE IF EXISTS t1;
+#
+# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
+# OUT-OF-ORDER RESULTS
+#
+CREATE TABLE t1 SELECT ('a a') as n;
+INSERT INTO t1 VALUES('a b');
+SELECT * FROM t1 ORDER BY LOWER(n) ASC;
+n
+a a
+a b
+SELECT * FROM t1 ORDER BY LOWER(n) DESC;
+n
+a b
+a a
+DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf16le_bin
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index e0bede76fb7..b67de4d0051 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -670,6 +670,21 @@ HEX(a) HEX(CONVERT(a USING utf8mb4))
00010384 F0908E84
00100000 F4808080
DROP TABLE IF EXISTS t1;
+#
+# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
+# OUT-OF-ORDER RESULTS
+#
+CREATE TABLE t1 SELECT ('a a') as n;
+INSERT INTO t1 VALUES('a b');
+SELECT * FROM t1 ORDER BY LOWER(n) ASC;
+n
+a a
+a b
+SELECT * FROM t1 ORDER BY LOWER(n) DESC;
+n
+a b
+a a
+DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf32_bin
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index 73ceae39295..55d5c6eed86 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -1149,6 +1149,21 @@ EFBE9D EFBE9D
F0908E84 F0908E84
F4808080 F4808080
DROP TABLE IF EXISTS t1;
+#
+# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
+# OUT-OF-ORDER RESULTS
+#
+CREATE TABLE t1 SELECT ('a a') as n;
+INSERT INTO t1 VALUES('a b');
+SELECT * FROM t1 ORDER BY LOWER(n) ASC;
+n
+a a
+a b
+SELECT * FROM t1 ORDER BY LOWER(n) DESC;
+n
+a b
+a a
+DROP TABLE t1;
select @@collation_connection;
@@collation_connection
utf8mb4_bin
diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result
index cbf5900d57c..80d2d64dced 100644
--- a/mysql-test/r/derived_view.result
+++ b/mysql-test/r/derived_view.result
@@ -2253,7 +2253,7 @@ EXPLAIN EXTENDED SELECT a FROM v1 WHERE a > 100 ORDER BY b;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select 4 AS `a` from dual where (4 > 100) order by 1
+Note 1003 select 4 AS `a` from dual where 0 order by 1
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE IF NOT EXISTS `galleries` (
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index 019099bde14..6f68483f684 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -999,4 +999,44 @@ c
11112222
33334444
DROP TABLE t1;
+#
+# Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN.
+# Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK
+#
+SET @tmp_table_size_save= @@tmp_table_size;
+SET @@tmp_table_size= 1024;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
+INSERT INTO t1 SELECT a+8 FROM t1;
+INSERT INTO t1 SELECT a+16 FROM t1;
+INSERT INTO t1 SELECT a+32 FROM t1;
+INSERT INTO t1 SELECT a+64 FROM t1;
+INSERT INTO t1 VALUE(NULL);
+SELECT COUNT(DISTINCT a) FROM t1;
+COUNT(DISTINCT a)
+128
+SELECT COUNT(DISTINCT (a+0)) FROM t1;
+COUNT(DISTINCT (a+0))
+128
+DROP TABLE t1;
+create table tb(
+id int auto_increment primary key,
+v varchar(32))
+engine=myisam charset=gbk;
+insert into tb(v) values("aaa");
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+update tb set v=concat(v, id);
+select count(distinct case when id<=64 then id end) from tb;
+count(distinct case when id<=64 then id end)
+64
+select count(distinct case when id<=63 then id end) from tb;
+count(distinct case when id<=63 then id end)
+63
+drop table tb;
+SET @@tmp_table_size= @tmp_table_size_save;
End of 5.5 tests
diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result
index 88a9d114bc6..006c51d1880 100644
--- a/mysql-test/r/error_simulation.result
+++ b/mysql-test/r/error_simulation.result
@@ -94,7 +94,7 @@ INSERT INTO t1 VALUES (1),(2);
INSERT INTO t2 VALUES (1),(2);
SET SESSION debug_dbug="+d,bug11747970_raise_error";
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
-ERROR HY000: Unknown error
+ERROR 70100: Query execution was interrupted
SET SESSION debug_dbug = DEFAULT;
DROP TABLE t1,t2;
#
diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result
index 37951c30787..084587079ba 100644
--- a/mysql-test/r/events_trans.result
+++ b/mysql-test/r/events_trans.result
@@ -135,3 +135,4 @@ SELECT * FROM t2;
a
ROLLBACK WORK TO SAVEPOINT A;
DROP TABLE t1, t2;
+DROP EVENT e1;
diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result
index c2f1e5bf273..011dec4d555 100644
--- a/mysql-test/r/func_compress.result
+++ b/mysql-test/r/func_compress.result
@@ -102,7 +102,6 @@ a
foo
Warnings:
Warning 1259 ZLIB: Input data corrupted
-Warning 1259 ZLIB: Input data corrupted
explain select *, uncompress(a) from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 8e50c045775..8e2bdeae93c 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1458,6 +1458,8 @@ DROP TABLE derived1;
DROP TABLE D;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,1), (1,2), (1,3);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (3),(4);
SET SQL_MODE='ONLY_FULL_GROUP_BY';
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -1473,12 +1475,19 @@ COUNT(*)
SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a)
FROM t1 outr;
ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
+SELECT COUNT(*) FROM t1 outr, (SELECT b, count(*) FROM t2) as t3;
+ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
+SELECT COUNT(*) FROM t1 outr where (1,1) in (SELECT a, count(*) FROM t2);
+COUNT(*)
+0
SELECT COUNT(*) FROM t1 a JOIN t1 outr
ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a);
COUNT(*)
0
+SELECT * FROM (SELECT a FROM t1 GROUP BY a) sq JOIN t2 ON a = b;
+a b
SET SQL_MODE=default;
-DROP TABLE t1;
+DROP TABLE t1,t2;
End of 5.0 tests
#
# BUG#47280 - strange results from count(*) with order by multiple
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index a033c91bc05..1d1300a96db 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -264,6 +264,13 @@ INET_NTOA(0)
SELECT '1' IN ('1', INET_NTOA(0));
'1' IN ('1', INET_NTOA(0))
1
+SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
+ERROR HY000: Incorrect arguments to NAME_CONST
+SELECT NAME_CONST('a', -(1 AND 2)) AND 1;
+ERROR HY000: Incorrect arguments to NAME_CONST
+SELECT NAME_CONST('a', -(1)) OR 1;
+NAME_CONST('a', -(1)) OR 1
+1
#
# Bug #52165: Assertion failed: file .\dtoa.c, line 465
#
@@ -561,6 +568,3 @@ ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#
# End of 5.5 tests
#
-#
-# End of tests
-#
diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result
index 78b8e5d908a..f405a2297cb 100644
--- a/mysql-test/r/func_regexp.result
+++ b/mysql-test/r/func_regexp.result
@@ -52,7 +52,7 @@ explain extended select * from t1 where xxx regexp('is a test of some long text
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select 'this is a test of some long text to see what happens' AS `xxx` from dual where ('this is a test of some long text to see what happens' regexp 'is a test of some long text to')
+Note 1003 select 'this is a test of some long text to see what happens' AS `xxx` from dual where 1
select * from t1 where xxx regexp('is a test of some long text to ');
xxx
this is a test of some long text to see what happens
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index a5280f13ada..c9d7b6636c4 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -1153,7 +1153,6 @@ str num
notnumber 0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'notnumber'
-Warning 1292 Truncated incorrect DOUBLE value: 'notnumber'
SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6);
str num
notnumber 0
diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result
index 3b07be3930a..71eed65b2ea 100644
--- a/mysql-test/r/gis-precise.result
+++ b/mysql-test/r/gis-precise.result
@@ -452,3 +452,6 @@ ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
0.0 -3.0
))' ),
136
+select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1));
+astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1))
+GEOMETRYCOLLECTION EMPTY
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index fa7b93092d9..9acdb1a87c2 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1574,6 +1574,27 @@ SELECT 1 FROM g1 WHERE a >= ANY
1
DROP TABLE g1;
#
+# Bug#16451878 GEOMETRY QUERY CRASHES SERVER
+#
+# should not crash
+SELECT ASTEXT(0x0100000000030000000100000000000010);
+ASTEXT(0x0100000000030000000100000000000010)
+NULL
+#should not crash
+SELECT ENVELOPE(0x0100000000030000000100000000000010);
+ENVELOPE(0x0100000000030000000100000000000010)
+NULL
+#should not crash
+SELECT
+GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
+GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1)
+NULL
+#should not crash
+SELECT
+GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
+GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1)
+NULL
+#
# MDEV-3819 missing constraints for spatial column types
#
create table t1 (pt point);
diff --git a/mysql-test/r/index_intersect_innodb.result b/mysql-test/r/index_intersect_innodb.result
index d28b3a0bf92..33f2247e5d1 100644
--- a/mysql-test/r/index_intersect_innodb.result
+++ b/mysql-test/r/index_intersect_innodb.result
@@ -463,29 +463,29 @@ EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,3 NULL # Using sort_intersect(PRIMARY,Country); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,7 NULL # Using sort_intersect(PRIMARY,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
AND Country BETWEEN 'S' AND 'Z';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
SELECT * FROM City USE INDEX ()
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
@@ -739,13 +739,13 @@ EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
SELECT * FROM City WHERE
Name LIKE 'C%' AND Population > 1000000;
ID Name Country Population
@@ -1033,7 +1033,7 @@ EXPLAIN
SELECT * FROM t1
WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,35 NULL # Using sort_intersect(PRIMARY,f4); Using where
+1 SIMPLE t1 index_merge PRIMARY,f4 PRIMARY,f4 4,39 NULL # Using sort_intersect(PRIMARY,f4); Using where
SELECT * FROM t1
WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
f1 f4 f5
diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result
index b93d15f7bef..5202c79f3c7 100644
--- a/mysql-test/r/index_merge_innodb.result
+++ b/mysql-test/r/index_merge_innodb.result
@@ -580,9 +580,12 @@ pk1 pk2
explain select * from t1 where badkey=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
+set @tmp_index_merge_ror_cpk=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
explain select * from t1 where pk1 < 7500 and key1 = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where
+set optimizer_switch=@tmp_index_merge_ror_cpk;
explain select * from t1 where pktail1ok=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where
diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result
index 2fa2d5bcce1..2c0dc77399f 100644
--- a/mysql-test/r/index_merge_myisam.result
+++ b/mysql-test/r/index_merge_myisam.result
@@ -1415,9 +1415,12 @@ pk1 pk2
explain select * from t1 where badkey=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1 key1 4 const 91 Using where
+set @tmp_index_merge_ror_cpk=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
explain select * from t1 where pk1 < 7500 and key1 = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref PRIMARY,key1 key1 4 const ROWS Using where
+set optimizer_switch=@tmp_index_merge_ror_cpk;
explain select * from t1 where pktail1ok=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail1ok pktail1ok 4 const 76 Using where
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 4a806e0831c..e303c288552 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1311,7 +1311,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce(1,NULL),3) in ((1,3),(2,2)))
+Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where 1
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
f1 f2 f3 f1 f2
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index 6a543f920e4..88f2fd7c630 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -1322,7 +1322,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce(1,NULL),3) in ((1,3),(2,2)))
+Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where 1
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
f1 f2 f3 f1 f2
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index 53048939fa9..9b2b6e12a14 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -1183,7 +1183,7 @@ old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-selectivity-sampling-limit 100
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on
optimizer-use-condition-selectivity 1
performance-schema TRUE
performance-schema-accounts-size 10
@@ -1234,7 +1234,7 @@ port 3306
port-open-timeout 0
preload-buffer-size 32768
profiling-history-size 15
-progress-report-time 56
+progress-report-time 5
protocol-version 10
query-alloc-block-size 8192
query-cache-limit 1048576
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index a473279ce40..c67a7a00425 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -5265,6 +5265,20 @@ slow_log CREATE TABLE `slow_log` (
SET @@global.log_output= @old_log_output_state;
SET @@global.slow_query_log= @old_slow_query_log_state;
SET @@global.general_log= @old_general_log_state;
+# MDEV-5481 mysqldump fails to dump geometry types properly
+create table t1 (g GEOMETRY) CHARSET koi8r;
+create table t2 (g GEOMETRY) CHARSET koi8r;
+insert into t1 values (point(1,1)), (point(2,2));
+##################################################
+\0\0\0\0\0\0\0\0\0\0\0\0\0ð?\0\0\0\0\0\0ð?
+\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@
+##################################################
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
+select astext(g) from t2;
+astext(g)
+POINT(1 1)
+POINT(2 2)
+drop table t1, t2;
#
# End of 5.1 tests
#
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index e57715d1eb6..5ea037df759 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -2534,6 +2534,73 @@ i
3
4
DROP TABLE t1;
+#
+# MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
+#
+create table t1 (
+a int not null,
+b int not null,
+pk int not null,
+primary key (pk),
+key(a),
+key(b)
+) partition by hash(pk) partitions 10;
+insert into t1 values (1,2,4);
+insert into t1 values (1,0,17);
+insert into t1 values (1,2,25);
+insert into t1 values (10,20,122);
+insert into t1 values (10,20,123);
+create table t2 (a int);
+insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C;
+insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
+10+A.a + 10*B.a + 100*C.a + 1000*D.a,
+2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
+from t2 A, t2 B, t2 C ,t2 D;
+explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref PRIMARY,a,b b 4 const 982 Using where
+create temporary table t3 as
+select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
+select count(*) from t3;
+count(*)
+802
+drop table t3;
+create temporary table t3 as
+select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ;
+select count(*) from t3;
+count(*)
+802
+drop table t3;
+drop table t1,t2;
+#
+# MDEV-5555: Incorrect index_merge on BTREE indices
+#
+CREATE TABLE t1 (
+id bigint(20) unsigned NOT NULL,
+id2 bigint(20) unsigned NOT NULL,
+dob date DEFAULT NULL,
+address char(100) DEFAULT NULL,
+city char(35) DEFAULT NULL,
+hours_worked_per_week smallint(5) unsigned DEFAULT NULL,
+weeks_worked_last_year tinyint(3) unsigned DEFAULT NULL,
+KEY dob (dob),
+KEY address (address),
+KEY city (city),
+KEY hours_worked_per_week (hours_worked_per_week),
+KEY weeks_worked_last_year (weeks_worked_last_year)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+PARTITION BY KEY (id) PARTITIONS 5;
+# Insert some rows
+select * from t1 where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21';
+id id2 dob address city hours_worked_per_week weeks_worked_last_year
+16 16 1949-11-07 address16 city16 40 52
+50 50 1923-09-08 address50 city50 40 52
+select * from t1 IGNORE INDEX(dob, weeks_worked_last_year, hours_worked_per_week) where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21';
+id id2 dob address city hours_worked_per_week weeks_worked_last_year
+16 16 1949-11-07 address16 city16 40 52
+50 50 1923-09-08 address50 city50 40 52
+drop table t1;
CREATE TABLE t1 ( d DATE NOT NULL)
PARTITION BY RANGE( YEAR(d) ) (
PARTITION p0 VALUES LESS THAN (1960),
diff --git a/mysql-test/r/partition_order.result b/mysql-test/r/partition_order.result
index 78ff7cd3121..06c1b63a382 100644
--- a/mysql-test/r/partition_order.result
+++ b/mysql-test/r/partition_order.result
@@ -752,8 +752,8 @@ select * from t1 force index (b) where b < 10 ORDER BY b DESC;
a b
6 6
4 5
-2 4
30 4
+2 4
3 3
35 2
7 1
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 4ac47bb8554..ec680b112a3 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -4041,3 +4041,14 @@ DEALLOCATE PREPARE stmt;
DROP VIEW v2;
DROP TABLE t1, t2;
# End of 5.3 tests
+#
+# MDEV-5505: Assertion `! is_set()' fails on PREPARE SELECT
+# with out of range in GROUP BY
+#
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1";
+ERROR 22003: BIGINT UNSIGNED value is out of range in '(18446744073709551615 + 1)'
+SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1;
+ERROR 22003: BIGINT UNSIGNED value is out of range in '(18446744073709551615 + 1)'
+drop table t1;
+# End of 5.3 tests
diff --git a/mysql-test/r/range_vs_index_merge.result b/mysql-test/r/range_vs_index_merge.result
index 424b1009a97..1b12a9f5512 100644
--- a/mysql-test/r/range_vs_index_merge.result
+++ b/mysql-test/r/range_vs_index_merge.result
@@ -797,6 +797,8 @@ EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Pa%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 41 Using index condition
+set @tmp_range_vs_index_merge=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 102000) OR
@@ -985,6 +987,7 @@ ID Name Country Population
3798 Phoenix USA 1321045
DROP INDEX Population ON City;
DROP INDEX Name ON City;
+set optimizer_switch=@tmp_range_vs_index_merge;
EXPLAIN
SELECT * FROM City
WHERE Country='USA' AND Population BETWEEN 101000 AND 102000 OR
diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result
index 67e341192da..8428936d25f 100644
--- a/mysql-test/r/range_vs_index_merge_innodb.result
+++ b/mysql-test/r/range_vs_index_merge_innodb.result
@@ -65,7 +65,7 @@ Country IN ('CAN', 'ARG') AND ID < 3800 OR
Country < 'U' AND Name LIKE 'Zhu%' OR
ID BETWEEN 3800 AND 3810;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 125 Using sort_union(Name,Country,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 123 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE (Population > 101000 AND Population < 115000);
@@ -362,7 +362,7 @@ WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 900 AND 1500) AND
(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 681 Using sort_union(Name,Country,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 680 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
@@ -798,6 +798,8 @@ EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Pa%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 71 Using index condition
+set @tmp_range_vs_index_merge=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 102000) OR
@@ -986,6 +988,7 @@ ID Name Country Population
3798 Phoenix USA 1321045
DROP INDEX Population ON City;
DROP INDEX Name ON City;
+set optimizer_switch=@tmp_range_vs_index_merge;
EXPLAIN
SELECT * FROM City
WHERE Country='USA' AND Population BETWEEN 101000 AND 102000 OR
diff --git a/mysql-test/r/rpl_mysqldump_slave.result b/mysql-test/r/rpl_mysqldump_slave.result
index e7ea0a308a9..4b29ff99f61 100644
--- a/mysql-test/r/rpl_mysqldump_slave.result
+++ b/mysql-test/r/rpl_mysqldump_slave.result
@@ -11,4 +11,11 @@ START ALL SLAVES;
STOP ALL SLAVES;
CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
START ALL SLAVES;
+start slave;
+Warnings:
+Note 1254 Slave is already running
+CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+start slave;
+Warnings:
+Note 1254 Slave is already running
include/rpl_end.inc
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 005dd52c449..9bcd0a90ecf 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -5321,7 +5321,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0)
+Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0
DROP TABLE t1;
SELECT * FROM mysql.time_zone
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
@@ -5344,7 +5344,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
Warnings:
-Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
+Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8)
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
WHERE 1 IS NULL OR b < 33 AND b = c;
a b c
@@ -5468,7 +5468,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0))
+Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6))
INSERT INTO t1 VALUES (3,1,6);
SELECT * FROM t1, t2
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result
index 0113791b799..36babd0f390 100644
--- a/mysql-test/r/select_jcl6.result
+++ b/mysql-test/r/select_jcl6.result
@@ -5332,7 +5332,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0)
+Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0
DROP TABLE t1;
SELECT * FROM mysql.time_zone
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
@@ -5355,7 +5355,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
Warnings:
-Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
+Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8)
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
WHERE 1 IS NULL OR b < 33 AND b = c;
a b c
@@ -5479,7 +5479,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0))
+Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6))
INSERT INTO t1 VALUES (3,1,6);
SELECT * FROM t1, t2
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result
index 005dd52c449..9bcd0a90ecf 100644
--- a/mysql-test/r/select_pkeycache.result
+++ b/mysql-test/r/select_pkeycache.result
@@ -5321,7 +5321,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0)
+Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0
DROP TABLE t1;
SELECT * FROM mysql.time_zone
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
@@ -5344,7 +5344,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
Warnings:
-Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
+Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8)
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
WHERE 1 IS NULL OR b < 33 AND b = c;
a b c
@@ -5468,7 +5468,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0))
+Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6))
INSERT INTO t1 VALUES (3,1,6);
SELECT * FROM t1, t2
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
diff --git a/mysql-test/r/selectivity.result b/mysql-test/r/selectivity.result
index 3704812eb04..c9fda1e0d0e 100644
--- a/mysql-test/r/selectivity.result
+++ b/mysql-test/r/selectivity.result
@@ -1166,6 +1166,23 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != '';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
#
+# Bug mdev-5630: always true conjunctive condition
+# when optimizer_use_condition_selectivity=3
+#
+set use_stat_tables = 'preferably';
+set optimizer_use_condition_selectivity = 3;
+CREATE TABLE t1 (a int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (10);
+CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (100,'0'),(101,'1');
+ANALYZE TABLE t1, t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+test.t2 analyze status OK
+SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 );
+a id flag
+DROP TABLE t1,t2;
+#
# Bug mdev-4429: join with range condition whose selectivity == 0
# when optimizer_use_condition_selectivity=3
#
diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result
index a3b6049c4d0..e6f88bf0dc2 100644
--- a/mysql-test/r/selectivity_innodb.result
+++ b/mysql-test/r/selectivity_innodb.result
@@ -1174,6 +1174,23 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != '';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
#
+# Bug mdev-5630: always true conjunctive condition
+# when optimizer_use_condition_selectivity=3
+#
+set use_stat_tables = 'preferably';
+set optimizer_use_condition_selectivity = 3;
+CREATE TABLE t1 (a int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (10);
+CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (100,'0'),(101,'1');
+ANALYZE TABLE t1, t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+test.t2 analyze status OK
+SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 );
+a id flag
+DROP TABLE t1,t2;
+#
# Bug mdev-4429: join with range condition whose selectivity == 0
# when optimizer_use_condition_selectivity=3
#
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index 88d81196dcf..868efcbdf31 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -3,10 +3,10 @@ Variable_name Value
Ssl_cipher DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Ssl_server_not_before';
Variable_name Value
-Ssl_server_not_before Jan 29 11:56:49 2010 GMT
+Ssl_server_not_before Feb 20 02:55:06 2010 GMT
SHOW STATUS LIKE 'Ssl_server_not_after';
Variable_name Value
-Ssl_server_not_after Jan 28 11:56:49 2015 GMT
+Ssl_server_not_after Sep 3 02:55:06 2030 GMT
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
diff --git a/mysql-test/r/stat_tables_par.result b/mysql-test/r/stat_tables_par.result
index a98f934fa96..f9b2a7921cb 100644
--- a/mysql-test/r/stat_tables_par.result
+++ b/mysql-test/r/stat_tables_par.result
@@ -148,7 +148,7 @@ use dbt3_s001;
set use_stat_tables='preferably';
analyze table lineitem persistent for columns() indexes (i_l_receiptdate);
set debug_sync='RESET';
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
+select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
@@ -212,7 +212,7 @@ analyze table lineitem persistent for all;
set debug_sync='open_and_process_table WAIT_FOR parker';
set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2';
use dbt3_s001;
-select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68;
+select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;;
db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment
dbt3_s001 lineitem i_l_shipdate 1 2.6500 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s
set debug_sync='RESET';
diff --git a/mysql-test/r/stat_tables_par_innodb.result b/mysql-test/r/stat_tables_par_innodb.result
index e0c00c482a0..d3cb0d54d39 100644
--- a/mysql-test/r/stat_tables_par_innodb.result
+++ b/mysql-test/r/stat_tables_par_innodb.result
@@ -151,7 +151,7 @@ use dbt3_s001;
set use_stat_tables='preferably';
analyze table lineitem persistent for columns() indexes (i_l_receiptdate);
set debug_sync='RESET';
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
+select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
@@ -161,7 +161,11 @@ dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033
dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404
dbt3_s001 lineitem i_l_partkey 1 30.0250
dbt3_s001 lineitem i_l_receiptdate 1 2.6477
+dbt3_s001 lineitem i_l_receiptdate 2 1.0152
+dbt3_s001 lineitem i_l_receiptdate 3 1.0000
dbt3_s001 lineitem i_l_shipdate 1 2.6500
+dbt3_s001 lineitem i_l_shipdate 2 1.0149
+dbt3_s001 lineitem i_l_shipdate 3 1.0000
dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
@@ -176,7 +180,11 @@ dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033
dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404
dbt3_s001 lineitem i_l_partkey 1 30.0250
dbt3_s001 lineitem i_l_receiptdate 1 2.6477
+dbt3_s001 lineitem i_l_receiptdate 2 1.0152
+dbt3_s001 lineitem i_l_receiptdate 3 1.0000
dbt3_s001 lineitem i_l_shipdate 1 2.6500
+dbt3_s001 lineitem i_l_shipdate 2 1.0149
+dbt3_s001 lineitem i_l_shipdate 3 1.0000
dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
@@ -202,15 +210,29 @@ db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0027
dbt3_s001 lineitem PRIMARY 2 1.0000
dbt3_s001 lineitem i_l_commitdate 1 2.7155
+dbt3_s001 lineitem i_l_commitdate 2 1.0364
+dbt3_s001 lineitem i_l_commitdate 3 1.0000
dbt3_s001 lineitem i_l_orderkey 1 4.0027
+dbt3_s001 lineitem i_l_orderkey 2 1.0000
dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0027
dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404
+dbt3_s001 lineitem i_l_orderkey_quantity 3 1.0000
dbt3_s001 lineitem i_l_partkey 1 30.0200
+dbt3_s001 lineitem i_l_partkey 2 1.0089
+dbt3_s001 lineitem i_l_partkey 3 1.0000
dbt3_s001 lineitem i_l_receiptdate 1 2.6473
+dbt3_s001 lineitem i_l_receiptdate 2 1.0152
+dbt3_s001 lineitem i_l_receiptdate 3 1.0000
dbt3_s001 lineitem i_l_shipdate 1 2.6496
+dbt3_s001 lineitem i_l_shipdate 2 1.0149
+dbt3_s001 lineitem i_l_shipdate 3 1.0000
dbt3_s001 lineitem i_l_suppkey 1 600.4000
+dbt3_s001 lineitem i_l_suppkey 2 1.2073
+dbt3_s001 lineitem i_l_suppkey 3 1.0000
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0200
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5771
+dbt3_s001 lineitem i_l_suppkey_partkey 3 1.0030
+dbt3_s001 lineitem i_l_suppkey_partkey 4 1.0000
set @save_global_use_stat_tables=@@global.use_stat_tables;
set global use_stat_tables='preferably';
set debug_sync='RESET';
@@ -221,9 +243,11 @@ analyze table lineitem persistent for all;
set debug_sync='open_and_process_table WAIT_FOR parker';
set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2';
use dbt3_s001;
-select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68;
+select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;;
db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment
dbt3_s001 lineitem i_l_shipdate 1 2.6496 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s
+dbt3_s001 lineitem i_l_shipdate 2 1.0149 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s
+dbt3_s001 lineitem i_l_shipdate 3 1.0000 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s
set debug_sync='RESET';
set global use_stat_tables=@save_global_use_stat_tables;
DROP DATABASE dbt3_s001;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index effa77a5eb4..b7909f7028c 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -561,7 +561,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
-Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
+Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@@ -6098,7 +6098,7 @@ FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
sq4_alias1.col_varchar_key = @var3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
SELECT @var3:=12, sq4_alias1.*
FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result
index 426e1ba39f9..034cba58c8f 100644
--- a/mysql-test/r/subselect2.result
+++ b/mysql-test/r/subselect2.result
@@ -163,7 +163,7 @@ SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index
1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index
-2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where
+2 SUBQUERY t1 const PRIMARY,a PRIMARY 4 const 1 Using where
SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b;
pk a b
0 4 4
@@ -172,7 +172,7 @@ SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index
1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index
-2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where
+2 SUBQUERY t1 const PRIMARY,a PRIMARY 4 const 1 Using where
SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b;
pk a b
0 4 4
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index 2c826cc9172..66d3fa6214a 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -2304,6 +2304,33 @@ WHERE a='r' AND (c,b) NOT IN (SELECT c,b FROM t2 WHERE (c,b)=(t.c,t.b));
a b c d
DROP TABLE t1, t2;
#
+# MDEV-5468: assertion failure with a simplified condition in subselect
+#
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1);
+CREATE TABLE t2 ( pk int PRIMARY KEY, c INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,4), (2,6);
+SELECT ( SELECT MAX(b) FROM t1, t2 WHERE pk = a AND b < from_sq.c ) AS select_sq,
+COUNT( DISTINCT from_sq.c )
+FROM ( SELECT DISTINCT t2_1.* FROM t2 AS t2_1, t2 AS t2_2 ) AS from_sq
+GROUP BY select_sq ;
+select_sq COUNT( DISTINCT from_sq.c )
+1 2
+DROP TABLE t1,t2;
+CREATE TABLE t1 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'BE','BEL');
+CREATE TABLE t2 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'BE','BEL'), (2,'MX','MEX');
+CREATE VIEW v2 AS SELECT DISTINCT * FROM t2;
+SELECT * FROM t1 AS outer_t1, v2
+WHERE v2.a3 = outer_t1.a3
+AND EXISTS ( SELECT * FROM t1 WHERE a2 < v2.a2 AND id = outer_t1.id )
+AND outer_t1.a3 < 'J'
+ORDER BY v2.id;
+id a2 a3 id a2 a3
+DROP VIEW v2;
+DROP TABLE t1,t2;
+#
# MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
diff --git a/mysql-test/r/subselect_exists_to_in.result b/mysql-test/r/subselect_exists_to_in.result
index bc9db36c8ce..0e01f585cd4 100644
--- a/mysql-test/r/subselect_exists_to_in.result
+++ b/mysql-test/r/subselect_exists_to_in.result
@@ -565,7 +565,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
-Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
+Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@@ -6106,7 +6106,7 @@ FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
sq4_alias1.col_varchar_key = @var3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
SELECT @var3:=12, sq4_alias1.*
FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
diff --git a/mysql-test/r/subselect_extra.result b/mysql-test/r/subselect_extra.result
index 5849ccda631..47cb8bca734 100644
--- a/mysql-test/r/subselect_extra.result
+++ b/mysql-test/r/subselect_extra.result
@@ -46,7 +46,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
-Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where ('2007-04-25 18:30:22' = 0)
+Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where 0
select * from t1
where id in (select id from t1 as x1 where (t1.cur_date is null));
id cur_date
@@ -57,7 +57,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
-Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where ('2007-04-25' = 0)
+Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where 0
select * from t2
where id in (select id from t2 as x1 where (t2.cur_date is null));
id cur_date
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index 975d90b8358..7bfa940bda2 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -568,7 +568,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
-Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
+Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@@ -6097,7 +6097,7 @@ FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
sq4_alias1.col_varchar_key = @var3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
SELECT @var3:=12, sq4_alias1.*
FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index f9ea3c45ee3..5083e23d461 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -564,7 +564,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
-Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
+Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@@ -6093,7 +6093,7 @@ FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
sq4_alias1.col_varchar_key = @var3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
SELECT @var3:=12, sq4_alias1.*
FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index 2bc182ac6e9..6b7dbb7baf1 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -567,7 +567,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
-Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
+Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@@ -6104,7 +6104,7 @@ FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
sq4_alias1.col_varchar_key = @var3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
SELECT @var3:=12, sq4_alias1.*
FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index a41c7636038..1fa3eb2c723 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -564,7 +564,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
-Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
+Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@@ -6093,7 +6093,7 @@ FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
sq4_alias1.col_varchar_key = @var3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
SELECT @var3:=12, sq4_alias1.*
FROM t1 AS sq4_alias1
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index b5263163cb1..c76d40d1a5f 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -2793,6 +2793,22 @@ mysql
information_schema
DROP TABLE t1;
#
+# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (2),(3);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (8),(9);
+CREATE TABLE t3 (c INT, INDEX(c));
+INSERT INTO t2 VALUES (5),(6);
+PREPARE stmt FROM
+"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
+EXECUTE stmt;
+a
+EXECUTE stmt;
+a
+DROP TABLE t1,t2,t3;
+#
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
#
CREATE TABLE t1 (
diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result
index d87514923c4..2975176c64a 100644
--- a/mysql-test/r/subselect_sj2.result
+++ b/mysql-test/r/subselect_sj2.result
@@ -1109,6 +1109,23 @@ t3 AS t3a INNER JOIN t3 AS t3b ON ( t3a.i3 = t3b.i3 )
);
i1
DROP TABLE t1,t2,t3;
+#
+# MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin
+#
+CREATE TABLE t1 (a INT) engine=innodb;
+INSERT INTO t1 VALUES (8),(9);
+CREATE TABLE t2 (b INT) engine=innodb;
+INSERT INTO t2 VALUES (2),(3);
+CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb;
+INSERT INTO t2 VALUES (4),(5);
+explain
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL No matching min/max row
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+a
+DROP TABLE t1,t2,t3;
DROP TABLE IF EXISTS t1,t2,t3,t4;
#
# MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin
diff --git a/mysql-test/r/subselect_sj2_jcl6.result b/mysql-test/r/subselect_sj2_jcl6.result
index 00e393635a2..ff97882c469 100644
--- a/mysql-test/r/subselect_sj2_jcl6.result
+++ b/mysql-test/r/subselect_sj2_jcl6.result
@@ -1124,6 +1124,23 @@ t3 AS t3a INNER JOIN t3 AS t3b ON ( t3a.i3 = t3b.i3 )
);
i1
DROP TABLE t1,t2,t3;
+#
+# MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin
+#
+CREATE TABLE t1 (a INT) engine=innodb;
+INSERT INTO t1 VALUES (8),(9);
+CREATE TABLE t2 (b INT) engine=innodb;
+INSERT INTO t2 VALUES (2),(3);
+CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb;
+INSERT INTO t2 VALUES (4),(5);
+explain
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL No matching min/max row
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+a
+DROP TABLE t1,t2,t3;
DROP TABLE IF EXISTS t1,t2,t3,t4;
#
# MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin
diff --git a/mysql-test/r/subselect_sj2_mat.result b/mysql-test/r/subselect_sj2_mat.result
index 2306f19606c..f4d7d986a9d 100644
--- a/mysql-test/r/subselect_sj2_mat.result
+++ b/mysql-test/r/subselect_sj2_mat.result
@@ -1111,6 +1111,23 @@ t3 AS t3a INNER JOIN t3 AS t3b ON ( t3a.i3 = t3b.i3 )
);
i1
DROP TABLE t1,t2,t3;
+#
+# MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin
+#
+CREATE TABLE t1 (a INT) engine=innodb;
+INSERT INTO t1 VALUES (8),(9);
+CREATE TABLE t2 (b INT) engine=innodb;
+INSERT INTO t2 VALUES (2),(3);
+CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb;
+INSERT INTO t2 VALUES (4),(5);
+explain
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL No matching min/max row
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+a
+DROP TABLE t1,t2,t3;
DROP TABLE IF EXISTS t1,t2,t3,t4;
#
# MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index 60e309cdf4a..92ad951325b 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -2807,6 +2807,22 @@ information_schema
mysql
DROP TABLE t1;
#
+# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (2),(3);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (8),(9);
+CREATE TABLE t3 (c INT, INDEX(c));
+INSERT INTO t2 VALUES (5),(6);
+PREPARE stmt FROM
+"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
+EXECUTE stmt;
+a
+EXECUTE stmt;
+a
+DROP TABLE t1,t2,t3;
+#
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
#
CREATE TABLE t1 (
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 1c8039f6b53..c508bc310e1 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -519,7 +519,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
-Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where ('2007-04-25 18:30:22' = 0)
+Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where 0
select * from t1
where id in (select id from t1 as x1 where (t1.cur_date is null));
id cur_date
@@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
-Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where ('2007-04-25' = 0)
+Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where 0
select * from t2
where id in (select id from t2 as x1 where (t2.cur_date is null));
id cur_date
diff --git a/mysql-test/r/udf_debug_sync.result b/mysql-test/r/udf_debug_sync.result
new file mode 100644
index 00000000000..2db75f9aa76
--- /dev/null
+++ b/mysql-test/r/udf_debug_sync.result
@@ -0,0 +1,20 @@
+CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
+CREATE VIEW v1 AS SELECT myfunc_int(1);
+SET debug_sync='mysql_create_function_after_lock SIGNAL locked WAIT_FOR go';
+CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+SET debug_sync='now WAIT_FOR locked';
+SET debug_sync='find_udf_before_lock SIGNAL go';
+SELECT * FROM v1;
+myfunc_int(1)
+1
+FLUSH TABLES;
+SET debug_sync='mysql_drop_function_after_lock SIGNAL locked WAIT_FOR go';
+DROP FUNCTION myfunc_double;
+SET debug_sync='now WAIT_FOR locked';
+SET debug_sync='find_udf_before_lock SIGNAL go';
+SELECT * FROM v1;
+myfunc_int(1)
+1
+SET debug_sync='RESET';
+DROP VIEW v1;
+DROP FUNCTION myfunc_int;
diff --git a/mysql-test/r/union_crash-714.result b/mysql-test/r/union_crash-714.result
new file mode 100644
index 00000000000..4a51f88b76f
--- /dev/null
+++ b/mysql-test/r/union_crash-714.result
@@ -0,0 +1,5 @@
+create table t1 (i tinyint);
+set debug_dbug='+d,bug11747970_raise_error';
+insert into t1 (i) select i from t1 union select i from t1;
+ERROR 70100: Query execution was interrupted
+drop table t1;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 5b5410f4bd6..7aadf6f75f1 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4415,7 +4415,7 @@ WHERE f1<>0 OR f2<>0 AND f4='v' AND (f2<>0 OR f3<>0 AND f5<>0 OR f4 LIKE '%b%');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select 'r' AS `f4` from dual where (20 <> 0)
+Note 1003 select 'r' AS `f4` from dual where 1
DROP VIEW v1;
DROP TABLE t1;
#
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result
index 95dad6d5510..6a4f5ace7d6 100644
--- a/mysql-test/r/xml.result
+++ b/mysql-test/r/xml.result
@@ -1161,6 +1161,9 @@ UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />')
SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b');
ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b')
aa bb
+SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)');
+ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)')
+
#
# Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars
#
diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem
index e44341384e4..f5ba4fec58d 100644
--- a/mysql-test/std_data/cacert.pem
+++ b/mysql-test/std_data/cacert.pem
@@ -1,17 +1,22 @@
-----BEGIN CERTIFICATE-----
-MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV
+MIIDsjCCApqgAwIBAgIJAL5YrUwfPSWVMA0GCSqGSIb3DQEBBQUAMEQxCzAJBgNV
BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDg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setmWLZgApRpEalGXTXJqq9sEbCfoFizg94U8G7d2
+u5XJjLVmcG34ru36KoBgVx1zeH1puBAf8dOzrE4L7Y+ZQBFzFohjh8C2LqWC4nM5
+qsLmOkDWMipGqYU5DvkKjIbTbwTyRNRgZHWSPfVDDPUIUOsY4BGUp2DpgeGY9aEv
+lIs57Ev9JqlIUCV65lOhhDkG+xwmkHKHA+ECEU9cALI8+uXbh48MB9XpMOuk408X
+/lX89aZwD0/G9kmObVGnE2G+H5UCAwEAAaOBpjCBozAdBgNVHQ4EFgQUsft+d7VA
+jWgRftkR5cPG2k2sUbAwdAYDVR0jBG0wa4AUsft+d7VAjWgRftkR5cPG2k2sUbCh
+SKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdV
+cHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAL5YrUwfPSWVMAwGA1UdEwQFMAMB
+Af8wDQYJKoZIhvcNAQEFBQADggEBALRUOAmdL8R8sl1y8kiEiFgDatdXK5RDqWai
+8yZChfmwTIToHhmQsOEshJe2e8hky3huUj+33VyXjINoMbebIwMuXPwEkbJal8RZ
+nSJmF0jN1Qz7J/jFffwK9xmejWZJx49Kt2+Qwrwp6kDeq9TLFqQOoVczgyJPYsTL
+NAOib5WqTud3XWvCwxrhqmWu7JZq6sp1fomP/uunprb8y2miWfLESZN2mKAhm44Q
+Lws867LT8v2lskEjq2dT1LutD5+R66XcdjgSr0uDziDs64jZwCD6ea94hVFM7ej0
+ZOXYeSEZJ56FjUxu632e9fY8NyMh30yKjjmQf1mM9PuGJvdvsWU=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem
index ee7f2ab281e..b83ae7c655d 100644
--- a/mysql-test/std_data/client-cert.pem
+++ b/mysql-test/std_data/client-cert.pem
@@ -1,46 +1,69 @@
Certificate:
Data:
- Version: 1 (0x0)
- Serial Number: 1048577 (0x100001)
- Signature Algorithm: md5WithRSAEncryption
+ Version: 3 (0x2)
+ Serial Number: 6 (0x6)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
Validity
- Not Before: Jan 29 11:50:22 2010 GMT
- Not After : Jan 28 11:50:22 2015 GMT
+ Not Before: Feb 20 03:03:26 2010 GMT
+ Not After : Sep 3 03:03:26 2030 GMT
Subject: C=SE, ST=Uppsala, O=MySQL AB
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
- Modulus:
- 00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed:
- 78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8:
- a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4:
- 9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be:
- 15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7:
- 87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16:
- 8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48:
- a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f:
- fc:3d:78:9b:49:6e:86:83:77
+ RSA Public Key: (1024 bit)
+ Modulus (1024 bit):
+ 00:c2:e7:20:cf:89:59:2f:67:cb:4c:9f:e8:11:f2:
+ 23:e5:f1:b1:ee:3f:66:5f:c3:f5:fd:1e:31:ee:8f:
+ 4c:2a:bd:c0:4a:a5:9f:c8:44:d5:77:8f:15:1b:4d:
+ 78:6e:b2:a2:48:a5:24:33:05:40:02:b3:c1:87:8d:
+ 59:3c:1a:07:aa:86:f0:04:e1:9c:20:4b:22:32:c4:
+ 51:9e:40:e4:31:c3:57:f5:98:bf:2e:b1:fd:2c:56:
+ bf:49:d9:9b:e7:17:cc:95:5f:b5:08:19:5e:9d:df:
+ 65:22:39:2c:48:fb:69:96:31:7a:35:4d:de:60:b4:
+ c1:60:19:5f:96:56:7e:55:19
Exponent: 65537 (0x10001)
- Signature Algorithm: md5WithRSAEncryption
- 5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0:
- 34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81:
- c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99:
- 01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b:
- 89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77:
- 02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee:
- 02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35:
- 32:0b
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ X509v3 Subject Key Identifier:
+ 8D:10:67:91:33:76:9C:02:E5:78:5D:D8:C5:EF:25:96:B2:D7:FA:1F
+ X509v3 Authority Key Identifier:
+ keyid:B1:FB:7E:77:B5:40:8D:68:11:7E:D9:11:E5:C3:C6:DA:4D:AC:51:B0
+ DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB
+ serial:BE:58:AD:4C:1F:3D:25:95
+
+ Signature Algorithm: sha1WithRSAEncryption
+ a9:88:10:3e:5d:2a:47:29:c8:03:27:7a:31:5a:8e:10:03:bc:
+ b5:4e:37:1d:12:7b:eb:5f:50:71:70:b1:a3:8e:93:0e:77:17:
+ 6c:47:b6:c9:a4:4d:2a:c4:38:f0:61:55:b2:7f:28:ba:06:79:
+ ee:67:11:7d:d4:c9:7f:0a:18:c8:c1:cb:d0:2c:f9:63:0f:bb:
+ 45:ca:de:ea:bb:ac:00:01:52:48:36:2b:07:2b:c8:46:c7:b1:
+ 21:81:bd:77:39:e7:4c:39:aa:bd:ac:60:d8:a7:bf:cf:14:98:
+ 4a:0b:a1:40:55:06:8d:6f:35:a9:39:a0:71:a9:97:ba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ncofdr7CMKUmg9CCJNU
+EB6t8k/8YphR6Zu5OpPZ5B8dxHbQ
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem
index 205b5f31cb9..2fc1754e9c5 100644
--- a/mysql-test/std_data/client-key.pem
+++ b/mysql-test/std_data/client-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m
-Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi
-Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB
-AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J
-HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm
-l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f
-T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as
-WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL
-qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo
-HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb
-uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy
-xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU
-RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx
+MIICWwIBAAKBgQDC5yDPiVkvZ8tMn+gR8iPl8bHuP2Zfw/X9HjHuj0wqvcBKpZ/I
+RNV3jxUbTXhusqJIpSQzBUACs8GHjVk8GgeqhvAE4ZwgSyIyxFGeQOQxw1f1mL8u
+sf0sVr9J2ZvnF8yVX7UIGV6d32UiOSxI+2mWMXo1Td5gtMFgGV+WVn5VGQIDAQAB
+AoGARXcXLKDpVooJ3W+IyQyiWsw//IhANpWjUOm4JiyQmxMyO+i4ACr4Yjpu7WI5
+MEseqAGj20NdwxjKO0PXsCIe5LmrGZ+SI8+CSERFOWXWRtCWz7y7SG30i1k6suvM
+mwqWom0tJLwn93uA1lm/WSwKQwUrJRahRQd3EaZqrl7DP5kCQQD/8gbuYAT5pxQe
+ULLGM0RvEsXxDYbEDxNbY5wrBazfklBwpumxZpFl6jEAT++7Kh2Ns3A7kB1oUNlA
+FPYr+dYPAkEAwvHEwRtoyUr8jqoqVVJWI76CDmBjEOzVeMKW97ztqbs2LxZW8dYI
+iOh/myFGpdoUwgu0U8w9MmXcj3ZeZCYKVwJALyQ+AJPw9qa+fuLwOq9gsHCtwrty
+EhSQxSlwrz/pWniRll439vPkXfgntF4E0t1r+hiN2Hqv3/HcQgBaYzkuIwJAG023
+bACFxaOuCeFFepvEms8E8jSHy4gQQhCnCl24v8wLw76SQN7kZSCDNtwLRBFuVNtE
+z3PMonFn2eQPRmGZkwJAP1c1BHprMQx/ruafdscROILv3JrH40C1bR6KVVBKt1dK
+Qpnpgi7hK5rUQjDF8k3bn9ugTt06jyeHe/QhAml0kg==
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem
index 5922fe7ded7..d77bae800f2 100644
--- a/mysql-test/std_data/server-cert.pem
+++ b/mysql-test/std_data/server-cert.pem
@@ -1,41 +1,69 @@
Certificate:
Data:
- Version: 1 (0x0)
- Serial Number: 1048578 (0x100002)
- Signature Algorithm: md5WithRSAEncryption
+ Version: 3 (0x2)
+ Serial Number: 4 (0x4)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
Validity
- Not Before: Jan 29 11:56:49 2010 GMT
- Not After : Jan 28 11:56:49 2015 GMT
+ Not Before: Feb 20 02:55:06 2010 GMT
+ Not After : Sep 3 02:55:06 2030 GMT
Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (512 bit)
- Modulus:
- 00:cd:e4:87:51:9d:72:11:a0:d1:fa:f3:92:8b:13:
- 1c:eb:f7:e2:9a:2f:72:a8:d6:65:48:d1:69:af:1b:
- c0:4c:13:e5:60:60:51:41:e9:ab:a6:bc:13:bb:0c:
- 5e:32:7c:d9:6c:9e:cd:05:24:84:78:db:80:91:2e:
- d8:88:2b:c2:ed
+ RSA Public Key: (1024 bit)
+ Modulus (1024 bit):
+ 00:e3:7d:4f:c2:23:77:a9:3a:2c:d2:69:59:a0:2f:
+ 4e:d1:51:4c:ae:8d:f5:17:cc:ce:58:9c:83:4f:0b:
+ a3:bb:29:a2:b8:1d:3e:1b:04:f9:a9:3e:e2:61:d0:
+ e6:7b:b9:7c:12:d8:1f:86:c9:53:b5:04:dd:df:26:
+ e9:c0:2b:de:4a:96:2e:f3:23:6f:79:6d:a9:d2:4e:
+ 17:af:2f:de:8b:68:44:ae:de:a3:e2:c4:37:1c:04:
+ ad:73:4b:85:f9:83:ac:fe:b7:c1:54:47:2e:96:d4:
+ 31:96:85:94:69:d6:5a:63:24:04:99:89:19:1d:56:
+ 8a:d1:77:aa:87:fb:38:cd:b7
Exponent: 65537 (0x10001)
- Signature Algorithm: md5WithRSAEncryption
- 73:ce:9c:6e:39:46:b4:14:be:da:3f:f3:1b:ba:90:bc:23:43:
- d7:82:2a:70:4e:a6:d9:5a:65:5c:b7:df:71:df:75:77:c5:80:
- a4:af:fa:d2:59:e2:fd:c9:9c:f0:98:95:8e:69:a9:8c:7c:d8:
- 6f:48:d2:e3:36:e0:cd:ff:3f:d1:a5:e6:ab:75:09:c4:50:10:
- c4:96:dd:bf:3b:de:32:46:da:ca:4a:f1:d6:52:8a:33:2f:ab:
- f5:2e:70:3f:d4:9c:be:00:c8:03:f9:39:8a:df:5b:70:3c:40:
- ef:03:be:7c:3d:1d:32:32:f3:51:81:e2:83:30:6e:3d:38:9b:
- fb:3c
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ X509v3 Subject Key Identifier:
+ CC:8C:71:40:D0:0F:BF:D1:99:79:3F:1B:E9:10:76:19:67:36:0F:A3
+ X509v3 Authority Key Identifier:
+ keyid:B1:FB:7E:77:B5:40:8D:68:11:7E:D9:11:E5:C3:C6:DA:4D:AC:51:B0
+ DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB
+ serial:BE:58:AD:4C:1F:3D:25:95
+
+ Signature Algorithm: sha1WithRSAEncryption
+ 6f:ad:5e:59:fa:84:3a:be:e2:72:b1:e8:66:2a:4e:f8:73:19:
+ 11:06:11:92:78:56:3e:d6:e8:68:29:90:8b:59:d2:fe:aa:ae:
+ 25:59:c7:e9:99:bb:4a:06:43:dd:40:bd:cb:f4:ae:79:95:7d:
+ 8e:90:ef:58:d2:a8:fc:bf:07:f3:37:b2:9b:bd:da:e6:8c:56:
+ dd:5e:c6:4a:70:7c:3e:3d:a1:e8:35:06:b8:a7:7b:ac:26:85:
+ 54:5d:09:a2:7b:77:b4:17:7f:72:31:cb:ff:cc:67:6d:e6:3e:
+ c6:dc:96:eb:4a:0a:ae:e9:48:ae:8a:e0:d6:73:57:6e:32:4c:
+ 00:dc:28:da:55:b3:9f:9f:d8:98:cc:d9:f1:b6:b3:14:67:2e:
+ a1:47:1e:51:11:cf:70:9f:31:8f:ba:59:29:f2:d0:88:0b:e2:
+ 51:6b:f8:31:ed:6d:ac:00:5e:d3:78:4c:95:97:02:cc:74:2b:
+ 3b:c6:28:e6:2a:c3:30:99:35:b4:4d:31:46:d4:90:f2:47:ed:
+ 64:85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Y2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA431PwiN3
+qTos0mlZoC9O0VFMro31F8zOWJyDTwujuymiuB0+GwT5qT7iYdDme7l8EtgfhslT
+tQTd3ybpwCveSpYu8yNveW2p0k4Xry/ei2hErt6j4sQ3HAStc0uF+YOs/rfBVEcu
+ltQxloWUadZaYyQEmYkZHVaK0Xeqh/s4zbcCAwEAAaOBozCBoDAJBgNVHRMEAjAA
+MB0GA1UdDgQWBBTMjHFA0A+/0Zl5PxvpEHYZZzYPozB0BgNVHSMEbTBrgBSx+353
+tUCNaBF+2RHlw8baTaxRsKFIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1Vw
+cHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAvlit
+TB89JZUwDQYJKoZIhvcNAQEFBQADggEBAG+tXln6hDq+4nKx6GYqTvhzGREGEZJ4
+Vj7W6GgpkItZ0v6qriVZx+mZu0oGQ91Avcv0rnmVfY6Q71jSqPy/B/M3spu92uaM
+Vt1exkpwfD49oeg1Brine6wmhVRdCaJ7d7QXf3Ixy//MZ23mPsbclutKCq7pSK6K
+4NZzV24yTADcKNpVs5+f2JjM2fG2sxRnLqFHHlERz3CfMY+6WSny0IgL4lFr+DHt
+bawAXtN4TJWXAsx0KzvGKOYqwzCZNbRNMUbUkPJH7WSFGnUqcgovxjov0qxrMczl
+qAfC1iLzxg+/Z9nWsnnNSLXD4OMYf7V0yUMZ+8STKcrMkCsbb0X2Jfk=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem
index 1083495cb96..bf0ae205107 100644
--- a/mysql-test/std_data/server-key.pem
+++ b/mysql-test/std_data/server-key.pem
@@ -1,9 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIBOwIBAAJBAM3kh1GdchGg0frzkosTHOv34povcqjWZUjRaa8bwEwT5WBgUUHp
-q6a8E7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WlORaVWzWACNZ3rp
+kAzSj6HDeqgjD2jsQONdAkEAt7S1YHUn8F760bRn4AnAto2TVOYdArtTP/wYjd4o
+9rJREO/d8AYkYJ96APLvF0SZ4n3t1pLwQRsKKN8ZGTmzLA==
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem
index e71ba5722b9..c4c4c3a6374 100644
--- a/mysql-test/std_data/server8k-cert.pem
+++ b/mysql-test/std_data/server8k-cert.pem
@@ -1,51 +1,69 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 5 (0x5)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
+ Validity
+ Not Before: Feb 20 03:00:54 2010 GMT
+ Not After : Sep 3 03:00:54 2030 GMT
+ Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=server
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ RSA Public Key: (1024 bit)
+ Modulus (1024 bit):
+ 00:c5:da:44:95:06:77:16:21:af:a0:c4:3c:e9:f8:
+ 1d:2d:95:f9:63:90:8c:3f:86:ba:77:76:4a:52:4b:
+ 6b:af:29:f5:1c:aa:d4:3f:3e:42:9f:6d:46:ba:86:
+ 90:b1:2d:cc:db:c6:33:15:a3:f4:af:53:33:4f:a1:
+ 56:d1:aa:3b:26:10:f7:64:b5:f9:bf:1b:b1:47:8e:
+ cc:a6:d6:0d:aa:4a:77:e3:a3:63:9d:2a:dc:65:f4:
+ 7f:91:17:38:2d:d6:cd:4e:8d:53:52:97:6e:87:fc:
+ 64:60:a6:a1:00:ac:96:6c:e4:42:94:75:17:46:6f:
+ 91:b5:dd:06:47:ed:05:e3:db
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ X509v3 Subject Key Identifier:
+ 6E:60:3F:29:13:60:99:ED:0C:F7:15:B5:DB:7B:1C:FB:6F:60:19:ED
+ X509v3 Authority Key Identifier:
+ keyid:B1:FB:7E:77:B5:40:8D:68:11:7E:D9:11:E5:C3:C6:DA:4D:AC:51:B0
+ DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB
+ serial:BE:58:AD:4C:1F:3D:25:95
+
+ Signature Algorithm: sha1WithRSAEncryption
+ 63:2e:0f:07:14:06:cf:74:90:3d:37:42:f2:48:70:60:21:bc:
+ 34:52:31:f1:87:70:d2:b2:fb:ff:13:38:dc:f0:5e:43:d7:ee:
+ a7:c7:1f:ac:aa:d2:8c:4f:fa:3c:4c:73:f6:b6:c2:0c:a0:ea:
+ a2:c9:e2:73:61:c3:2e:78:40:0f:2a:d3:63:50:9b:b8:f9:89:
+ 40:ed:98:08:97:c3:07:24:17:34:b5:78:89:0a:bb:83:4c:e2:
+ 5c:2e:13:d6:21:30:ad:30:48:b5:70:12:ff:4a:6f:42:f0:f8:
+ 9f:b1:4b:bd:89:2b:f0:9d:e2:49:2b:35:69:18:1f:76:40:b4:
+ 76:bd:cb:dd:27:2f:c0:c1:e2:33:3e:6e:df:68:54:19:92:8a:
+ bb:13:9c:cf:d6:17:56:da:bf:0d:64:70:3a:45:b7:aa:5f:e3:
+ f5:96:ae:34:f2:17:37:27:d0:4b:e8:30:4a:c0:02:42:e2:d2:
+ 30:eb:eb:c7:d7:ec:d8:df:5c:43:58:e2:6f:b7:58:54:0d:c4:
+ 01:71:2d:59:8f:44:c7:a1:6c:0b:41:28:fa:b7:63:a7:68:d3:
+ 4f:c3:0f:17:9e:b2:32:50:e6:0b:87:3d:e2:39:47:c0:d8:0a:
+ 3b:f6:af:50:68:0f:9d:ef:6e:34:0d:3a:07:94:f8:a4:d7:24:
+ 86:32:d3:b4
-----BEGIN CERTIFICATE-----
-MIIJFDCCBPwCAQEwDQYJKoZIhvcNAQEEBQAwTjELMAkGA1UEBhMCU0UxEDAOBgNV
-BAgTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMQ0wCwY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QUIwHhcNMTAwMjIwMDMwMDU0WhcNMzAwOTAzMDMwMDU0WjBDMQswCQYDVQQG
+EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxDzANBgNV
+BAMTBnNlcnZlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxdpElQZ3FiGv
+oMQ86fgdLZX5Y5CMP4a6d3ZKUktrryn1HKrUPz5Cn21GuoaQsS3M28YzFaP0r1Mz
+T6FW0ao7JhD3ZLX5vxuxR47MptYNqkp346NjnSrcZfR/kRc4LdbNTo1TUpduh/xk
+YKahAKyWbORClHUXRm+Rtd0GR+0F49sCAwEAAaOBozCBoDAJBgNVHRMEAjAAMB0G
+A1UdDgQWBBRuYD8pE2CZ7Qz3FbXbexz7b2AZ7TB0BgNVHSMEbTBrgBSx+353tUCN
+aBF+2RHlw8baTaxRsKFIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1VwcHNh
+bGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAvlitTB89
+JZUwDQYJKoZIhvcNAQEFBQADggEBAGMuDwcUBs90kD03QvJIcGAhvDRSMfGHcNKy
++/8TONzwXkPX7qfHH6yq0oxP+jxMc/a2wgyg6qLJ4nNhwy54QA8q02NQm7j5iUDt
+mAiXwwckFzS1eIkKu4NM4lwuE9YhMK0wSLVwEv9Kb0Lw+J+xS72JK/Cd4kkrNWkY
+H3ZAtHa9y90nL8DB4jM+bt9oVBmSirsTnM/WF1bavw1kcDpFt6pf4/WWrjTyFzcn
+0EvoMErAAkLi0jDr68fX7NjfXENY4m+3WFQNxAFxLVmPRMehbAtBKPq3Y6do00/D
+DxeesjJQ5guHPeI5R8DYCjv2r1BoD53vbjQNOgeU+KTXJIYy07Q=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem
index 99e7417733e..d3c3ec5baba 100644
--- a/mysql-test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9P/hh+UJu9HrS2uAwHoGE1+8gcyundupGDBn
+MIICXgIBAAKBgQDF2kSVBncWIa+gxDzp+B0tlfljkIw/hrp3dkpSS2uvKfUcqtQ/
+PkKfbUa6hpCxLczbxjMVo/SvUzNPoVbRqjsmEPdktfm/G7FHjsym1g2qSnfjo2Od
+Ktxl9H+RFzgt1s1OjVNSl26H/GRgpqEArJZs5EKUdRdGb5G13QZH7QXj2wIDAQAB
+AoGBAJLCjh7Q9eLnx+QDzH9s+Q/IcH4nSbERmh1lFEopAc6j29qQ6PGkmDy0DUPs
+70VOCOh5A4mo3aZzm9sUfVb24/nRtmyTP/AtMuIVGCsUqzI28dJRGvRlY0aSQG/C
+ILqMP69kiMNGBvuyEIiJhisOmMvDFEp7HrrXHJM9qcc217DpAkEA4nzJ9yyy2e4O
+r6/D711hdfcU/F+ktXw+pL77kSSdTABUap92Uv2RL36UA4q5h8RNvq/GrzMNm6Ye
+u2IMvBCiTQJBAN+iRbiMJCSitTg5YVMluVbT87co7jbTqk7LN1ujyIFEklm4xlHG
+DLJNgEoDR7QJtAkL++FyogC4zsQsey5voscCQQCp54trTbDuI9QIoAaQrrDKWgz4
+NpfNPeOQm2UFQT5vIWAyjGWrZGViB8bp0UvVOcJI5nxaOiZfOYOcdrWu75uRAkAn
+67zMc9/j1lPJRJz2Dc7nDBD+ikTz7pcBV897AWLCiK4jbBOi91q+3YzgKXO8VNsZ
+nlUJasA2psbqSBJ5OJ5zAkEA2UxoMju54hASjT54Z92IzraVw4Vo8CYwOcw5fr7z
++m5xg1mmWdLBclmZ+WjARzDuTHIW6u/WCxNGg42AykWzfw==
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 7f676b7ccfd..6b1d3b7158b 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -43,10 +43,14 @@ sub skip_combinations {
unless $::mysqld_variables{'innodb'} eq "ON";
# disable tests that use ipv6, if unsupported
- use Socket;
- $skip{'include/check_ipv6.inc'} = 'No IPv6'
- unless socket SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
- close SOCK;
+ sub ipv6_ok() {
+ use Socket;
+ return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
+ # eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
+ eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) };
+ return $! != 101;
+ }
+ $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
%skip;
}
diff --git a/mysql-test/suite/federated/federated_maybe_16324629.result b/mysql-test/suite/federated/federated_maybe_16324629.result
new file mode 100644
index 00000000000..b1dd8097cac
--- /dev/null
+++ b/mysql-test/suite/federated/federated_maybe_16324629.result
@@ -0,0 +1,16 @@
+CREATE DATABASE federated;
+CREATE DATABASE federated;
+create table federated.t1 (a int, b int, unique key (a), key (b));
+create table t1 (a int, b int, unique key (a), key (b))
+engine=federated CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
+insert into t1 values (3, 3), (7, 7);
+delete t1 from t1 where a = 3;
+select * from t1;
+a b
+3 3
+7 7
+drop table t1;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/suite/federated/federated_maybe_16324629.test b/mysql-test/suite/federated/federated_maybe_16324629.test
new file mode 100644
index 00000000000..53d79e70c80
--- /dev/null
+++ b/mysql-test/suite/federated/federated_maybe_16324629.test
@@ -0,0 +1,23 @@
+#
+# Inspired by a bug fix for internal Oracle MySQL bug#16324629
+#
+source include/federated.inc;
+
+connection slave;
+create table federated.t1 (a int, b int, unique key (a), key (b));
+
+connection master;
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table t1 (a int, b int, unique key (a), key (b))
+ engine=federated CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+
+insert into t1 values (3, 3), (7, 7);
+delete t1 from t1 where a = 3;
+select * from t1;
+drop table t1;
+
+connection slave;
+connection default;
+source include/federated_cleanup.inc;
+
diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
new file mode 100644
index 00000000000..cc2a0373444
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
@@ -0,0 +1,39 @@
+#
+# Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
+# OPERATION IF IT IS DONE IN-PLACE
+#
+SET GLOBAL innodb_change_buffering_debug = 1;
+CREATE TABLE t1(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b CHAR(1),
+c INT,
+INDEX(b))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES(0,'x',1);
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+BEGIN;
+SELECT b FROM t1 LIMIT 3;
+b
+x
+x
+x
+BEGIN;
+DELETE FROM t1 WHERE a=1;
+INSERT INTO t1 VALUES(1,'X',1);
+SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
+SELECT b FROM t1 LIMIT 3;
+ERROR HY000: Lost connection to MySQL server during query
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index eb48b0ec895..b7fb733b9fd 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -1700,8 +1700,8 @@ t2 CREATE TABLE `t2` (
PRIMARY KEY (`c`,`d`),
CONSTRAINT `c1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON DELETE NO ACTION,
CONSTRAINT `c2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
- CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION
+ CONSTRAINT `f3` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
@@ -2561,6 +2561,8 @@ KEY idx2 (f2,f4)
) ENGINE=InnoDB;
LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
ANALYZE TABLE t1;
+set @tmp_innodb_mysql= @@optimizer_switch;
+set optimizer_switch='extended_keys=off';
SELECT * FROM t1 WHERE f1 IN
(3305028,3353871,3772880,3346860,4228206,3336022,
3470988,3305175,3329875,3817277,3856380,3796193,
@@ -2584,6 +2586,7 @@ EXPLAIN SELECT * FROM t1 WHERE f1 IN
AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,idx1,idx2 idx2,idx1,PRIMARY 7,60,4 NULL 1 Using intersect(idx2,idx1,PRIMARY); Using where
+set optimizer_switch=@tmp_innodb_mysql;
DROP TABLE t1;
#
# Bug#51431 Wrong sort order after import of dump file
diff --git a/mysql-test/suite/innodb/r/row_lock.result b/mysql-test/suite/innodb/r/row_lock.result
new file mode 100644
index 00000000000..c2fb7b90c3f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/row_lock.result
@@ -0,0 +1,16 @@
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1),(2,2);
+CREATE TABLE t2 (c INT, d INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,1), (2,2);
+CREATE TABLE t3 (e INT) ENGINE=InnoDB;
+CREATE TABLE t4 ENGINE=InnoDB AS SELECT * FROM t2;
+BEGIN;
+UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 );
+SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting';
+UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6;
+SET DEBUG_SYNC='now WAIT_FOR waiting';
+SET DEBUG_SYNC='RESET';
+UPDATE t4 SET d = 9;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+commit;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
new file mode 100644
index 00000000000..33e2b863684
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
@@ -0,0 +1 @@
+--log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
new file mode 100644
index 00000000000..1774bb7f796
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
@@ -0,0 +1,75 @@
+if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in InnoDB before 5.6.17
+}
+
+--echo #
+--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
+--echo # OPERATION IF IT IS DONE IN-PLACE
+--echo #
+--source include/have_innodb.inc
+# innodb_change_buffering_debug option is debug only
+--source include/have_debug.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# DBUG_SUICIDE() hangs under valgrind
+--source include/not_valgrind.inc
+
+# The flag innodb_change_buffering_debug is only available in debug builds.
+# It instructs InnoDB to try to evict pages from the buffer pool when
+# change buffering is possible, so that the change buffer will be used
+# whenever possible.
+SET GLOBAL innodb_change_buffering_debug = 1;
+let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
+
+CREATE TABLE t1(
+ a INT AUTO_INCREMENT PRIMARY KEY,
+ b CHAR(1),
+ c INT,
+ INDEX(b))
+ENGINE=InnoDB;
+
+# Create enough rows for the table, so that the change buffer will be
+# used for modifying the secondary index page. There must be multiple
+# index pages, because changes to the root page are never buffered.
+INSERT INTO t1 VALUES(0,'x',1);
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+INSERT INTO t1 SELECT 0,b,c FROM t1;
+
+BEGIN;
+SELECT b FROM t1 LIMIT 3;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+DELETE FROM t1 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO t1 VALUES(1,'X',1);
+
+SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--error 2013
+# This should force a change buffer merge
+SELECT b FROM t1 LIMIT 3;
+
+let SEARCH_PATTERN=Wrote log record for ibuf update in place operation;
+--source include/search_pattern_in_file.inc
+
+# Write file to make mysql-test-run.pl start up the server again
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+CHECK TABLE t1;
+
+# Cleanup
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
index 44e2e8b2342..7c2ae98f001 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -717,6 +717,9 @@ LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
ANALYZE TABLE t1;
-- enable_result_log
+set @tmp_innodb_mysql= @@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+
SELECT * FROM t1 WHERE f1 IN
(3305028,3353871,3772880,3346860,4228206,3336022,
3470988,3305175,3329875,3817277,3856380,3796193,
@@ -728,6 +731,7 @@ EXPLAIN SELECT * FROM t1 WHERE f1 IN
3470988,3305175,3329875,3817277,3856380,3796193,
3784744,4180925,4559596,3963734,3856391,4494153)
AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
+set optimizer_switch=@tmp_innodb_mysql;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/row_lock.test b/mysql-test/suite/innodb/t/row_lock.test
new file mode 100644
index 00000000000..7a209f08956
--- /dev/null
+++ b/mysql-test/suite/innodb/t/row_lock.test
@@ -0,0 +1,53 @@
+if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not fixed in InnoDB before 5.6.17
+}
+
+#
+# Test of wrong call to unlock_row
+# MDEV-5629 Failing assertion: state == TRX_STATE_NOT_STARTED on
+# concurrent CREATE OR REPLACE and transactional UPDATE
+#
+
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1),(2,2);
+
+CREATE TABLE t2 (c INT, d INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,1), (2,2);
+
+CREATE TABLE t3 (e INT) ENGINE=InnoDB;
+CREATE TABLE t4 ENGINE=InnoDB AS SELECT * FROM t2;
+
+--connect (con11,localhost,root,,test)
+
+BEGIN;
+UPDATE t1 SET a = 0 WHERE a = ( SELECT e FROM t3 );
+
+--connect (con12,localhost,root,,test)
+
+SET DEBUG_SYNC='srv_suspend_mysql_thread_enter SIGNAL waiting';
+
+--send
+UPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6;
+
+--connection con11
+
+# Wait for con12 to start waiting for con11
+
+SET DEBUG_SYNC='now WAIT_FOR waiting';
+SET DEBUG_SYNC='RESET';
+
+UPDATE t4 SET d = 9;
+
+--connection con12
+--error ER_LOCK_DEADLOCK
+--reap
+--connection con11
+commit;
+--connection default
+--disconnect con12
+--disconnect con11
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
index fe3d799229d..fe3d799229d 100644
--- a/mysql-test/suite/innodb/r/innodb-create-options.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result
index dbfae3c0630..dbfae3c0630 100644
--- a/mysql-test/suite/innodb/r/innodb-zip.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
index aa80e4d7aa4..aa80e4d7aa4 100644
--- a/mysql-test/suite/innodb/r/innodb_bug36169.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug36172.result b/mysql-test/suite/innodb_zip/r/innodb_bug36172.result
index 195775f74c8..195775f74c8 100644
--- a/mysql-test/suite/innodb/r/innodb_bug36172.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug36172.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
index f4393e8fae0..f4393e8fae0 100644
--- a/mysql-test/suite/innodb/r/innodb_bug52745.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
index dbebb9d2d33..dbebb9d2d33 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
index 5e798b69167..5e798b69167 100644
--- a/mysql-test/suite/innodb/r/innodb_bug56680.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
diff --git a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
index 1f6d6948756..1f6d6948756 100644
--- a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
diff --git a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
index b610d1ed7b8..b610d1ed7b8 100644
--- a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result
index 746072781bd..746072781bd 100644
--- a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result
diff --git a/mysql-test/suite/innodb/t/innodb-create-options.test b/mysql-test/suite/innodb_zip/t/innodb-create-options.test
index aeb22514bf6..aeb22514bf6 100644
--- a/mysql-test/suite/innodb/t/innodb-create-options.test
+++ b/mysql-test/suite/innodb_zip/t/innodb-create-options.test
diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test
index 1c7c7c8c419..1c7c7c8c419 100644
--- a/mysql-test/suite/innodb/t/innodb-zip.test
+++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
index 6426bd683ae..6426bd683ae 100644
--- a/mysql-test/suite/innodb/t/innodb_bug36169.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
index 015f461e532..015f461e532 100644
--- a/mysql-test/suite/innodb/t/innodb_bug36172.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
index 3c5d79826f0..3c5d79826f0 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52745.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
index 8bc461719b8..8bc461719b8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test
index f592bd16942..f592bd16942 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56680.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test
diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt
index a9a3d8c3db8..a9a3d8c3db8 100644
--- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt
+++ b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt
diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test
index 4263e839c85..4263e839c85 100644
--- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test
diff --git a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
index 17f82f88fef..17f82f88fef 100644
--- a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test
index 77f55002da5..77f55002da5 100644
--- a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test
diff --git a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
index 937a3b164fa..64028e537bf 100644
--- a/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result
@@ -9,7 +9,7 @@ SELECT @global_start_value;
select @old_session_opt_switch:=@@session.optimizer_switch,
@old_global_opt_switch:=@@global.optimizer_switch;
@old_session_opt_switch:=@@session.optimizer_switch @old_global_opt_switch:=@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
'#--------------------FN_DYNVARS_028_01------------------------#'
SET @@session.engine_condition_pushdown = 0;
Warnings:
@@ -212,7 +212,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@session.engine_condition_pushdown = TRUE;
Warnings:
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
@@ -220,7 +220,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@session.engine_condition_pushdown = FALSE;
Warnings:
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
@@ -228,7 +228,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@global.engine_condition_pushdown = TRUE;
Warnings:
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
@@ -236,7 +236,7 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@global.engine_condition_pushdown = FALSE;
Warnings:
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
@@ -244,31 +244,31 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@session.optimizer_switch = "engine_condition_pushdown=on";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@session.optimizer_switch = "engine_condition_pushdown=off";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@global.optimizer_switch = "engine_condition_pushdown=on";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set @@global.optimizer_switch = "engine_condition_pushdown=off";
select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
SET @@session.engine_condition_pushdown = @session_start_value;
Warnings:
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
@@ -287,4 +287,4 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
-0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
index 8a9c49def85..99b1d6296a8 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -1,25 +1,25 @@
SET @start_global_value = @@global.optimizer_switch;
SELECT @start_global_value;
@start_global_value
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
set global optimizer_switch=10;
set session optimizer_switch=5;
select @@global.optimizer_switch;
@@ -67,4 +67,4 @@ ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'foobar'
SET @@global.optimizer_switch = @start_global_value;
SELECT @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
diff --git a/mysql-test/suite/sys_vars/r/progress_report_time_basic.result b/mysql-test/suite/sys_vars/r/progress_report_time_basic.result
index 7aab917b4f8..b8e8c39f451 100644
--- a/mysql-test/suite/sys_vars/r/progress_report_time_basic.result
+++ b/mysql-test/suite/sys_vars/r/progress_report_time_basic.result
@@ -1,22 +1,22 @@
SET @start_global_value = @@global.progress_report_time;
select @@global.progress_report_time;
@@global.progress_report_time
-56
+5
select @@session.progress_report_time;
@@session.progress_report_time
-56
+5
show global variables like 'progress_report_time';
Variable_name Value
-progress_report_time 56
+progress_report_time 5
show session variables like 'progress_report_time';
Variable_name Value
-progress_report_time 56
+progress_report_time 5
select * from information_schema.global_variables where variable_name='progress_report_time';
VARIABLE_NAME VARIABLE_VALUE
-PROGRESS_REPORT_TIME 56
+PROGRESS_REPORT_TIME 5
select * from information_schema.session_variables where variable_name='progress_report_time';
VARIABLE_NAME VARIABLE_VALUE
-PROGRESS_REPORT_TIME 56
+PROGRESS_REPORT_TIME 5
set global progress_report_time=10;
select @@global.progress_report_time;
@@global.progress_report_time
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index 4514928e592..8631789f15f 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -316,4 +316,9 @@ ERROR HY000: The value specified for computed column 'd' in table 't1' ignored
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
ERROR HY000: The value specified for computed column 'd' in table 't1' ignored
drop table t1;
+#
+# MDEV-5611: self-referencing virtual column
+#
+create table t1 (a int, b int as (b is null) virtual);
+ERROR HY000: A computed column cannot be based on a computed column
# end of 5.3 tests
diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test
index 9c8443218fa..a4c1fc06ce9 100644
--- a/mysql-test/suite/vcol/t/vcol_misc.test
+++ b/mysql-test/suite/vcol/t/vcol_misc.test
@@ -275,4 +275,11 @@ UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
drop table t1;
+--echo #
+--echo # MDEV-5611: self-referencing virtual column
+--echo #
+
+--error ER_VCOL_BASED_ON_VCOL
+create table t1 (a int, b int as (b is null) virtual);
+
--echo # end of 5.3 tests
diff --git a/mysql-test/t/comments.test b/mysql-test/t/comments.test
index ce4f4d50675..6cf69635d1e 100644
--- a/mysql-test/t/comments.test
+++ b/mysql-test/t/comments.test
@@ -27,6 +27,8 @@ select 1 # The rest of the row will be ignored
select 1 /*M! +1 */;
select 1 /*M!50000 +1 */;
select 1 /*M!50300 +1 */;
+select 2 /*M!99999 +1 */;
+select 2 /*M!100000 +1 */;
select 2 /*M!999999 +1 */;
--error ER_PARSE_ERROR
select 2 /*M!0000 +1 */;
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 71643a25c5a..952609be7e0 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -750,4 +750,42 @@ INSERT INTO t1 VALUES (1111, 2222), (3333, 4444);
SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1;
DROP TABLE t1;
+--echo #
+--echo # Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN.
+--echo # Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK
+--echo #
+
+SET @tmp_table_size_save= @@tmp_table_size;
+SET @@tmp_table_size= 1024;
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
+INSERT INTO t1 SELECT a+8 FROM t1;
+INSERT INTO t1 SELECT a+16 FROM t1;
+INSERT INTO t1 SELECT a+32 FROM t1;
+INSERT INTO t1 SELECT a+64 FROM t1;
+INSERT INTO t1 VALUE(NULL);
+SELECT COUNT(DISTINCT a) FROM t1;
+SELECT COUNT(DISTINCT (a+0)) FROM t1;
+DROP TABLE t1;
+
+create table tb(
+id int auto_increment primary key,
+v varchar(32))
+engine=myisam charset=gbk;
+insert into tb(v) values("aaa");
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+insert into tb(v) (select v from tb);
+
+update tb set v=concat(v, id);
+select count(distinct case when id<=64 then id end) from tb;
+select count(distinct case when id<=63 then id end) from tb;
+drop table tb;
+
+SET @@tmp_table_size= @tmp_table_size_save;
+
--echo End of 5.5 tests
diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test
index ea7dd12fb9e..58ead1e3ced 100644
--- a/mysql-test/t/error_simulation.test
+++ b/mysql-test/t/error_simulation.test
@@ -103,7 +103,7 @@ CREATE TABLE t2(f1 INT);
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t2 VALUES (1),(2);
SET SESSION debug_dbug="+d,bug11747970_raise_error";
---error 1105
+--error ER_QUERY_INTERRUPTED
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
SET SESSION debug_dbug = DEFAULT;
DROP TABLE t1,t2;
diff --git a/mysql-test/t/events_trans.test b/mysql-test/t/events_trans.test
index 4cf2583ac96..6d829379fea 100644
--- a/mysql-test/t/events_trans.test
+++ b/mysql-test/t/events_trans.test
@@ -146,3 +146,4 @@ SELECT * FROM t2;
ROLLBACK WORK TO SAVEPOINT A;
DROP TABLE t1, t2;
+DROP EVENT e1;
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index cf5f00c3ee1..363f089e8d7 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -981,10 +981,13 @@ DROP TABLE D;
#
# Bug #39656: Behaviour different for agg functions with & without where -
# ONLY_FULL_GROUP_BY
+# MDEV-5617 mysqld crashes when running a query with ONLY_FULL_GROUP_BY
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,1), (1,2), (1,3);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (3),(4);
SET SQL_MODE='ONLY_FULL_GROUP_BY';
@@ -1000,11 +1003,18 @@ SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.a= b.a;
SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a)
FROM t1 outr;
+--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
+SELECT COUNT(*) FROM t1 outr, (SELECT b, count(*) FROM t2) as t3;
+
+SELECT COUNT(*) FROM t1 outr where (1,1) in (SELECT a, count(*) FROM t2);
+
SELECT COUNT(*) FROM t1 a JOIN t1 outr
ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a);
+SELECT * FROM (SELECT a FROM t1 GROUP BY a) sq JOIN t2 ON a = b;
+
SET SQL_MODE=default;
-DROP TABLE t1;
+DROP TABLE t1,t2;
###
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 22ebb6248e2..a7ae99cd2d0 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -298,6 +298,14 @@ DROP TABLE t1;
SELECT INET_NTOA(0);
SELECT '1' IN ('1', INET_NTOA(0));
+#
+# MDEV-5655 Server crashes on NAME_CONST containing AND/OR expressions
+#
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('a', -(1 AND 2)) AND 1;
+SELECT NAME_CONST('a', -(1)) OR 1;
--echo #
--echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465
@@ -549,6 +557,3 @@ select release_lock(repeat('a', 193));
--echo # End of 5.5 tests
--echo #
---echo #
---echo # End of tests
---echo #
diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test
index d021bb0b53d..0c6410b5a75 100644
--- a/mysql-test/t/gis-precise.test
+++ b/mysql-test/t/gis-precise.test
@@ -325,3 +325,6 @@ SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0
0.0 -3.0
))' ), 3 )));
+# MDEV-5615 crash in Gcalc_function::add_operation
+select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1));
+
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index c1153d5071d..c38706959e4 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1434,6 +1434,24 @@ SELECT 1 FROM g1 WHERE a >= ANY
DROP TABLE g1;
--echo #
+--echo # Bug#16451878 GEOMETRY QUERY CRASHES SERVER
+--echo #
+
+--echo # should not crash
+SELECT ASTEXT(0x0100000000030000000100000000000010);
+
+--echo #should not crash
+SELECT ENVELOPE(0x0100000000030000000100000000000010);
+
+--echo #should not crash
+SELECT
+ GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
+
+--echo #should not crash
+SELECT
+ GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
+
+--echo #
--echo # MDEV-3819 missing constraints for spatial column types
--echo #
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 1ddce574a88..6e717e85122 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2440,6 +2440,21 @@ SET @@global.log_output= @old_log_output_state;
SET @@global.slow_query_log= @old_slow_query_log_state;
SET @@global.general_log= @old_general_log_state;
+--echo # MDEV-5481 mysqldump fails to dump geometry types properly
+
+create table t1 (g GEOMETRY) CHARSET koi8r;
+create table t2 (g GEOMETRY) CHARSET koi8r;
+insert into t1 values (point(1,1)), (point(2,2));
+--exec $MYSQL_DUMP --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
+--echo ##################################################
+--cat_file $file
+--echo ##################################################
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r
+--remove_file $file
+select astext(g) from t2;
+drop table t1, t2;
+
--echo #
--echo # End of 5.1 tests
--echo #
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 713b3ed7347..7eb541ab331 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -2530,6 +2530,338 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
SELECT * from t1 order by i;
DROP TABLE t1;
+--echo #
+--echo # MDEV-5177: ha_partition and innodb index intersection produce fewer rows (MySQL Bug#70703)
+--echo #
+create table t1 (
+ a int not null,
+ b int not null,
+ pk int not null,
+ primary key (pk),
+ key(a),
+ key(b)
+) partition by hash(pk) partitions 10;
+
+insert into t1 values (1,2,4); # both
+insert into t1 values (1,0,17); # left
+insert into t1 values (1,2,25); # both
+
+insert into t1 values (10,20,122);
+insert into t1 values (10,20,123);
+
+# Now, fill in some data so that the optimizer choses index_merge
+create table t2 (a int);
+insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+insert into t1 select 1,2, 200 + A.a + 10*B.a + 100*C.a from t2 A, t2 B, t2 C;
+
+insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
+ 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
+ 2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
+ from t2 A, t2 B, t2 C ,t2 D;
+
+# This should show index_merge, using intersect
+explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
+# 794 rows in output
+create temporary table t3 as
+select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
+select count(*) from t3;
+drop table t3;
+
+# 802 rows in output
+create temporary table t3 as
+select * from t1 ignore index(a,b) where a=1 and b=2 and pk between 1 and 999 ;
+select count(*) from t3;
+drop table t3;
+
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-5555: Incorrect index_merge on BTREE indices
+--echo #
+
+CREATE TABLE t1 (
+ id bigint(20) unsigned NOT NULL,
+ id2 bigint(20) unsigned NOT NULL,
+ dob date DEFAULT NULL,
+ address char(100) DEFAULT NULL,
+ city char(35) DEFAULT NULL,
+ hours_worked_per_week smallint(5) unsigned DEFAULT NULL,
+ weeks_worked_last_year tinyint(3) unsigned DEFAULT NULL,
+ KEY dob (dob),
+ KEY address (address),
+ KEY city (city),
+ KEY hours_worked_per_week (hours_worked_per_week),
+ KEY weeks_worked_last_year (weeks_worked_last_year)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+PARTITION BY KEY (id) PARTITIONS 5;
+
+--echo # Insert some rows
+--disable_query_log
+INSERT INTO t1 VALUES (123,123,'2001-04-14','address123','city123',40,51),
+(127,127,'1977-03-30','address127','city127',0,0),
+(131,131,'1985-07-29','address131','city131',50,52),
+(135,135,'1997-01-20','address135','city135',0,0),
+(139,139,'1963-04-27','address139','city139',27,52),
+(143,143,'1979-01-28','address143','city143',40,52),
+(147,147,'1985-08-28','address147','city147',0,0),
+(151,151,'1997-01-24','address151','city151',40,52),
+(156,156,'1975-02-19','address156','city156',46,52),
+(158,158,'1996-07-06','address158','city158',46,8),
+(164,164,'1925-12-30','address164','city164',0,0),
+(166,166,'2010-12-30','address166','city166',0,0),
+(172,172,'1996-08-15','address172','city172',0,0),
+(174,174,'2008-05-20','address174','city174',40,52),
+(180,180,'1969-09-05','address180','city180',25,52),
+(182,182,'1977-08-11','address182','city182',40,8),
+(188,188,'2012-03-29','address188','city188',0,0),
+(190,190,'1978-02-19','address190','city190',0,0),
+(215,215,'1982-02-07','address215','city215',40,36),
+(223,223,'2005-02-11','address223','city223',55,52),
+(247,247,'2005-07-02','address247','city247',30,51),
+(255,255,'1997-08-15','address255','city255',0,0),
+(2,2,'1973-05-05','address2','city2',25,52),
+(4,4,'2012-07-21','address4','city4',40,12),
+(6,6,'1982-07-15','address6','city6',0,0),
+(8,8,'1979-02-16','address8','city8',0,0),
+(10,10,'1955-10-06','address10','city10',60,52),
+(12,12,'1977-08-09','address12','city12',40,52),
+(14,14,'2005-03-28','address14','city14',0,0),
+(16,16,'1949-11-07','address16','city16',40,52),
+(18,18,'2012-01-04','address18','city18',0,0),
+(20,20,'2011-01-23','address20','city20',0,0),
+(22,22,'1954-10-14','address22','city22',20,52),
+(24,24,'2010-01-22','address24','city24',0,0),
+(26,26,'1999-08-15','address26','city26',0,0),
+(28,28,'1964-07-05','address28','city28',10,20),
+(30,30,'2004-10-13','address30','city30',0,0),
+(32,32,'2007-06-08','address32','city32',0,0),
+(34,34,'1977-02-23','address34','city34',40,52),
+(36,36,'2007-06-11','address36','city36',75,52),
+(38,38,'1932-04-12','address38','city38',0,0),
+(40,40,'1968-11-16','address40','city40',0,0),
+(42,42,'1996-10-01','address42','city42',38,52),
+(44,44,'1977-08-23','address44','city44',18,6),
+(46,46,'1978-11-23','address46','city46',0,0),
+(48,48,'1998-02-27','address48','city48',0,0),
+(50,50,'1923-09-08','address50','city50',40,52),
+(52,52,'1964-09-09','address52','city52',0,0),
+(55,55,'2001-01-27','address55','city55',40,40),
+(56,56,'1938-08-28','address56','city56',48,52),
+(59,59,'1967-12-19','address59','city59',40,52),
+(60,60,'1969-06-30','address60','city60',40,46),
+(63,63,'2002-04-05','address63','city63',0,0),
+(64,64,'1972-11-21','address64','city64',48,52),
+(67,67,'1988-04-04','address67','city67',0,0),
+(68,68,'1964-07-14','address68','city68',4,16),
+(71,71,'1998-03-09','address71','city71',0,0),
+(72,72,'1960-10-28','address72','city72',35,52),
+(75,75,'1968-04-14','address75','city75',40,52),
+(76,76,'1977-05-13','address76','city76',0,0),
+(79,79,'1982-12-19','address79','city79',0,0),
+(80,80,'1966-01-07','address80','city80',15,12),
+(83,83,'1947-02-09','address83','city83',10,18),
+(84,84,'1976-06-23','address84','city84',40,52),
+(87,87,'2000-10-24','address87','city87',25,4),
+(88,88,'2002-05-23','address88','city88',20,52),
+(91,91,'2000-11-28','address91','city91',60,52),
+(92,92,'1965-07-17','address92','city92',40,52),
+(95,95,'1977-09-16','address95','city95',30,52),
+(96,96,'1994-09-26','address96','city96',0,0),
+(99,99,'2008-02-19','address99','city99',0,0),
+(100,100,'1953-01-07','address100','city100',0,0),
+(103,103,'2010-12-29','address103','city103',0,0),
+(104,104,'1990-12-03','address104','city104',40,52),
+(107,107,'2003-10-27','address107','city107',0,0),
+(108,108,'1998-03-05','address108','city108',40,17),
+(111,111,'2002-10-18','address111','city111',0,0),
+(112,112,'1960-04-02','address112','city112',0,0),
+(115,115,'1989-05-28','address115','city115',40,52),
+(116,116,'1985-10-25','address116','city116',15,52),
+(119,119,'1974-04-15','address119','city119',0,0),
+(120,120,'1926-03-21','address120','city120',0,0),
+(157,157,'1972-03-23','address157','city157',0,0),
+(159,159,'2002-11-08','address159','city159',0,0),
+(165,165,'1998-07-10','address165','city165',0,0),
+(167,167,'1973-11-16','address167','city167',0,0),
+(173,173,'1966-06-26','address173','city173',0,0),
+(175,175,'1957-02-02','address175','city175',0,0),
+(181,181,'1964-11-16','address181','city181',45,26),
+(183,183,'1943-12-02','address183','city183',0,0),
+(189,189,'1986-06-30','address189','city189',0,0),
+(191,191,'2005-05-14','address191','city191',0,0),
+(196,196,'1961-03-23','address196','city196',0,0),
+(197,197,'1955-07-13','address197','city197',0,0),
+(198,198,'2006-11-26','address198','city198',0,0),
+(199,199,'1978-02-06','address199','city199',0,0),
+(208,208,'2012-04-13','address208','city208',48,52),
+(210,210,'1989-08-18','address210','city210',0,0),
+(211,211,'1982-08-17','address211','city211',40,52),
+(212,212,'1919-08-29','address212','city212',0,0),
+(213,213,'1987-03-25','address213','city213',0,0),
+(228,228,'1988-05-05','address228','city228',40,52),
+(229,229,'1936-10-15','address229','city229',0,0),
+(230,230,'1973-08-19','address230','city230',40,52),
+(231,231,'2002-06-18','address231','city231',50,52),
+(240,240,'2011-10-17','address240','city240',60,52),
+(242,242,'1981-07-24','address242','city242',0,0),
+(243,243,'1978-10-12','address243','city243',0,0),
+(244,244,'2003-01-15','address244','city244',0,0),
+(245,245,'1950-09-26','address245','city245',0,0),
+(125,125,'1939-08-02','address125','city125',28,32),
+(126,126,'1984-02-10','address126','city126',0,0),
+(129,129,'1992-01-20','address129','city129',0,0),
+(130,130,'1992-09-18','address130','city130',0,0),
+(133,133,'1996-05-07','address133','city133',24,20),
+(134,134,'1987-07-13','address134','city134',0,0),
+(137,137,'2004-03-10','address137','city137',0,0),
+(138,138,'1989-02-10','address138','city138',0,0),
+(141,141,'1970-03-21','address141','city141',0,0),
+(142,142,'1984-05-25','address142','city142',40,50),
+(145,145,'1959-05-24','address145','city145',0,0),
+(146,146,'1946-07-28','address146','city146',35,16),
+(149,149,'1993-09-16','address149','city149',0,0),
+(150,150,'1975-12-18','address150','city150',0,0),
+(153,153,'1993-12-20','address153','city153',0,0),
+(155,155,'1934-10-29','address155','city155',0,0),
+(161,161,'1969-11-04','address161','city161',50,50),
+(163,163,'1976-05-03','address163','city163',40,52),
+(169,169,'1982-12-19','address169','city169',0,0),
+(171,171,'1976-07-01','address171','city171',0,0),
+(177,177,'2002-11-16','address177','city177',0,0),
+(179,179,'1964-02-05','address179','city179',40,32),
+(185,185,'1981-02-06','address185','city185',0,0),
+(187,187,'1962-06-04','address187','city187',40,52),
+(216,216,'1996-05-21','address216','city216',48,52),
+(248,248,'1963-09-06','address248','city248',0,0),
+(256,256,'1966-07-14','address256','city256',0,0),
+(53,53,'1992-05-25','address53','city53',0,0),
+(57,57,'2003-11-12','address57','city57',25,20),
+(61,61,'1953-01-29','address61','city61',0,0),
+(65,65,'1975-05-02','address65','city65',10,10),
+(69,69,'1938-03-20','address69','city69',0,0),
+(73,73,'1969-05-05','address73','city73',0,0),
+(77,77,'1996-05-19','address77','city77',0,0),
+(81,81,'1985-06-22','address81','city81',0,0),
+(85,85,'2002-10-10','address85','city85',0,0),
+(89,89,'1958-06-16','address89','city89',0,0),
+(93,93,'1962-06-16','address93','city93',0,0),
+(97,97,'1964-10-08','address97','city97',0,0),
+(101,101,'1986-06-11','address101','city101',40,52),
+(105,105,'1999-05-14','address105','city105',40,45),
+(109,109,'2000-05-23','address109','city109',0,0),
+(113,113,'1960-08-03','address113','city113',8,15),
+(117,117,'1982-02-15','address117','city117',50,36),
+(121,121,'1998-10-18','address121','city121',24,52),
+(192,192,'1964-07-24','address192','city192',40,52),
+(193,193,'1973-05-03','address193','city193',0,0),
+(194,194,'1980-01-14','address194','city194',40,52),
+(195,195,'1975-07-15','address195','city195',45,52),
+(200,200,'2006-03-09','address200','city200',0,0),
+(201,201,'2008-05-20','address201','city201',3,28),
+(202,202,'2000-06-30','address202','city202',12,52),
+(203,203,'1992-07-08','address203','city203',50,52),
+(204,204,'1988-07-05','address204','city204',14,40),
+(205,205,'1950-10-29','address205','city205',0,0),
+(206,206,'1962-11-25','address206','city206',0,0),
+(207,207,'1946-06-03','address207','city207',0,0),
+(214,214,'1973-12-14','address214','city214',0,0),
+(217,217,'1945-11-06','address217','city217',40,36),
+(218,218,'2007-07-20','address218','city218',0,0),
+(219,219,'1979-10-05','address219','city219',0,0),
+(220,220,'1992-06-20','address220','city220',10,12),
+(221,221,'2007-03-26','address221','city221',50,52),
+(222,222,'1989-12-24','address222','city222',0,0),
+(224,224,'1975-07-14','address224','city224',0,0),
+(225,225,'1976-02-23','address225','city225',20,52),
+(226,226,'1974-06-22','address226','city226',0,0),
+(227,227,'2004-01-16','address227','city227',0,0),
+(232,232,'1958-01-01','address232','city232',0,0),
+(233,233,'1966-08-03','address233','city233',40,32),
+(234,234,'1975-10-22','address234','city234',40,52),
+(235,235,'1983-10-25','address235','city235',0,0),
+(236,236,'1974-03-07','address236','city236',0,0),
+(237,237,'1965-12-31','address237','city237',45,20),
+(238,238,'1971-10-16','address238','city238',0,0),
+(239,239,'1989-07-19','address239','city239',0,0),
+(246,246,'1960-07-08','address246','city246',0,0),
+(249,249,'1943-07-01','address249','city249',40,30),
+(250,250,'1983-10-15','address250','city250',30,52),
+(251,251,'1979-07-03','address251','city251',0,0),
+(252,252,'1985-10-04','address252','city252',15,4),
+(253,253,'1966-10-24','address253','city253',0,0),
+(254,254,'1956-02-02','address254','city254',0,0),
+(1,1,'2003-11-23','address1','city1',40,52),
+(3,3,'1938-01-23','address3','city3',0,0),
+(5,5,'2006-12-27','address5','city5',40,48),
+(7,7,'1969-04-09','address7','city7',0,0),
+(9,9,'2006-06-14','address9','city9',0,0),
+(11,11,'1999-01-12','address11','city11',40,52),
+(13,13,'1968-01-13','address13','city13',50,12),
+(15,15,'1960-04-11','address15','city15',0,0),
+(17,17,'2006-10-13','address17','city17',40,52),
+(19,19,'1950-08-19','address19','city19',0,0),
+(21,21,'2000-05-01','address21','city21',40,30),
+(23,23,'1952-06-09','address23','city23',40,52),
+(25,25,'1934-12-08','address25','city25',32,40),
+(27,27,'1995-04-19','address27','city27',40,45),
+(29,29,'1986-01-14','address29','city29',44,52),
+(31,31,'1978-04-19','address31','city31',10,20),
+(33,33,'1989-11-23','address33','city33',25,10),
+(35,35,'2012-01-02','address35','city35',8,48),
+(37,37,'2005-08-24','address37','city37',40,42),
+(39,39,'1973-11-02','address39','city39',40,52),
+(41,41,'2011-10-12','address41','city41',20,30),
+(43,43,'1960-12-24','address43','city43',0,0),
+(45,45,'1990-04-17','address45','city45',35,40),
+(47,47,'1964-04-02','address47','city47',0,0),
+(49,49,'1957-01-25','address49','city49',40,52),
+(51,51,'1970-10-20','address51','city51',0,0),
+(54,54,'1987-09-30','address54','city54',0,0),
+(58,58,'1975-05-07','address58','city58',0,0),
+(62,62,'1972-08-03','address62','city62',40,52),
+(66,66,'1995-11-04','address66','city66',0,0),
+(70,70,'1985-10-19','address70','city70',40,52),
+(74,74,'1969-06-09','address74','city74',0,0),
+(78,78,'2003-01-16','address78','city78',66,52),
+(82,82,'2012-04-29','address82','city82',50,30),
+(86,86,'2008-02-03','address86','city86',0,0),
+(90,90,'1973-05-15','address90','city90',35,12),
+(94,94,'1987-10-28','address94','city94',40,50),
+(98,98,'1973-06-10','address98','city98',65,50),
+(102,102,'2009-09-13','address102','city102',0,0),
+(106,106,'1986-07-03','address106','city106',0,0),
+(110,110,'1982-06-10','address110','city110',35,52),
+(114,114,'1963-10-08','address114','city114',48,52),
+(118,118,'1948-03-07','address118','city118',0,0),
+(122,122,'1997-12-19','address122','city122',0,0),
+(124,124,'1966-03-25','address124','city124',0,0),
+(128,128,'1968-08-13','address128','city128',0,0),
+(132,132,'1989-09-25','address132','city132',20,20),
+(136,136,'1993-09-02','address136','city136',0,0),
+(140,140,'1981-05-31','address140','city140',48,52),
+(144,144,'1960-09-15','address144','city144',0,0),
+(148,148,'1945-02-13','address148','city148',40,38),
+(152,152,'2010-11-13','address152','city152',20,52),
+(154,154,'1950-11-07','address154','city154',55,52),
+(160,160,'1981-01-17','address160','city160',0,0),
+(162,162,'2001-03-19','address162','city162',0,0),
+(168,168,'2003-03-28','address168','city168',0,0),
+(170,170,'1977-06-18','address170','city170',50,52),
+(176,176,'1967-04-15','address176','city176',30,50),
+(178,178,'1989-10-25','address178','city178',60,12),
+(184,184,'2004-04-21','address184','city184',0,0),
+(186,186,'1952-11-08','address186','city186',50,48),
+(209,209,'1943-03-15','address209','city209',40,30),
+(241,241,'1979-12-02','address241','city241',0,0),
+(257,257,'2010-03-06','address257','city257',40,47);
+--enable_query_log
+
+select * from t1 where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21';
+select * from t1 IGNORE INDEX(dob, weeks_worked_last_year, hours_worked_per_week) where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21';
+
+drop table t1;
+
#
# Test ALTER TABLE ADD/DROP PARTITION IF EXISTS
#
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index 4200f7435fb..9775a8dc28e 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -3618,3 +3618,18 @@ DROP VIEW v2;
DROP TABLE t1, t2;
--echo # End of 5.3 tests
+
+--echo #
+--echo # MDEV-5505: Assertion `! is_set()' fails on PREPARE SELECT
+--echo # with out of range in GROUP BY
+--echo #
+CREATE TABLE t1 (a INT);
+
+--error ER_DATA_OUT_OF_RANGE
+PREPARE stmt FROM "SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1";
+--error ER_DATA_OUT_OF_RANGE
+SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1;
+
+drop table t1;
+
+--echo # End of 5.3 tests
diff --git a/mysql-test/t/range_vs_index_merge.test b/mysql-test/t/range_vs_index_merge.test
index fb8fd778559..7ecca454f4c 100644
--- a/mysql-test/t/range_vs_index_merge.test
+++ b/mysql-test/t/range_vs_index_merge.test
@@ -454,6 +454,8 @@ SELECT * FROM City WHERE Name LIKE 'Pa%';
# index merge retrievals over:
# 2. key1 and key3
# 3. key2 and key3
+set @tmp_range_vs_index_merge=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
EXPLAIN
SELECT * FROM City
@@ -578,6 +580,7 @@ SELECT * FROM City
DROP INDEX Population ON City;
DROP INDEX Name ON City;
+set optimizer_switch=@tmp_range_vs_index_merge;
# The pattern of the WHERE condition used in the following query is
# (key1|2_p1=c AND range(key1_p2)) OR (key1|2_p1=c AND range(key2_p2))
diff --git a/mysql-test/t/rpl_mysqldump_slave.test b/mysql-test/t/rpl_mysqldump_slave.test
index 3f39fe19c0a..77fc4a050cc 100644
--- a/mysql-test/t/rpl_mysqldump_slave.test
+++ b/mysql-test/t/rpl_mysqldump_slave.test
@@ -27,4 +27,13 @@ connection slave;
# Execute mysqldump with --dump-slave ,--apply-slave-statements and --include-master-host-port
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave --apply-slave-statements --include-master-host-port test
+#
+# MDEV-5624 mysqldump --dump-slave option does not restart the replication if the dump has failed
+#
+start slave;
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
+--error 2
+--exec $MYSQL_DUMP_SLAVE --compact --dump-slave no_such_db
+start slave;
+
--source include/rpl_end.inc
diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test
index 6b38e8594ee..b67a15667e8 100644
--- a/mysql-test/t/selectivity.test
+++ b/mysql-test/t/selectivity.test
@@ -749,6 +749,26 @@ SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE SQL_MODE != '';
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
--echo #
+--echo # Bug mdev-5630: always true conjunctive condition
+--echo # when optimizer_use_condition_selectivity=3
+--echo #
+
+set use_stat_tables = 'preferably';
+set optimizer_use_condition_selectivity = 3;
+
+CREATE TABLE t1 (a int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (10);
+
+CREATE TABLE t2 (id int, flag char(1), INDEX(id)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (100,'0'),(101,'1');
+
+ANALYZE TABLE t1, t2;
+
+SELECT * FROM t1, t2 WHERE id = a AND ( a = 16 OR flag AND a != 6 );
+
+DROP TABLE t1,t2;
+
+--echo #
--echo # Bug mdev-4429: join with range condition whose selectivity == 0
--echo # when optimizer_use_condition_selectivity=3
--echo #
diff --git a/mysql-test/t/stat_tables_par.test b/mysql-test/t/stat_tables_par.test
index 6c4e1be6e48..7305d1453a8 100644
--- a/mysql-test/t/stat_tables_par.test
+++ b/mysql-test/t/stat_tables_par.test
@@ -144,7 +144,7 @@ disconnect con1;
disconnect con2;
set debug_sync='RESET';
-select * from mysql.index_stats where table_name='lineitem' order by index_name;
+select * from mysql.index_stats where table_name='lineitem' order by index_name, prefix_arity;
#
# Test for parallel statistics collection and update (innodb)
@@ -217,7 +217,7 @@ connection con2;
set debug_sync='open_and_process_table WAIT_FOR parker';
set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2';
use dbt3_s001;
---send select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68
+--send select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68 order by prefix_arity;
connection con1;
--disable_result_log
diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test
index a114af6a66b..d56b3df3505 100644
--- a/mysql-test/t/subselect4.test
+++ b/mysql-test/t/subselect4.test
@@ -1850,6 +1850,41 @@ SELECT * FROM t1 AS t
WHERE a='r' AND (c,b) NOT IN (SELECT c,b FROM t2 WHERE (c,b)=(t.c,t.b));
DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-5468: assertion failure with a simplified condition in subselect
+--echo #
+
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1);
+
+CREATE TABLE t2 ( pk int PRIMARY KEY, c INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,4), (2,6);
+
+SELECT ( SELECT MAX(b) FROM t1, t2 WHERE pk = a AND b < from_sq.c ) AS select_sq,
+ COUNT( DISTINCT from_sq.c )
+FROM ( SELECT DISTINCT t2_1.* FROM t2 AS t2_1, t2 AS t2_2 ) AS from_sq
+GROUP BY select_sq ;
+
+DROP TABLE t1,t2;
+
+
+CREATE TABLE t1 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'BE','BEL');
+
+CREATE TABLE t2 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'BE','BEL'), (2,'MX','MEX');
+CREATE VIEW v2 AS SELECT DISTINCT * FROM t2;
+
+SELECT * FROM t1 AS outer_t1, v2
+WHERE v2.a3 = outer_t1.a3
+ AND EXISTS ( SELECT * FROM t1 WHERE a2 < v2.a2 AND id = outer_t1.id )
+ AND outer_t1.a3 < 'J'
+ORDER BY v2.id;
+
+DROP VIEW v2;
+DROP TABLE t1,t2;
+
--echo #
--echo # MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT
--echo #
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index a6ce3f25617..1b0076fd1e6 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2489,6 +2489,24 @@ INSERT INTO t1 VALUES ('mysql'),('information_schema');
SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA);
DROP TABLE t1;
+--echo #
+--echo # MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
+--echo #
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (2),(3);
+
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (8),(9);
+
+CREATE TABLE t3 (c INT, INDEX(c));
+INSERT INTO t2 VALUES (5),(6);
+
+PREPARE stmt FROM
+"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
+EXECUTE stmt;
+EXECUTE stmt;
+
+DROP TABLE t1,t2,t3;
--echo #
--echo # MySQL Bug#13340270: assertion table->sort.record_pointers == __null
diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test
index 18221c90bc0..9d9e7848415 100644
--- a/mysql-test/t/subselect_sj2.test
+++ b/mysql-test/t/subselect_sj2.test
@@ -1245,6 +1245,24 @@ SELECT * FROM t1 WHERE ( 1, 1 ) IN (
DROP TABLE t1,t2,t3;
+--echo #
+--echo # MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin
+--echo #
+CREATE TABLE t1 (a INT) engine=innodb;
+INSERT INTO t1 VALUES (8),(9);
+
+CREATE TABLE t2 (b INT) engine=innodb;
+INSERT INTO t2 VALUES (2),(3);
+
+CREATE TABLE t3 (c INT, INDEX(c)) engine=innodb;
+INSERT INTO t2 VALUES (4),(5);
+
+explain
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+SELECT * FROM t1 WHERE 9 IN ( SELECT b FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) );
+
+DROP TABLE t1,t2,t3;
+
--source include/have_innodb.inc
--disable_warnings
diff --git a/mysql-test/t/udf_debug_sync.test b/mysql-test/t/udf_debug_sync.test
new file mode 100644
index 00000000000..593500c1e18
--- /dev/null
+++ b/mysql-test/t/udf_debug_sync.test
@@ -0,0 +1,40 @@
+--source include/have_debug_sync.inc
+--source include/have_udf.inc
+
+#
+# MDEV-5616 - Deadlock between CREATE/DROP FUNCTION and SELECT from view
+#
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
+CREATE VIEW v1 AS SELECT myfunc_int(1);
+connect(con1, localhost, root,,);
+
+connection con1;
+SET debug_sync='mysql_create_function_after_lock SIGNAL locked WAIT_FOR go';
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+send_eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+
+connection default;
+SET debug_sync='now WAIT_FOR locked';
+SET debug_sync='find_udf_before_lock SIGNAL go';
+SELECT * FROM v1;
+FLUSH TABLES;
+
+connection con1;
+reap;
+SET debug_sync='mysql_drop_function_after_lock SIGNAL locked WAIT_FOR go';
+send DROP FUNCTION myfunc_double;
+
+connection default;
+SET debug_sync='now WAIT_FOR locked';
+SET debug_sync='find_udf_before_lock SIGNAL go';
+SELECT * FROM v1;
+
+connection con1;
+reap;
+disconnect con1;
+
+connection default;
+SET debug_sync='RESET';
+DROP VIEW v1;
+DROP FUNCTION myfunc_int;
diff --git a/mysql-test/t/union_crash-714.test b/mysql-test/t/union_crash-714.test
new file mode 100644
index 00000000000..6c31a2202cb
--- /dev/null
+++ b/mysql-test/t/union_crash-714.test
@@ -0,0 +1,9 @@
+#
+# MDEV-714 LP:1020645 - crash (sig 11) with union query
+#
+--source include/have_debug.inc
+create table t1 (i tinyint);
+set debug_dbug='+d,bug11747970_raise_error';
+--error ER_QUERY_INTERRUPTED
+insert into t1 (i) select i from t1 union select i from t1;
+drop table t1;
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index cdc6bd6f91e..e84e3ac247f 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -673,6 +673,11 @@ SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />');
SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />');
SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b');
+#
+# MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes
+# MySQL bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP
+#
+SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)');
--echo #
--echo # Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars