diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-06-30 12:56:31 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-06-30 12:56:31 +0400 |
commit | 768620ee5c71742e2ea00063ebe1d3cdb6cc81e9 (patch) | |
tree | 094a79b32524a38ed6d96e4e2cd5c7c94a955431 /mysql-test/t/join_cache.test | |
parent | 1b2f9126b838b75a651406eaf3d7269613b123a0 (diff) | |
download | mariadb-git-768620ee5c71742e2ea00063ebe1d3cdb6cc81e9.tar.gz |
MDEV-8189 field<>const and const<>field are not symmetric
Diffstat (limited to 'mysql-test/t/join_cache.test')
-rw-r--r-- | mysql-test/t/join_cache.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index 7d873c555f6..019d8edde2f 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -2505,6 +2505,18 @@ SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 GROUP BY t2.v ORDER BY t1.pk,t2.v; +# MDEV-8189 field<>const and const<>field are not symmetric +# Do the same EXPLAIN and SELECT +# for "t2.v <> t3.v" instead of "t3.v <> t2.v" + +EXPLAIN +SELECT t2.v FROM t1, t2, t3 +WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 + GROUP BY t2.v ORDER BY t1.pk,t2.v; +SELECT t2.v FROM t1, t2, t3 +WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 + GROUP BY t2.v ORDER BY t1.pk,t2.v; + SET SESSION join_cache_level=6; EXPLAIN SELECT t2.v FROM t1, t2, t3 @@ -2514,6 +2526,17 @@ SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 GROUP BY t2.v ORDER BY t1.pk,t2.v; +# MDEV-8189 field<>const and const<>field are not symmetric +# Do the same EXPLAIN and SELECT +# for "t2.v <> t3.v" instead of "t3.v <> t2.v" +EXPLAIN +SELECT t2.v FROM t1, t2, t3 +WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 + GROUP BY t2.v ORDER BY t1.pk,t2.v; +SELECT t2.v FROM t1, t2, t3 +WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 + GROUP BY t2.v ORDER BY t1.pk,t2.v; + SET SESSION join_cache_level=4; EXPLAIN SELECT t2.v FROM t1, t2, t3 @@ -2523,6 +2546,17 @@ SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 GROUP BY t2.v ORDER BY t1.pk,t2.v; +# MDEV-8189 field<>const and const<>field are not symmetric +# Do the same EXPLAIN and SELECT +# for "t2.v <> t3.v" instead of "t3.v <> t2.v" +EXPLAIN +SELECT t2.v FROM t1, t2, t3 +WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 + GROUP BY t2.v ORDER BY t1.pk,t2.v; +SELECT t2.v FROM t1, t2, t3 +WHERE t2.v <> t3.v AND t3.pk = t2.i AND t1.v = t3.v AND t1.pk*2<100 + GROUP BY t2.v ORDER BY t1.pk,t2.v; + DROP TABLE t1,t2,t3; SET SESSION join_cache_level=DEFAULT; |