summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/innodb_mysql.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-03-15 12:30:48 -0700
committerIgor Babaev <igor@askmonty.org>2011-03-15 12:30:48 -0700
commit8aaf9197d09ab3092bcacc23546d23fea93e4122 (patch)
treebb295fdb1d261ddcffe4b61fee3a0f3b3eb5f13a /mysql-test/suite/innodb/r/innodb_mysql.result
parent3f944c43e984bbfd71ee0fd898c241e760f1836a (diff)
parent633dbc3b68d4e33abad7f6ea9bd2100a5a032db1 (diff)
downloadmariadb-git-8aaf9197d09ab3092bcacc23546d23fea93e4122.tar.gz
Merge.
Diffstat (limited to 'mysql-test/suite/innodb/r/innodb_mysql.result')
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index 4d35d798803..ed2f0254e4d 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -2785,4 +2785,26 @@ DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb;
ALTER TABLE t1 RENAME TO t2, DISABLE KEYS;
DROP TABLE IF EXISTS t1, t2;
+#
+# Bug#702322: HAVING with two ANDed predicates + ORDER BY
+#
+CREATE TABLE t1 (pk int PRIMARY KEY, a int, KEY (a)) ENGINE=InnoDB;
+CREATE TABLE t2 (a int, KEY (a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(18,0),(9,10),(8,11),(2,15),(7,19),(1,20);
+SET SESSION join_cache_level = 0;
+EXPLAIN
+SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
+WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
+ORDER BY t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
+1 SIMPLE t2 ref a a 5 test.t1.pk 1 Using index
+SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
+WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
+ORDER BY t1.a;
+a
+10
+19
+DROP TABLE t1,t2;
End of 5.3 tests