diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-10-24 12:18:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-24 12:18:13 +0200 |
| commit | e645f27907da0098ee08455d9f1acec14b285f98 (patch) | |
| tree | a5c276dc5133bcab9a715fdd6ad9553a9f7886e1 | |
| parent | e83c300a3312995d46315616f4361dfa110c741b (diff) | |
Fixed DatabaseFeatures.update_can_self_select on MariaDB 10.3.2+.
| -rw-r--r-- | django/db/backends/mysql/features.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py index 7c4f6612b0..7a8f974d29 100644 --- a/django/db/backends/mysql/features.py +++ b/django/db/backends/mysql/features.py @@ -6,7 +6,6 @@ from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () - update_can_self_select = False allows_group_by_pk = True related_fields_match_type = True # MySQL doesn't support sliced subqueries with IN/ALL/ANY/SOME. @@ -63,6 +62,10 @@ class DatabaseFeatures(BaseDatabaseFeatures): return result[0] @cached_property + def update_can_self_select(self): + return self.connection.mysql_is_mariadb and self.connection.mysql_version >= (10, 3, 2) + + @cached_property def can_introspect_foreign_keys(self): "Confirm support for introspected foreign keys" return self._mysql_storage_engine != 'MyISAM' |
