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

@ -2184,6 +2184,7 @@ drop table t2;
#
# Bug #11745: SELECT ... FROM DUAL with WHERE condition
#
--disable_ps2_protocol
--disable_view_protocol
CREATE TABLE t1 (a int, b int, c int);
INSERT INTO t1
@ -2203,8 +2204,9 @@ select count(*) from t1 limit 2,3;
select found_rows();
select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
select found_rows();
--enable_view_protocol
DROP TABLE t1;
--enable_view_protocol
--enable_ps2_protocol
#
# Bug 7672 Unknown column error in order clause
@ -3731,6 +3733,7 @@ DROP TABLE t1;
#
# Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
#
--disable_ps2_protocol
--disable_view_protocol
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, c INT, KEY(a));
@ -3746,6 +3749,8 @@ SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3;
SHOW STATUS LIKE 'Handler_read%';
DROP TABLE t1, t2;
--enable_view_protocol
--enable_ps2_protocol
#
# Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error
#
@ -4104,7 +4109,9 @@ END;|
delimiter ;|
SET @cnt := 0;
--disable_ps2_protocol
SELECT * FROM t1 WHERE a = f1();
--enable_ps2_protocol
SELECT @cnt;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = f1();
DROP TABLE t1, t2;