summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-11-18 09:35:51 -0800
committerIgor Babaev <igor@askmonty.org>2011-11-18 09:35:51 -0800
commit6ed9c1364302ea998aa265e67aa7714dc3f365c2 (patch)
tree7a1ab08019a73c74aaf3d23c0652a95cbe9519af /mysql-test/t
parentfbb22ca4a703af321c3c592fe62a721c416ec357 (diff)
downloadmariadb-git-6ed9c1364302ea998aa265e67aa7714dc3f365c2.tar.gz
Fixed LP bug #891953.
Due to this bug the function SEL_IMERGE::or_sel_tree_with_checks() could build an inconsistent merge tree if one of the SEL_TREEs in the resulting index merge happened to contain a full key range. This could trigger an assertion failure.
Diffstat (limited to 'mysql-test/t')
-rwxr-xr-xmysql-test/t/range_vs_index_merge.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/range_vs_index_merge.test b/mysql-test/t/range_vs_index_merge.test
index f1bf9d9026f..de7e6a0838c 100755
--- a/mysql-test/t/range_vs_index_merge.test
+++ b/mysql-test/t/range_vs_index_merge.test
@@ -1074,6 +1074,21 @@ SELECT * FROM t1
DROP TABLE t1;
+#
+# LP bug #891953: always true OR
+#
+
+CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX idx(b));
+INSERT INTO t1 VALUES (167,9999), (168,10000);
+
+EXPLAIN
+SELECT * FROM t1
+ WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+SELECT * FROM t1
+ WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+
+DROP TABLE t1;
+
#the following command must be the last one in the file
set session optimizer_switch='index_merge_sort_intersection=default';