Refs #23576 -- Disabled MySQL multi-alias deletion path on MariaDB 10.3.2+.

This commit is contained in:
Simon Charette 2019-10-31 03:14:30 -04:00 committed by Mariusz Felisiak
parent 632d7bbd3d
commit 377c7cb2f7
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class SQLInsertCompiler(compiler.SQLInsertCompiler, SQLCompiler):
class SQLDeleteCompiler(compiler.SQLDeleteCompiler, SQLCompiler):
def as_sql(self):
if self.single_alias:
if self.connection.features.update_can_self_select or self.single_alias:
return super().as_sql()
# MySQL and MariaDB < 10.3.2 doesn't support deletion with a subquery
# which is what the default implementation of SQLDeleteCompiler uses