1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING

when resolving WHERE and ON clauses, do not look in
SELECT list/aliases.
This commit is contained in:
Sergei Golubchik
2022-04-29 14:50:47 +02:00
parent 8c34eab968
commit 0beed9b5e9
5 changed files with 26 additions and 6 deletions

View File

@ -658,6 +658,14 @@ execute stmt;
drop table t1,t2;
--echo #
--echo # MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING
--echo #
create table t1 (a text(60) not null) engine=innodb;
insert into t1 values ('1'),('0');
select distinct a from t1 where '' in (select 'x' like a having a like a);
drop table t1;
--echo #
--echo # End of 10.4 tests
--echo #