mirror of https://github.com/django/django.git
Fixed DatabaseFeatures.supports_select_(intersection/difference) on MariaDB and MySQL 8.0.31+.
This commit is contained in:
parent
c0fc1b5302
commit
6d41f5e5ed
|
@ -20,8 +20,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
atomic_transactions = False
|
||||
can_clone_databases = True
|
||||
supports_temporal_subtraction = True
|
||||
supports_select_intersection = False
|
||||
supports_select_difference = False
|
||||
supports_slicing_ordering_in_compound = True
|
||||
supports_index_on_text_field = False
|
||||
supports_update_conflicts = True
|
||||
|
@ -322,6 +320,15 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
and self.connection.mysql_version >= (8, 0, 13)
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def supports_select_intersection(self):
|
||||
is_mariadb = self.connection.mysql_is_mariadb
|
||||
return is_mariadb or self.connection.mysql_version >= (8, 0, 31)
|
||||
|
||||
supports_select_difference = property(
|
||||
operator.attrgetter("supports_select_intersection")
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def can_rename_index(self):
|
||||
if self.connection.mysql_is_mariadb:
|
||||
|
|
Loading…
Reference in New Issue