summaryrefslogtreecommitdiff
path: root/mysql-test/t/range.test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-02-16 16:06:49 -0800
committerIgor Babaev <igor@askmonty.org>2012-02-16 16:06:49 -0800
commitc563ea0717f3de43b7331dd4368e9f9cf4559be0 (patch)
tree1257772583e79dfab6c7fc717eb9d2c353442e2d /mysql-test/t/range.test
parent0c265a5eb8962fba6f0be90946ec8af11b44af45 (diff)
downloadmariadb-git-c563ea0717f3de43b7331dd4368e9f9cf4559be0.tar.gz
Fixed LP bug #933117.
The bug was fixed with the code back-ported from the patch for LP bug 800184 pushed into mariadb-5.3.
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r--mysql-test/t/range.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 6c9320b708a..a5ab6905b74 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -1393,3 +1393,17 @@ SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
DROP TABLE t1;
--echo End of 5.1 tests
+
+--echo #
+--echo # LP Bug #533117: Wrong use_count in SEL_ARG trees
+--echo # (Bug #58731)
+--echo #
+
+create table t1 (a int, b int, c int, key idx (a,b,c));
+insert into t1 values (0,0,0), (2,2,0), (1,1,1), (2,2,1);
+
+explain
+select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
+select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
+
+drop table t1;