summaryrefslogtreecommitdiff
path: root/mysql-test/t/key.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-11-05 13:19:56 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2007-11-05 13:19:56 +0200
commit860f7db3b9a600bc37995ce354343b402db00334 (patch)
tree0a93575c243d67f1944678c1197a690059933f47 /mysql-test/t/key.test
parent6a79a2196fc40367191883a3dbe0d350bd7dfc7f (diff)
downloadmariadb-git-860f7db3b9a600bc37995ce354343b402db00334.tar.gz
Bug #31974: Wrong EXPLAIN output
The fix for bug 31148 is not correct. It does not have a relation to the problem described in this bug. And removing the fix will not make the bug to re-appear. Fixed the bug #31974 by removing the fix for bug 31148 and adding a test case. mysql-test/r/key.result: Bug #31974: test case mysql-test/t/key.test: Bug #31974: test case sql/sql_select.cc: Bug #31974: revert the fix for bug 31148
Diffstat (limited to 'mysql-test/t/key.test')
-rw-r--r--mysql-test/t/key.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index cd6c480407d..31d5ac5201b 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -524,3 +524,20 @@ ORDER BY (
LIMIT 1);
DROP TABLE t1;
+
+
+#
+# Bug #31974: Wrong EXPLAIN output
+#
+
+CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
+INSERT INTO t1 (a, b)
+ VALUES
+ (1,1), (1,2), (1,3), (1,4), (1,5),
+ (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+ (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+SELECT 1 as RES FROM t1 AS t1_outer WHERE
+ (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+
+DROP TABLE t1;