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:
@ -685,9 +685,15 @@ create table t1 (a int, b varchar(20));
|
||||
create table t2 (a int, c varchar(20));
|
||||
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
|
||||
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
|
||||
#Enable after fix MDEV-31276
|
||||
--disable_ps2_protocol
|
||||
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
|
||||
--enable_ps2_protocol
|
||||
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
|
||||
#Enable after fix MDEV-31276
|
||||
--disable_ps2_protocol
|
||||
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
|
||||
--enable_ps2_protocol
|
||||
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
|
||||
drop table t1, t2;
|
||||
set group_concat_max_len=default;
|
||||
@ -873,7 +879,8 @@ DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug 28188: 'not exists' optimization for outer joins
|
||||
#
|
||||
|
||||
|
||||
--disable_ps2_protocol
|
||||
CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8));
|
||||
CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id));
|
||||
INSERT INTO t1 VALUES
|
||||
@ -889,7 +896,7 @@ SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
|
||||
show status like 'Handler_read%';
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--enable_ps2_protocol
|
||||
#
|
||||
# Bug 28571: outer join with false on condition over constant tables
|
||||
#
|
||||
@ -1369,6 +1376,7 @@ drop table t1,t2,t3,t4;
|
||||
--echo # Bug#57024: Poor performance when conjunctive condition over the outer
|
||||
--echo # table is used in the on condition of an outer join
|
||||
--echo #
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
create table t1 (a int);
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
@ -1411,6 +1419,7 @@ show status like "handler_read%";
|
||||
|
||||
drop table t1,t2,t3;
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
|
||||
@ -2363,8 +2372,11 @@ create view v1 as select * from t1
|
||||
left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T
|
||||
on T.ElectionID = t1.Election
|
||||
limit 9;
|
||||
#enable after fix MDEV-31277
|
||||
--disable_ps2_protocol
|
||||
# limit X causes merge algorithm select as opposed to temp table
|
||||
select * from v1;
|
||||
--enable_ps2_protocol
|
||||
drop table t1, t2;
|
||||
drop view v1;
|
||||
|
||||
@ -2379,7 +2391,10 @@ create view v10 as select *, 'U' as u from t10 left join (select 'Y' as y, t20.b
|
||||
create table t30 (c int);
|
||||
insert into t30 values (1),(3);
|
||||
create view v20 as select * from t30 left join (select 'X' as x, v10.u, v10.y, v10.b from v10) dt2 on t30.c=dt2.b limit 6;
|
||||
#check after fix MDEV-31277
|
||||
--disable_ps2_protocol
|
||||
select * from v20 limit 9;
|
||||
--enable_ps2_protocol
|
||||
drop view v10, v20;
|
||||
drop table t10, t20, t30;
|
||||
|
||||
@ -2392,7 +2407,9 @@ create table t3 (c int);
|
||||
insert into t3 values (3),(1);
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1),(2),(7),(1);
|
||||
|
||||
|
||||
#check after fix MDEV-31277
|
||||
--disable_ps2_protocol
|
||||
select * from
|
||||
(
|
||||
select * from
|
||||
@ -2405,6 +2422,7 @@ select * from
|
||||
on dt1.a=dt2.b
|
||||
limit 9
|
||||
) dt;
|
||||
--enable_ps2_protocol
|
||||
|
||||
## Same as dt3 above
|
||||
create view v3(x,c) as select * from (select 'X' as x, t3.c from t3) dt3;
|
||||
@ -2418,7 +2436,10 @@ create view v0(y,b,x,c) as select * from v2 left join v3 on v2.b=v3.c;
|
||||
# Same as above select statement
|
||||
create view v1 as select 'Z' as z, t1.a, v0.* from t1 left join v0 on t1.a=v0.b limit 9;
|
||||
|
||||
#check after fix MDEV-31277
|
||||
--disable_ps2_protocol
|
||||
select * from v1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
set statement join_cache_level=0 for
|
||||
select * from v1;
|
||||
|
Reference in New Issue
Block a user