summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/mysql/compiler.py')
-rw-r--r--django/db/backends/mysql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/mysql/compiler.py b/django/db/backends/mysql/compiler.py
index 96232aff51..3682d6da05 100644
--- a/django/db/backends/mysql/compiler.py
+++ b/django/db/backends/mysql/compiler.py
@@ -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