diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-07-08 06:51:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 06:51:10 +0200 |
commit | 77b88fe621bb7828535a4c4cf37d9d4ac01b146b (patch) | |
tree | 6e6f6db794e0ef0707a28426be5d54e5a76ca339 /django/db/backends/mysql/features.py | |
parent | 5013798fe9a87b693ddb5589a8a408a04a873781 (diff) | |
download | django-77b88fe621bb7828535a4c4cf37d9d4ac01b146b.tar.gz |
Fixed #32908 -- Allowed select_for_update(skip_locked) on MariaDB 10.6+.
Diffstat (limited to 'django/db/backends/mysql/features.py')
-rw-r--r-- | django/db/backends/mysql/features.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py index f33ed0086b..6e628e80d1 100644 --- a/django/db/backends/mysql/features.py +++ b/django/db/backends/mysql/features.py @@ -185,7 +185,9 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def has_select_for_update_skip_locked(self): - return not self.connection.mysql_is_mariadb and self.connection.mysql_version >= (8, 0, 1) + if self.connection.mysql_is_mariadb: + return self.connection.mysql_version >= (10, 6) + return self.connection.mysql_version >= (8, 0, 1) @cached_property def has_select_for_update_nowait(self): |