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:
@ -25,6 +25,7 @@ explain select @vv1:=i from t1 where i=@vv1;
|
||||
explain select * from t1 where i=@vv1;
|
||||
drop table t1,t2;
|
||||
|
||||
--disable_ps2_protocol
|
||||
# Check types of variables
|
||||
set @a=0,@b=0;
|
||||
select @a:=10, @b:=1, @a > @b, @a < @b;
|
||||
@ -74,6 +75,7 @@ set @a=0;
|
||||
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
|
||||
select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i;
|
||||
drop table t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
#
|
||||
# Bug #2244: User variables didn't copy collation and derivation
|
||||
@ -263,7 +265,7 @@ drop table t1;
|
||||
#
|
||||
# Bug#26020: User-Defined Variables are not consistent with columns data types
|
||||
#
|
||||
|
||||
--disable_ps2_protocol
|
||||
create table t1(b bigint);
|
||||
insert into t1 (b) values (10), (30), (10);
|
||||
set @var := 0;
|
||||
@ -281,6 +283,7 @@ insert into t1 values (2), (3), (3), (4);
|
||||
set @lastid=-1;
|
||||
select @lastid != id, @lastid, @lastid := id from t1;
|
||||
drop table t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
#
|
||||
# Bug#42009: SELECT into variable gives different results to direct SELECT
|
||||
@ -333,8 +336,10 @@ DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
--disable_ps2_protocol
|
||||
--echo # BUG#55615 : should not crash
|
||||
SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a;
|
||||
--enable_ps2_protocol
|
||||
--echo # BUG#55564 : should not crash
|
||||
SELECT IF(
|
||||
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
|
||||
|
Reference in New Issue
Block a user