summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/include/icp_tests.inc31
-rw-r--r--mysql-test/r/innodb_icp.result23
-rw-r--r--mysql-test/r/maria_icp.result23
-rw-r--r--mysql-test/r/myisam_icp.result23
4 files changed, 100 insertions, 0 deletions
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index c41fab88293..e6c949a0ab2 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -493,6 +493,37 @@ DROP TABLE t1;
set optimizer_switch= @save_optimizer_switch;
--echo #
+--echo # Bug#58837: ICP crash or valgrind error due to uninitialized
+--echo # value in innobase_index_cond
+--echo #
+
+CREATE TABLE t1 (
+ t1_int INT,
+ t1_time TIME
+);
+
+CREATE TABLE t2 (
+ t2_int int PRIMARY KEY,
+ t2_int2 INT
+);
+
+--disable_warnings
+INSERT INTO t2 VALUES ();
+INSERT INTO t1 VALUES ();
+--enable_warnings
+
+SELECT * FROM t1 AS t1a
+ WHERE NOT EXISTS (SELECT * FROM t1 AS t1b
+ WHERE t1b.t1_int NOT IN
+ (SELECT t2.t2_int FROM t2
+ WHERE t1b.t1_time LIKE t1b.t1_int
+ OR t1b.t1_time <> t2.t2_int2
+ AND 6=7));
+
+DROP TABLE t1,t2;
+
+
+--echo #
--echo # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
--echo #
CREATE TABLE t1 ( f11 int) ;
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index 8293b3fbf83..aacb129b5de 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -462,6 +462,29 @@ pk c1
DROP TABLE t1;
set optimizer_switch= @save_optimizer_switch;
#
+# Bug#58837: ICP crash or valgrind error due to uninitialized
+# value in innobase_index_cond
+#
+CREATE TABLE t1 (
+t1_int INT,
+t1_time TIME
+);
+CREATE TABLE t2 (
+t2_int int PRIMARY KEY,
+t2_int2 INT
+);
+INSERT INTO t2 VALUES ();
+INSERT INTO t1 VALUES ();
+SELECT * FROM t1 AS t1a
+WHERE NOT EXISTS (SELECT * FROM t1 AS t1b
+WHERE t1b.t1_int NOT IN
+(SELECT t2.t2_int FROM t2
+WHERE t1b.t1_time LIKE t1b.t1_int
+OR t1b.t1_time <> t2.t2_int2
+AND 6=7));
+t1_int t1_time
+DROP TABLE t1,t2;
+#
# BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
#
CREATE TABLE t1 ( f11 int) ;
diff --git a/mysql-test/r/maria_icp.result b/mysql-test/r/maria_icp.result
index 1ae227fd283..3d094a263d0 100644
--- a/mysql-test/r/maria_icp.result
+++ b/mysql-test/r/maria_icp.result
@@ -468,6 +468,29 @@ pk c1
DROP TABLE t1;
set optimizer_switch= @save_optimizer_switch;
#
+# Bug#58837: ICP crash or valgrind error due to uninitialized
+# value in innobase_index_cond
+#
+CREATE TABLE t1 (
+t1_int INT,
+t1_time TIME
+);
+CREATE TABLE t2 (
+t2_int int PRIMARY KEY,
+t2_int2 INT
+);
+INSERT INTO t2 VALUES ();
+INSERT INTO t1 VALUES ();
+SELECT * FROM t1 AS t1a
+WHERE NOT EXISTS (SELECT * FROM t1 AS t1b
+WHERE t1b.t1_int NOT IN
+(SELECT t2.t2_int FROM t2
+WHERE t1b.t1_time LIKE t1b.t1_int
+OR t1b.t1_time <> t2.t2_int2
+AND 6=7));
+t1_int t1_time
+DROP TABLE t1,t2;
+#
# BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
#
CREATE TABLE t1 ( f11 int) ;
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index cd51b0b9c94..2a7478111e2 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -466,6 +466,29 @@ pk c1
DROP TABLE t1;
set optimizer_switch= @save_optimizer_switch;
#
+# Bug#58837: ICP crash or valgrind error due to uninitialized
+# value in innobase_index_cond
+#
+CREATE TABLE t1 (
+t1_int INT,
+t1_time TIME
+);
+CREATE TABLE t2 (
+t2_int int PRIMARY KEY,
+t2_int2 INT
+);
+INSERT INTO t2 VALUES ();
+INSERT INTO t1 VALUES ();
+SELECT * FROM t1 AS t1a
+WHERE NOT EXISTS (SELECT * FROM t1 AS t1b
+WHERE t1b.t1_int NOT IN
+(SELECT t2.t2_int FROM t2
+WHERE t1b.t1_time LIKE t1b.t1_int
+OR t1b.t1_time <> t2.t2_int2
+AND 6=7));
+t1_int t1_time
+DROP TABLE t1,t2;
+#
# BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
#
CREATE TABLE t1 ( f11 int) ;