1
0
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:
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

@ -54,6 +54,7 @@ drop table t1;
# Bug#16501: IS_USED_LOCK does not appear to work
#
--disable_ps2_protocol
CREATE TABLE t1 (conn CHAR(7), connection_id INT);
INSERT INTO t1 VALUES ('default', CONNECTION_ID());
@ -85,6 +86,7 @@ disconnect con1;
connection default;
DROP TABLE t1;
--enable_ps2_protocol
#
# Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
@ -148,15 +150,19 @@ select avg(a) from table_26093;
select benchmark(100, (select avg(a) from table_26093));
set @invoked := 0;
--disable_ps2_protocol
select benchmark(100, (select avg(func_26093_a(a)) from table_26093));
--enable_ps2_protocol
# Returns only 10, since intermediate results are cached.
select @invoked;
set @invoked := 0;
--disable_ps2_protocol
#enable after fix MDEV-27871
--disable_view_protocol
select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093));
--enable_view_protocol
--enable_ps2_protocol
# Returns 1000, due to rand() preventing caching.
select @invoked;
@ -631,6 +637,7 @@ DROP TABLE t1;
--echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
--echo #
--disable_ps2_protocol
--disable_service_connection
--echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired
@ -794,6 +801,7 @@ select is_free_lock(repeat('a', 193));
select release_lock(repeat('a', 193));
--enable_service_connection
--enable_ps2_protocol
--echo
--echo # --
@ -1224,8 +1232,10 @@ DROP TABLE t1;
--echo # MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item
--echo #
--disable_ps2_protocol
SELECT ( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2;
SELECT RELEASE_LOCK('foo');
--enable_ps2_protocol
--echo #
--echo # End of 10.2 tests