Skip to content

Commit c3c9f19

Browse files
Skyiesacfelixxm
authored andcommitted
Fixed #36812 -- Dropped support for MariaDB < 10.11.
1 parent 68d110f commit c3c9f19

7 files changed

Lines changed: 19 additions & 22 deletions

File tree

django/db/backends/mysql/features.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
6464
@cached_property
6565
def minimum_database_version(self):
6666
if self.connection.mysql_is_mariadb:
67-
return (10, 6)
67+
return (10, 11)
6868
else:
6969
return (8, 4)
7070

@@ -207,8 +207,6 @@ def can_introspect_json_field(self):
207207
def supports_index_column_ordering(self):
208208
if self._mysql_storage_engine != "InnoDB":
209209
return False
210-
if self.connection.mysql_is_mariadb:
211-
return self.connection.mysql_version >= (10, 8)
212210
return True
213211

214212
@cached_property
@@ -220,8 +218,7 @@ def supports_expression_indexes(self):
220218

221219
@cached_property
222220
def has_native_uuid_field(self):
223-
is_mariadb = self.connection.mysql_is_mariadb
224-
return is_mariadb and self.connection.mysql_version >= (10, 7)
221+
return self.connection.mysql_is_mariadb
225222

226223
@cached_property
227224
def allows_group_by_selected_pks(self):

docs/ref/databases.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ non-durable <https://www.postgresql.org/docs/current/non-durability.html>`_.
421421
MariaDB notes
422422
=============
423423

424-
Django supports MariaDB 10.6 and higher.
424+
Django supports MariaDB 10.11 and higher.
425425

426426
To use MariaDB, use the MySQL backend, which is shared between the two. See the
427427
:ref:`MySQL notes <mysql-notes>` for more details.

docs/ref/models/fields.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,8 +1649,8 @@ Like all :class:`CharField` subclasses, :class:`URLField` takes the optional
16491649
.. class:: UUIDField(**options)
16501650

16511651
A field for storing universally unique identifiers. Uses Python's
1652-
:class:`~python:uuid.UUID` class. When used on PostgreSQL and MariaDB 10.7+,
1653-
this stores in a ``uuid`` datatype, otherwise in a ``char(32)``.
1652+
:class:`~python:uuid.UUID` class. When used on PostgreSQL and MariaDB, this
1653+
stores in a ``uuid`` datatype, otherwise in a ``char(32)``.
16541654

16551655
Universally unique identifiers are a good alternative to :class:`AutoField` for
16561656
: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`::
16671667
Note that a callable (with the parentheses omitted) is passed to ``default``,
16681668
not an instance of ``UUID``.
16691669

1670-
.. admonition:: Lookups on PostgreSQL and MariaDB 10.7+
1670+
.. admonition:: Lookups on PostgreSQL and MariaDB
16711671

16721672
Using :lookup:`iexact`, :lookup:`contains`, :lookup:`icontains`,
16731673
:lookup:`startswith`, :lookup:`istartswith`, :lookup:`endswith`, or
16741674
:lookup:`iendswith` lookups on PostgreSQL don't work for values without
1675-
hyphens, because PostgreSQL and MariaDB 10.7+ store them in a hyphenated
1676-
uuid datatype type.
1675+
hyphens, because PostgreSQL and MariaDB store them in a hyphenated uuid
1676+
datatype type.
16771677

16781678
.. _relationship-fields:
16791679

docs/ref/models/indexes.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ field's name.
8181
For example ``Index(fields=['headline', '-pub_date'])`` would create SQL with
8282
``(headline, pub_date DESC)``.
8383

84-
.. admonition:: MariaDB
85-
86-
Index ordering isn't supported on MariaDB < 10.8. In that case, a
87-
descending index is created as a normal index.
88-
8984
``name``
9085
--------
9186

docs/ref/models/querysets.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,10 +1988,9 @@ them:
19881988
<QuerySet [<Person: ...>, ...]>
19891989

19901990
The ``postgresql``, ``oracle``, and ``mysql`` database backends support
1991-
``select_for_update()``. However, MariaDB only supports the ``nowait``
1992-
argument, MariaDB 10.6+ also supports the ``skip_locked`` argument, and MySQL
1993-
supports the ``nowait``, ``skip_locked``, and ``of`` arguments. The ``no_key``
1994-
argument is only supported on PostgreSQL.
1991+
``select_for_update()``. However, MariaDB only supports the ``nowait`` and
1992+
``skip_locked`` arguments, and MySQL supports the ``nowait``, ``skip_locked``,
1993+
and ``of`` arguments. The ``no_key`` argument is only supported on PostgreSQL.
19951994

19961995
Passing ``nowait=True``, ``skip_locked=True``, ``no_key=True``, or ``of`` to
19971996
``select_for_update()`` using database backends that do not support these

docs/releases/6.1.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ Dropped support for MySQL < 8.4
403403
Upstream support for MySQL 8.0 ends in April 2026, and MySQL 8.1-8.3 are
404404
short-term innovation releases. Django 6.1 supports MySQL 8.4 and higher.
405405

406+
Dropped support for MariaDB < 10.11
407+
-----------------------------------
408+
409+
Upstream support for MariaDB 10.6 ends in July 2026, and MariaDB 10.7-10.10 are
410+
short-term maintenance releases. Django 6.1 supports MariaDB 10.11 and higher.
411+
406412
Miscellaneous
407413
-------------
408414

tests/backends/mysql/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class Tests(TestCase):
106106
@mock.patch.object(connection, "get_database_version")
107107
def test_check_database_version_supported(self, mocked_get_database_version):
108108
if connection.mysql_is_mariadb:
109-
mocked_get_database_version.return_value = (10, 5)
110-
msg = "MariaDB 10.6 or later is required (found 10.5)."
109+
mocked_get_database_version.return_value = (10, 10)
110+
msg = "MariaDB 10.11 or later is required (found 10.10)."
111111
else:
112112
mocked_get_database_version.return_value = (8, 0, 31)
113113
msg = "MySQL 8.4 or later is required (found 8.0.31)."

0 commit comments

Comments
 (0)