#102175MySQL dissalows using same table in a sub-query for an delete-query
Description
With #102171 a sub-query has been used to define
the records to delete. However, two things has
been missed:
- To create placeholders in the sub-query, the
correct outer QueryBuilder instance needs to
be used.
- MySQL don’t allow using the same table from
the delete query in a sub-query, at least not
directly.
The subquery should be moved to the proper place
and a additional subquery used to enforce the
result materliazation into a temporary table.