mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Fixed DatabaseFeatures.update_can_self_select on MariaDB 10.3.2+.
This commit is contained in:
parent
e83c300a33
commit
e645f27907
@ -6,7 +6,6 @@ from django.utils.functional import cached_property
|
|||||||
|
|
||||||
class DatabaseFeatures(BaseDatabaseFeatures):
|
class DatabaseFeatures(BaseDatabaseFeatures):
|
||||||
empty_fetchmany_value = ()
|
empty_fetchmany_value = ()
|
||||||
update_can_self_select = False
|
|
||||||
allows_group_by_pk = True
|
allows_group_by_pk = True
|
||||||
related_fields_match_type = True
|
related_fields_match_type = True
|
||||||
# MySQL doesn't support sliced subqueries with IN/ALL/ANY/SOME.
|
# MySQL doesn't support sliced subqueries with IN/ALL/ANY/SOME.
|
||||||
@ -62,6 +61,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
return result[0]
|
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
|
@cached_property
|
||||||
def can_introspect_foreign_keys(self):
|
def can_introspect_foreign_keys(self):
|
||||||
"Confirm support for introspected foreign keys"
|
"Confirm support for introspected foreign keys"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user