mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch 10.2 into 10.3
This commit is contained in:
@ -198,5 +198,28 @@ id id
|
||||
1 NULL
|
||||
2 1
|
||||
3 3
|
||||
#
|
||||
# MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ... LIMIT
|
||||
#
|
||||
# This must NOT have "Range checked for each record" without any
|
||||
# provisions to produce rows in the required ordering:
|
||||
explain
|
||||
select
|
||||
t1.id,t2.id
|
||||
from
|
||||
t1 left join
|
||||
t2 on t2.id2 = t1.id and
|
||||
t2.id = (select dd.id
|
||||
from t2 dd
|
||||
where
|
||||
dd.id2 = t1.id and
|
||||
d1 > '2019-02-06 00:00:00'
|
||||
order by
|
||||
dd.d1, dd.d2, dd.id limit 1
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 index NULL PRIMARY 4 NULL # Using index
|
||||
1 PRIMARY t2 eq_ref PRIMARY,id2 PRIMARY 4 func # Using where
|
||||
2 DEPENDENT SUBQUERY dd range id2,for_latest_sort for_latest_sort 6 NULL # Using where
|
||||
drop table t1,t2;
|
||||
# End of 10.2 tests
|
||||
|
Reference in New Issue
Block a user