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

@ -722,6 +722,7 @@ begin
insert into test.t1 values (concat(x, "2"), y+2);
end|
--disable_ps2_protocol
# Check that file does not exists
--error 1
--file_exists $MYSQLTEST_VARDIR/tmp/spout
@ -729,6 +730,7 @@ call into_outfile("ofile", 1)|
--remove_file $MYSQLTEST_VARDIR/tmp/spout
delete from t1|
drop procedure into_outfile|
--enable_ps2_protocol
--disable_warnings
drop procedure if exists into_dumpfile|
@ -1148,6 +1150,7 @@ begin
insert into t1 values ("a", 1), ("b", 2), ("c", 3);
end|
--disable_ps2_protocol
call rc()|
select row_count()|
--disable_ps_protocol
@ -1161,7 +1164,7 @@ select row_count()|
select * from t1|
select row_count()|
drop procedure rc|
--enable_ps2_protocol
#
# Let us test how well new locking scheme works.
@ -1661,6 +1664,7 @@ begin
end if;
return x;
end|
--disable_ps2_protocol
select * from t1 where data = getcount("bar")|
select * from t3|
select getcount("zip")|
@ -1669,6 +1673,7 @@ select * from t3|
select getcount(id) from t1 where data = 3|
select getcount(id) from t1 where data = 5|
select * from t3|
--enable_ps2_protocol
drop table t3|
drop function getcount|
@ -3161,6 +3166,7 @@ begin
insert into t3 values (1);
end|
--disable_ps2_protocol
call bug4905()|
select row_count()|
call bug4905()|
@ -3168,6 +3174,7 @@ select row_count()|
call bug4905()|
select row_count()|
select * from t3|
--enable_ps2_protocol
drop procedure bug4905|
drop table t3|
@ -3765,8 +3772,10 @@ if (`select @@have_query_cache='YES'`) {
--enable_query_log
set @x = 1|
insert into t1 values ("qc", 42)|
--disable_ps2_protocol
select bug9902() from t1|
select bug9902() from t1|
--enable_ps2_protocol
select @x|
--echo # Restore the old query cache size
@ -6234,7 +6243,9 @@ CREATE FUNCTION bug19862(x INT) RETURNS INT
RETURN x+1;
END|
INSERT INTO t12 VALUES (1), (2)|
--disable_ps2_protocol
SELECT bug19862(a) FROM t12 ORDER BY 1|
--enable_ps2_protocol
SELECT * FROM t11|
DROP TABLE t11, t12|
DROP FUNCTION bug19862|
@ -6799,7 +6810,9 @@ END|
CREATE FUNCTION bug23760_rc_test(in_var INT) RETURNS INT RETURN in_var|
INSERT INTO bug23760 (num) VALUES (0), (1), (1), (2), (3), (5), (8)|
--disable_ps2_protocol
SELECT ROW_COUNT()|
--enable_ps2_protocol
CALL bug23760_test_row_count()|
SELECT * FROM bug23760_log ORDER BY id|
@ -6809,14 +6822,18 @@ SELECT @save_max_sp_recursion|
SET max_sp_recursion_depth= 5|
SELECT @@max_sp_recursion_depth|
CALL bug23760_test_row_count2(2)|
--disable_ps2_protocol
SELECT ROW_COUNT()|
--enable_ps2_protocol
SELECT * FROM bug23760_log ORDER BY id|
SELECT * FROM bug23760 ORDER by ID|
SET max_sp_recursion_depth= @save_max_sp_recursion|
SELECT bug23760_rc_test(123)|
INSERT INTO bug23760 (num) VALUES (13), (21), (34), (55)|
--disable_ps2_protocol
SELECT bug23760_rc_test(ROW_COUNT())|
--enable_ps2_protocol
DROP TABLE bug23760, bug23760_log|
DROP PROCEDURE bug23760_update_log|