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

@ -2066,7 +2066,9 @@ set @tmp=@@optimizer_switch;
set @@optimizer_switch='derived_merge=OFF';
create table t1(f1 char(1));
create view v1 as select * from t1;
--disable_ps2_protocol
select * from (select f1 as f2, f1 as f3 from v1) v where v.f2='a';
--enable_ps2_protocol
--disable_ps_protocol
show status like "Created_tmp%";
--enable_ps_protocol
@ -4148,6 +4150,7 @@ drop table t1,t2,t3,t4,t5,t6;
--echo # Bug #59696 Optimizer does not use equalities for conditions over view
--echo #
--disable_ps2_protocol
CREATE TABLE t1 (a int NOT NULL);
INSERT INTO t1 VALUES
(9), (2), (8), (1), (3), (4), (2), (5),
@ -4173,6 +4176,7 @@ SHOW STATUS LIKE 'Handler_read_%';
DROP VIEW v;
DROP TABLE t1, t2;
--enable_ps2_protocol
--echo #
--echo # Bug#702403: crash with multiple equalities and a view
@ -4595,10 +4599,14 @@ CREATE PROCEDURE p1() SELECT COUNT(*), GET_LOCK('blocker', 100) FROM v1;
--disable_result_log
CALL p1();
--enable_result_log
--disable_ps2_protocol
SELECT RELEASE_LOCK('blocker');
--enable_ps2_protocol
connection con3;
--disable_ps2_protocol
SELECT GET_LOCK('blocker', 100);
--enable_ps2_protocol
connection default;
--echo # Try to CALL p1() again, this time it should block on "blocker".
@ -4621,14 +4629,18 @@ let $wait_condition=
WHERE state = "Waiting for table metadata lock" AND info = "DROP VIEW v1";
--source include/wait_condition.inc
--echo # Now allow CALL p1() to complete
--disable_ps2_protocol
SELECT RELEASE_LOCK('blocker');
--enable_ps2_protocol
connection default;
--echo # Reaping: CALL p1()
--disable_result_log
--reap
--enable_result_log
--disable_ps2_protocol
SELECT RELEASE_LOCK('blocker');
--enable_ps2_protocol
connection con2;
--echo # Reaping: DROP VIEW v1
@ -6491,6 +6503,8 @@ DROP TABLE t1, t2;
--echo # MDEV-23291: SUM column from a derived table returns invalid values
--echo #
#Enable ps2 protocol after fix MDEV-31175
--disable_ps2_protocol
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (1,1), (2,2);
@ -6502,6 +6516,7 @@ SELECT sum(z) FROM v1;
DROP TABLE t1;
DROP VIEW v1;
--enable_ps2_protocol
--echo #
--echo # MDEV-26299: Some views force server (and mysqldump) to generate