1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -1032,9 +1032,11 @@ EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR JOIN (PRIMARY,i2);
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a;
--echo # Here's a proof it is really doing sorting:
flush status;
--disable_ps2_protocol
--disable_result_log
SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a;
--enable_result_log
--enable_ps2_protocol
show status like 'Sort_%';
--echo # Proof ends.
--echo #
@ -1045,9 +1047,11 @@ show status like 'Sort_%';
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
--echo # Here's a proof it is really doing sorting:
flush status;
--disable_ps2_protocol
--disable_result_log
SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
--enable_result_log
--enable_ps2_protocol
show status like 'Sort_%';
--echo # Proof ends.
--echo #
@ -1400,7 +1404,9 @@ let $query0=SELECT col1 AS field1, col1 AS field2
# Needs to be range to exercise bug
--eval EXPLAIN $query0;
FLUSH STATUS;
--disable_ps2_protocol
--eval $query0;
--enable_ps2_protocol
SHOW SESSION STATUS LIKE 'Sort_scan%';
let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2
@ -1409,7 +1415,9 @@ let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2
# Needs to be range to exercise bug
--eval EXPLAIN $query
FLUSH STATUS;
--disable_ps2_protocol
--eval $query
--enable_ps2_protocol
SHOW SESSION STATUS LIKE 'Sort_scan%';
CREATE VIEW v1 AS SELECT * FROM t1;
@ -1643,6 +1651,7 @@ DROP TABLE t1, t2;
#the view protocol creates
# an additional util connection and other statistics data
--disable_ps2_protocol
--disable_view_protocol
FLUSH STATUS; # this test case *must* use Aria temp tables
@ -1655,6 +1664,7 @@ DROP TABLE t1;
--echo the value below *must* be 1
show status like 'Created_tmp_disk_tables';
--enable_view_protocol
--enable_ps2_protocol
--echo #
--echo # Bug #1002146: Unneeded filesort if usage of join buffer is not allowed