summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect4.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2013-11-21 15:19:25 -0800
committerIgor Babaev <igor@askmonty.org>2013-11-21 15:19:25 -0800
commitc0f31dc9f3e0a42911beb6655a40601d2fddfe8e (patch)
treeeceda1a471f3179d772999bf15a77d282e226c45 /mysql-test/r/subselect4.result
parentf8a6ee59acb082678cf601a10cbe9c1152748242 (diff)
downloadmariadb-git-c0f31dc9f3e0a42911beb6655a40601d2fddfe8e.tar.gz
Another attempt to fix bug mdev-5103.
The earlier pushed fix for the bug was incomplete. It did not remove the main cause of the problem: the function remove_eq_conds() removed always true multiple equalities from any conjunct, but did not adjust the list of them stored in Item_cond_and::cond_equal.current_level. Simplified the test case for the bug and moved it to another test file. The fix triggered changes in EXPLAIN EXTENDED for some queries.
Diffstat (limited to 'mysql-test/r/subselect4.result')
-rw-r--r--mysql-test/r/subselect4.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index 83716429efe..20cb28c3ffb 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -2326,5 +2326,27 @@ x NULL NULL NULL
d NULL NULL NULL
drop table t1,t2;
set @@optimizer_switch = @optimizer_switch_MDEV4056;
+#
+# MDEV-5103: server crashed on singular Item_equal
+#
+CREATE TABLE t1 (
+a enum('p','r') NOT NULL DEFAULT 'r',
+b int NOT NULL DEFAULT '0',
+c char(32) NOT NULL,
+d varchar(255) NOT NULL,
+PRIMARY KEY (a, b), UNIQUE KEY idx(a, c)
+);
+INSERT INTO t1 VALUES ('r', 1, 'ad18832202b199728921807033a8a515', '001_cbr643');
+CREATE TABLE t2 (
+a enum('p','r') NOT NULL DEFAULT 'r',
+b int NOT NULL DEFAULT '0',
+e datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+PRIMARY KEY (a, b, e)
+);
+INSERT INTO t2 VALUES ('r', 1, '2013-10-05 14:25:30');
+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));
+a b c d
+DROP TABLE t1, t2;
SET optimizer_switch= @@global.optimizer_switch;
set @@tmp_table_size= @@global.tmp_table_size;