mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-31003: Second execution for ps-protocol
This patch adds for "--ps-protocol" second execution of queries "SELECT". Also in this patch it is added ability to disable/enable (--disable_ps2_protocol/--enable_ps2_protocol) second execution for "--ps-prototocol" in testcases.
This commit is contained in:
@ -1463,6 +1463,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_ps2_protocol
|
||||
################
|
||||
## Test with SQL_CALC_FOUND_ROWS
|
||||
set sort_buffer_size= 32768;
|
||||
@ -1509,6 +1510,7 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 JOIN tmp on t1.f2=tmp.f2
|
||||
WHERE t1.f2>20
|
||||
ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30;
|
||||
SELECT FOUND_ROWS();
|
||||
--enable_ps2_protocol
|
||||
|
||||
################
|
||||
## Test views
|
||||
@ -1533,6 +1535,7 @@ GROUP BY 1 ORDER BY 2,1 LIMIT 0;
|
||||
|
||||
################
|
||||
## Test SP
|
||||
--disable_ps2_protocol
|
||||
delimiter |;
|
||||
CREATE PROCEDURE wl1393_sp_test()
|
||||
BEGIN
|
||||
@ -1546,6 +1549,7 @@ END|
|
||||
CALL wl1393_sp_test()|
|
||||
DROP PROCEDURE wl1393_sp_test|
|
||||
delimiter ;|
|
||||
--enable_ps2_protocol
|
||||
|
||||
################
|
||||
## Test with subqueries
|
||||
@ -1880,6 +1884,7 @@ insert into t1
|
||||
analyze table t1;
|
||||
--enable_result_log
|
||||
|
||||
--disable_ps2_protocol
|
||||
explain
|
||||
select b, count(*) num_cnt from t1
|
||||
where a > 9750 group by b order by num_cnt;
|
||||
@ -1899,6 +1904,7 @@ select b, count(*) num_cnt from t1
|
||||
where a > 9750 group by b order by num_cnt limit 1;
|
||||
--enable_result_log
|
||||
show status like '%Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t0, t1;
|
||||
|
||||
|
Reference in New Issue
Block a user