mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.6' into 10.11
This commit is contained in:
@ -3,11 +3,6 @@
|
||||
# Testing ORDER BY
|
||||
#
|
||||
|
||||
# Tests will be skipped for the view protocol because the view protocol creates
|
||||
# an additional util connection and other statistics data
|
||||
# Check after fix MDEV-27871, possible this include can be removed
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
call mtr.add_suppression("Sort aborted.*");
|
||||
call mtr.add_suppression("Out of sort memory; increase server sort buffer size");
|
||||
--source include/have_sequence.inc
|
||||
@ -823,6 +818,7 @@ INSERT INTO t1 SELECT a +64, b +64 FROM t1;
|
||||
|
||||
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
|
||||
|
||||
--disable_view_protocol
|
||||
--disable_query_log
|
||||
--let $q = `show status like 'Created_tmp_tables';`
|
||||
eval set @tmp_tables_before =
|
||||
@ -841,6 +837,7 @@ eval set @tmp_tables_after =
|
||||
--enable_query_log
|
||||
|
||||
SELECT @tmp_tables_after = @tmp_tables_before ;
|
||||
--enable_view_protocol
|
||||
|
||||
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a;
|
||||
|
||||
@ -887,7 +884,7 @@ INSERT INTO t2 (a,b) VALUES (1,2), (2,3);
|
||||
INSERT INTO t3 (c) VALUES (1), (2);
|
||||
|
||||
SELECT
|
||||
(SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a)
|
||||
(SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) as exp
|
||||
FROM t3;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
@ -1457,6 +1454,7 @@ SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0;
|
||||
SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 10 OFFSET 10;
|
||||
SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0 OFFSET 10;
|
||||
|
||||
--disable_view_protocol
|
||||
--disable_ps2_protocol
|
||||
################
|
||||
## Test with SQL_CALC_FOUND_ROWS
|
||||
@ -1505,6 +1503,7 @@ WHERE t1.f2>20
|
||||
ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30;
|
||||
SELECT FOUND_ROWS();
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
################
|
||||
## Test views
|
||||
@ -1878,6 +1877,7 @@ insert into t1
|
||||
analyze table t1;
|
||||
--enable_result_log
|
||||
|
||||
--disable_view_protocol
|
||||
--disable_ps2_protocol
|
||||
explain
|
||||
select b, count(*) num_cnt from t1
|
||||
@ -1899,6 +1899,7 @@ select b, count(*) num_cnt from t1
|
||||
--enable_result_log
|
||||
show status like '%Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
drop table t0, t1;
|
||||
|
||||
@ -1997,9 +1998,11 @@ WHERE f1 = ANY ( SELECT f1
|
||||
WHERE t3a.f3 < f1 OR t3b.f3 != f1 )
|
||||
ORDER BY field;
|
||||
|
||||
--disable_view_protocol
|
||||
eval $q1;
|
||||
eval $q2;
|
||||
eval EXPLAIN EXTENDED $q2;
|
||||
--enable_view_protocol
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
@ -2394,7 +2397,7 @@ let $query= select
|
||||
t2.key1 = t1.a and t2.key1 IS NOT NULL
|
||||
ORDER BY
|
||||
t2.key2 ASC
|
||||
LIMIT 1)
|
||||
LIMIT 1) as exp
|
||||
from t1;
|
||||
|
||||
--echo # here type should show ref not index
|
||||
|
Reference in New Issue
Block a user