summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_sj_jcl6.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-01-30 20:34:47 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-01-30 20:34:47 +0400
commit12bd3dfe29164a4a74a97da5c09d9401491ea27d (patch)
treeb24535c67961180684125425be9dc91e70ccda66 /mysql-test/r/subselect_sj_jcl6.result
parent9fce78a48225e0aa584d590943e460ce98649669 (diff)
downloadmariadb-git-12bd3dfe29164a4a74a97da5c09d9401491ea27d.tar.gz
BUG#923246: Loosescan reports different result than other semijoin methods
- If LooseScan is used with quick select, require that quick select produces data in key order (this disables use of MRR, which can return data in arbitrary order).
Diffstat (limited to 'mysql-test/r/subselect_sj_jcl6.result')
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result40
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index a27b6b7b55d..dd358ced14a 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -2602,6 +2602,46 @@ k 8 v
g 0 j
g 8 v
DROP TABLE t1, t2;
+#
+# BUG#923246: Loosescan reports different result than other semijoin methods
+#
+set @tmp_923246= @@optimizer_switch;
+set optimizer_switch='mrr=on,materialization=off';
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (kp1 int, kp2 int, c int, filler char(100), key(kp1, kp2));
+insert into t1 select A.a+10*(B.a+10*C.a), 0, 0, 'filler' from t0 A, t0 B, t0 C;
+insert into t1 select * from t1 where kp1 < 20;
+create table t3 (a int);
+insert into t3 select A.a + 10*B.a from t0 A, t0 B;
+select * from t3 where a in (select kp1 from t1 where kp1<20);
+a
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+explain select * from t3 where a in (select kp1 from t1 where kp1<20);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range kp1 kp1 5 NULL 48 Using where; Using index; LooseScan
+1 PRIMARY t3 ALL NULL NULL NULL NULL 100 Using where; Using join buffer (flat, BNL join)
+drop table t0,t1,t3;
+set optimizer_switch= @tmp_923246;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off