mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-28965 Assertion failure when preparing UPDATE with derived table in WHERE
This patch fixes not only the assertion failure in the function Field_iterator_table_ref::set_field_iterator() but also: - fixes the problem of forced materialization of derived tables used in subqueries contained in WHERE clauses of single-table and multi-table UPDATE and DELETE statements - fixes the problem of MDEV-17954 that prevented execution of multi-table DELETE statements if they use in their WHERE clauses references to the tables that are updated. The patch must be considered a complement to the patch for MDEV-28883. Approved by Oleksandr Byelkin <sanja@mariadb.com>
This commit is contained in:
@ -386,7 +386,6 @@ insert into t12 values (33, 10),(22, 11),(2, 12);
|
||||
insert into t2 values (1, 21),(2, 12),(3, 23);
|
||||
select * from t11;
|
||||
select * from t12;
|
||||
-- error ER_UPDATE_TABLE_USED
|
||||
delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a);
|
||||
-- error ER_SUBQUERY_NO_1_ROW
|
||||
delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2);
|
||||
|
Reference in New Issue
Block a user