1
0
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:
Lena Startseva
2023-05-31 11:57:45 +07:00
parent 23dae6173c
commit 9854fb6fa7
400 changed files with 1339 additions and 42 deletions

View File

@ -1166,6 +1166,7 @@ DROP TABLE t1;
# Bug#2198 SELECT INTO OUTFILE (with Sub-Select) Problem
#
--disable_ps2_protocol
create table t1 (a int, b decimal(13, 3));
insert into t1 values (1, 0.123);
let $outfile_abs= $MYSQLTEST_VARDIR/tmp/subselect.out.file.1;
@ -1178,7 +1179,7 @@ eval load data infile "$outfile_rel" into table t1;
--remove_file $outfile_abs
select * from t1;
drop table t1;
--enable_ps2_protocol
#
# Bug#2479 dependant subquery with limit crash
@ -5843,6 +5844,7 @@ SELECT
WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) AS m
FROM t2 alias1, t1 alias2, t1 alias3;
--disable_ps2_protocol
flush status;
SELECT
@ -5870,6 +5872,7 @@ FROM t2 alias1, t1 alias2, t1 alias3;
show status like "subquery_cache%";
show status like '%Handler_read%';
--enable_ps2_protocol
drop table t1, t2, t3;
@ -5915,8 +5918,10 @@ set global userstat=on;
flush table_statistics;
flush index_statistics;
--disable_ps2_protocol
SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1
WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
--enable_ps2_protocol
--echo # The following shows that t2 was indeed scanned with a full scan.
show table_statistics;