mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.11 into 11.0
This commit is contained in:
@ -583,3 +583,44 @@ DELETE v2 FROM v2;
|
||||
|
||||
DROP VIEW v2, v1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30586: DELETE with WHERE containing nested subquery
|
||||
--echo # with set function aggregated in outer subquery
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
insert into t1 values (3), (7), (1);
|
||||
|
||||
create table t2 (b int);
|
||||
insert into t2 values (2), (1), (4), (7);
|
||||
|
||||
create table t3 (a int, b int);
|
||||
insert into t3 values (2,10), (7,30), (2,30), (1,10), (7,40);
|
||||
|
||||
let $c=
|
||||
t1.a in (select t3.a from t3 group by t3.a
|
||||
having t3.a > any (select t2.b from t2
|
||||
where t2.b*10 < sum(t3.b)));
|
||||
|
||||
eval
|
||||
select * from t1
|
||||
where $c;
|
||||
|
||||
eval
|
||||
delete from t1
|
||||
where $c;
|
||||
|
||||
eval
|
||||
select * from t1
|
||||
where $c;
|
||||
|
||||
eval
|
||||
update t1 set t1.a=t1.a+10
|
||||
where $c;
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
||||
--echo End of 10.4 tests
|
||||
|
Reference in New Issue
Block a user