summaryrefslogtreecommitdiff
path: root/mysql-test/main/having.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-04-29 14:50:47 +0200
committerSergei Golubchik <serg@mariadb.org>2022-04-29 17:05:19 +0200
commit0beed9b5e933f0ff79b3bb346524f7a451d14e38 (patch)
treedc3839b657c7f9113ef315a04096480af52a4ae8 /mysql-test/main/having.test
parent8c34eab9688b4face54f15f89f5d62bdfd93b8a7 (diff)
downloadmariadb-git-0beed9b5e933f0ff79b3bb346524f7a451d14e38.tar.gz
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.
Diffstat (limited to 'mysql-test/main/having.test')
-rw-r--r--mysql-test/main/having.test3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysql-test/main/having.test b/mysql-test/main/having.test
index b3b128684a3..3f4e8a8e710 100644
--- a/mysql-test/main/having.test
+++ b/mysql-test/main/having.test
@@ -249,7 +249,8 @@ where t1.col2 in
group by t2.col1, t2.col2 having t1.col1 <= 10);
# the having column is resolved in the SELECT clause of the outer query -
-# error in ANSI, works with MySQL extension
+# error in ANSI
+--error ER_BAD_FIELD_ERROR
select t1.col1 as tmp_col from t1
where t1.col2 in
(select t2.col2 from t2