1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #31770 -- Allowed select_for_update(of) on MySQL 8.0.1+.

This commit is contained in:
Simon Charette
2020-07-12 00:25:03 -04:00
committed by Mariusz Felisiak
parent f36862b69c
commit ca6c5e5fc2
4 changed files with 13 additions and 4 deletions

View File

@@ -117,6 +117,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
return self.connection.mysql_version >= (10, 3, 0)
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)