summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/compiler.py
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2019-10-31 03:14:30 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-10-31 08:14:30 +0100
commit377c7cb2f7d82dd5823d028ac9502284c14b32d4 (patch)
tree906888b0e4a5b3680bdbdbca56609e166ee5ad30 /django/db/backends/mysql/compiler.py
parent632d7bbd3dff1614cf7936dae733278149930f5b (diff)
downloaddjango-377c7cb2f7d82dd5823d028ac9502284c14b32d4.tar.gz
Refs #23576 -- Disabled MySQL multi-alias deletion path on MariaDB 10.3.2+.
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