mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Fixed a bad merge.
Changed a test case to make its result set platform independent.
This commit is contained in:
parent
e1194ad63b
commit
a55f0cabcb
3 changed files with 28 additions and 40 deletions
|
@ -4283,57 +4283,51 @@ INSERT INTO t3 VALUES
|
|||
(16,6,'e'), (17,3,'t'), (18,8,'j'), (19,5,'h'), (20,7,'w');
|
||||
SET SESSION join_cache_level=1;
|
||||
EXPLAIN
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index idx1 idx2 7 NULL 20 Using index; Using temporary; Using filesort
|
||||
1 SIMPLE t3 eq_ref PRIMARY,idx2 PRIMARY 4 test.t2.i 1 Using where
|
||||
1 SIMPLE t1 ref idx2 idx2 3 test.t3.v 5
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
1 SIMPLE t1 ref idx2 idx2 3 test.t3.v 5 Using where
|
||||
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;
|
||||
v
|
||||
h
|
||||
z
|
||||
p
|
||||
n
|
||||
d
|
||||
f
|
||||
s
|
||||
a
|
||||
v
|
||||
m
|
||||
y
|
||||
SET SESSION join_cache_level=6;
|
||||
EXPLAIN
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL idx1 NULL NULL NULL 20 Using temporary; Using filesort
|
||||
1 SIMPLE t3 eq_ref PRIMARY,idx2 PRIMARY 4 test.t2.i 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t1 ref idx2 idx2 3 test.t3.v 5 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
1 SIMPLE t1 ref idx2 idx2 3 test.t3.v 5 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
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;
|
||||
v
|
||||
z
|
||||
h
|
||||
n
|
||||
p
|
||||
d
|
||||
m
|
||||
y
|
||||
a
|
||||
f
|
||||
s
|
||||
v
|
||||
p
|
||||
SET SESSION join_cache_level=4;
|
||||
EXPLAIN
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL idx1 NULL NULL NULL 20 Using temporary; Using filesort
|
||||
1 SIMPLE t3 hash_ALL PRIMARY,idx2 #hash#PRIMARY 4 test.t2.i 20 Using where; Using join buffer (flat, BNLH join)
|
||||
1 SIMPLE t1 hash_ALL idx2 #hash#idx2 3 test.t3.v 45 Using join buffer (incremental, BNLH join)
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
1 SIMPLE t1 hash_ALL idx2 #hash#idx2 3 test.t3.v 45 Using where; Using join buffer (incremental, BNLH join)
|
||||
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;
|
||||
v
|
||||
h
|
||||
|
@ -4341,12 +4335,6 @@ z
|
|||
n
|
||||
v
|
||||
p
|
||||
d
|
||||
m
|
||||
y
|
||||
a
|
||||
f
|
||||
s
|
||||
DROP TABLE t1,t2,t3;
|
||||
SET SESSION join_cache_level=DEFAULT;
|
||||
#
|
||||
|
|
|
@ -2489,23 +2489,29 @@ INSERT INTO t3 VALUES
|
|||
|
||||
SET SESSION join_cache_level=1;
|
||||
EXPLAIN
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
|
||||
SET SESSION join_cache_level=6;
|
||||
EXPLAIN
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
|
||||
SET SESSION join_cache_level=4;
|
||||
EXPLAIN
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
SELECT t2.v FROM t1, t2, t3 WHERE t3.v <> t2.v AND t3.pk = t2.i AND t1.v = t3.v
|
||||
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;
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
|
|
@ -17969,12 +17969,6 @@ skipped_filesort:
|
|||
delete save_quick;
|
||||
save_quick= NULL;
|
||||
}
|
||||
/*
|
||||
orig_cond is a part of pre_idx_push_cond,
|
||||
no need to restore it.
|
||||
*/
|
||||
orig_cond= 0;
|
||||
orig_cond_saved= false;
|
||||
if (orig_cond_saved && !changed_key)
|
||||
tab->set_cond(orig_cond);
|
||||
DBUG_RETURN(1);
|
||||
|
|
Loading…
Reference in a new issue