[3.0.x] Fixed DatabaseFeatures.has_select_for_update_nowait on MariaDB 10.3+.

Thanks Kola Erinoso for the report.
Backport of a20ea33ca6 from master
This commit is contained in:
Mariusz Felisiak 2019-11-05 10:18:47 +01:00
parent 2000ed5180
commit 2cf5df1204
1 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,11 @@ class DatabaseFeatures(BaseDatabaseFeatures):
def has_select_for_update_skip_locked(self):
return not self.connection.mysql_is_mariadb and self.connection.mysql_version >= (8, 0, 1)
has_select_for_update_nowait = property(operator.attrgetter('has_select_for_update_skip_locked'))
@cached_property
def has_select_for_update_nowait(self):
if self.connection.mysql_is_mariadb:
return self.connection.mysql_version >= (10, 3, 0)
return self.connection.mysql_version >= (8, 0, 1)
@cached_property
def needs_explain_extended(self):