mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -2282,9 +2282,11 @@ delimiter ;//
|
||||
|
||||
SET @sav_slow_query_log= @@session.slow_query_log;
|
||||
|
||||
--disable_ps2_protocol
|
||||
# @@slow_query_log ON check
|
||||
SET @@session.slow_query_log= ON;
|
||||
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @ts_func;
|
||||
--enable_ps2_protocol
|
||||
|
||||
SELECT a FROM t_ts LIMIT 1 into @ts_func;
|
||||
SELECT a FROM t_trig LIMIT 1 into @ts_trig;
|
||||
@ -2296,9 +2298,11 @@ if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
|
||||
DELETE FROM t_ts;
|
||||
DELETE FROM t_trig;
|
||||
|
||||
--disable_ps2_protocol
|
||||
# @@slow_query_log OFF check
|
||||
SET @@session.slow_query_log= OFF;
|
||||
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @func_ts;
|
||||
--enable_ps2_protocol
|
||||
SELECT a FROM t_ts LIMIT 1 into @ts_func;
|
||||
SELECT a FROM t_trig LIMIT 1 into @ts_trig;
|
||||
if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
|
||||
@ -2350,9 +2354,11 @@ SELECT
|
||||
--echo # MDEV-14032 SEC_TO_TIME executes side effect two times
|
||||
--echo #
|
||||
|
||||
--disable_ps2_protocol
|
||||
SET @a=10000000;
|
||||
SELECT SEC_TO_TIME(@a:=@a+1);
|
||||
SELECT @a;
|
||||
--enable_ps2_protocol
|
||||
|
||||
CREATE TABLE t1 (a TEXT);
|
||||
DELIMITER $$;
|
||||
@ -2363,7 +2369,9 @@ BEGIN
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
--disable_ps2_protocol
|
||||
SELECT SEC_TO_TIME(f1());
|
||||
--enable_ps2_protocol
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
Reference in New Issue
Block a user