1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.11 into 11.0

This commit is contained in:
Marko Mäkelä
2023-06-08 13:49:48 +03:00
140 changed files with 3872 additions and 1725 deletions

View File

@ -1860,7 +1860,6 @@ test.t1 analyze status Table is already up to date
test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
set optimizer_switch='exists_to_in=off';
set optimizer_use_condition_selectivity=2;
SELECT * FROM t1
WHERE
EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id
@ -1885,18 +1884,39 @@ id a
17 17
18 18
19 19
explain SELECT * FROM t1
set statement optimizer_use_condition_selectivity=2 for explain SELECT * FROM t1
WHERE
EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id
WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65;
3 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
3 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
set statement optimizer_use_condition_selectivity=4 for explain SELECT * FROM t1
WHERE
EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id
WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A const PRIMARY,a PRIMARY 4 const 1
1 SIMPLE B ref a a 5 const 1
1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
3 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
3 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
set @query="EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65";
set statement optimizer_use_condition_selectivity=2 for explain SELECT * FROM t1
WHERE
EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id
WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
3 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
3 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
set statement optimizer_use_condition_selectivity=4 for explain SELECT * FROM t1
WHERE
EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id
WHERE A.a=t1.a AND t2.b < 20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
3 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
3 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
explain SELECT * FROM t1
WHERE
EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id
@ -1906,7 +1926,6 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1
2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where
set optimizer_switch= @save_optimizer_switch;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2;
#
# MDEV-21495: Conditional jump or move depends on uninitialised value in sel_arg_range_seq_next