Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mysql-test/main/cte_update_delete.result
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ with cte as (select * from t1) delete from t1,cte where t1.a=cte.a;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where t1.a=cte.a' at line 1
with cte as (select * from t1) delete from t1 using t1,cte where t1.a=cte.a;
#
# MDEV-38272 Recursive CTE usage leaks memory when not used in a top level select
# MDEV-38295 Recursive CTE usage leaks memory when not used in a top level select
#
with recursive cte as (select a from t1 union select a from cte)
update t1, cte set t1.o = 1;
Expand All @@ -1374,5 +1374,6 @@ a
15
20
25
drop view v1;
drop table t1;
# End of 12.2 tests
3 changes: 2 additions & 1 deletion mysql-test/main/cte_update_delete.test
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ with cte as (select * from t1) delete from t1,cte where t1.a=cte.a;
with cte as (select * from t1) delete from t1 using t1,cte where t1.a=cte.a;

--echo #
--echo # MDEV-38272 Recursive CTE usage leaks memory when not used in a top level select
--echo # MDEV-38295 Recursive CTE usage leaks memory when not used in a top level select
--echo #

--error ER_BAD_FIELD_ERROR
Expand Down Expand Up @@ -593,6 +593,7 @@ with recursive cte as (select a from t1 union select a from cte where a < 2)
delete from v1 using v1, cte where v1.a = cte.a;
select * from t1 order by 1;

drop view v1;
drop table t1;

--echo # End of 12.2 tests