diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py index 4f61e2bdf9..eb9601bcef 100644 --- a/django/db/backends/mysql/features.py +++ b/django/db/backends/mysql/features.py @@ -64,7 +64,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def minimum_database_version(self): if self.connection.mysql_is_mariadb: - return (10, 6) + return (10, 11) else: return (8, 4) @@ -207,8 +207,6 @@ class DatabaseFeatures(BaseDatabaseFeatures): def supports_index_column_ordering(self): if self._mysql_storage_engine != "InnoDB": return False - if self.connection.mysql_is_mariadb: - return self.connection.mysql_version >= (10, 8) return True @cached_property @@ -220,8 +218,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def has_native_uuid_field(self): - is_mariadb = self.connection.mysql_is_mariadb - return is_mariadb and self.connection.mysql_version >= (10, 7) + return self.connection.mysql_is_mariadb @cached_property def allows_group_by_selected_pks(self): diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index e708e73937..a4309541c9 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -421,7 +421,7 @@ non-durable `_. MariaDB notes ============= -Django supports MariaDB 10.6 and higher. +Django supports MariaDB 10.11 and higher. To use MariaDB, use the MySQL backend, which is shared between the two. See the :ref:`MySQL notes ` for more details. diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 308c93d868..1cf521d621 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1649,8 +1649,8 @@ Like all :class:`CharField` subclasses, :class:`URLField` takes the optional .. class:: UUIDField(**options) A field for storing universally unique identifiers. Uses Python's -:class:`~python:uuid.UUID` class. When used on PostgreSQL and MariaDB 10.7+, -this stores in a ``uuid`` datatype, otherwise in a ``char(32)``. +:class:`~python:uuid.UUID` class. When used on PostgreSQL and MariaDB, this +stores in a ``uuid`` datatype, otherwise in a ``char(32)``. Universally unique identifiers are a good alternative to :class:`AutoField` for :attr:`~Field.primary_key`. The database will not generate the UUID for you, so @@ -1667,13 +1667,13 @@ it is recommended to use :attr:`~Field.default`:: Note that a callable (with the parentheses omitted) is passed to ``default``, not an instance of ``UUID``. -.. admonition:: Lookups on PostgreSQL and MariaDB 10.7+ +.. admonition:: Lookups on PostgreSQL and MariaDB Using :lookup:`iexact`, :lookup:`contains`, :lookup:`icontains`, :lookup:`startswith`, :lookup:`istartswith`, :lookup:`endswith`, or :lookup:`iendswith` lookups on PostgreSQL don't work for values without - hyphens, because PostgreSQL and MariaDB 10.7+ store them in a hyphenated - uuid datatype type. + hyphens, because PostgreSQL and MariaDB store them in a hyphenated uuid + datatype type. .. _relationship-fields: diff --git a/docs/ref/models/indexes.txt b/docs/ref/models/indexes.txt index c9de422ad3..62678b6ac8 100644 --- a/docs/ref/models/indexes.txt +++ b/docs/ref/models/indexes.txt @@ -81,11 +81,6 @@ field's name. For example ``Index(fields=['headline', '-pub_date'])`` would create SQL with ``(headline, pub_date DESC)``. -.. admonition:: MariaDB - - Index ordering isn't supported on MariaDB < 10.8. In that case, a - descending index is created as a normal index. - ``name`` -------- diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index fbe562c883..042b435b90 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1988,10 +1988,9 @@ them: , ...]> The ``postgresql``, ``oracle``, and ``mysql`` database backends support -``select_for_update()``. However, MariaDB only supports the ``nowait`` -argument, MariaDB 10.6+ also supports the ``skip_locked`` argument, and MySQL -supports the ``nowait``, ``skip_locked``, and ``of`` arguments. The ``no_key`` -argument is only supported on PostgreSQL. +``select_for_update()``. However, MariaDB only supports the ``nowait`` and +``skip_locked`` arguments, and MySQL supports the ``nowait``, ``skip_locked``, +and ``of`` arguments. The ``no_key`` argument is only supported on PostgreSQL. Passing ``nowait=True``, ``skip_locked=True``, ``no_key=True``, or ``of`` to ``select_for_update()`` using database backends that do not support these diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index fddbf6518a..a1f8672e8c 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -403,6 +403,12 @@ Dropped support for MySQL < 8.4 Upstream support for MySQL 8.0 ends in April 2026, and MySQL 8.1-8.3 are short-term innovation releases. Django 6.1 supports MySQL 8.4 and higher. +Dropped support for MariaDB < 10.11 +----------------------------------- + +Upstream support for MariaDB 10.6 ends in July 2026, and MariaDB 10.7-10.10 are +short-term maintenance releases. Django 6.1 supports MariaDB 10.11 and higher. + Miscellaneous ------------- diff --git a/tests/backends/mysql/tests.py b/tests/backends/mysql/tests.py index 15228d254f..237e7f9447 100644 --- a/tests/backends/mysql/tests.py +++ b/tests/backends/mysql/tests.py @@ -106,8 +106,8 @@ class Tests(TestCase): @mock.patch.object(connection, "get_database_version") def test_check_database_version_supported(self, mocked_get_database_version): if connection.mysql_is_mariadb: - mocked_get_database_version.return_value = (10, 5) - msg = "MariaDB 10.6 or later is required (found 10.5)." + mocked_get_database_version.return_value = (10, 10) + msg = "MariaDB 10.11 or later is required (found 10.10)." else: mocked_get_database_version.return_value = (8, 0, 31) msg = "MySQL 8.4 or later is required (found 8.0.31)."