summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/features.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2020-07-12 00:25:03 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-13 10:15:43 +0200
commitca6c5e5fc23f2855a7094d195f09975b21a7ec3f (patch)
tree3236fe184e33463bb6c74cd4f5ac1f81cc631933 /django/db/backends/mysql/features.py
parentf36862b69c3325da8ba6892a6057bbd9470efd70 (diff)
downloaddjango-ca6c5e5fc23f2855a7094d195f09975b21a7ec3f.tar.gz
Fixed #31770 -- Allowed select_for_update(of) on MySQL 8.0.1+.
Diffstat (limited to 'django/db/backends/mysql/features.py')
-rw-r--r--django/db/backends/mysql/features.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py
index 06a111a75b..d4651516fe 100644
--- a/django/db/backends/mysql/features.py
+++ b/django/db/backends/mysql/features.py
@@ -118,6 +118,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
return self.connection.mysql_version >= (8, 0, 1)
@cached_property
+ def has_select_for_update_of(self):
+ return not self.connection.mysql_is_mariadb and self.connection.mysql_version >= (8, 0, 1)
+
+ @cached_property
def supports_explain_analyze(self):
return self.connection.mysql_is_mariadb or self.connection.mysql_version >= (8, 0, 18)