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

@ -667,5 +667,17 @@ execute stmt;
a b
drop table t1,t2;
#
# MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING
#
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);
a
1
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
drop table t1;
#
# End of 10.4 tests
#