[Django] #29548: Add official support for MariaDB

27 views
Skip to first unread message

Django

unread,
Jul 6, 2018, 10:52:13 AM7/6/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim | Owner: nobody
Graham |
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The MySQL backend mostly works with MariaDB but there are a few test
failures, mainly regarding feature detection based on version number.

[https://groups.google.com/d/topic/django-
developers/31j1dNOZ7zc/discussion django-developers discussion] and
[https://github.com/django/django/pull/10135 WIP PR].

--
Ticket URL: <https://code.djangoproject.com/ticket/29548>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 6, 2018, 1:17:32 PM7/6/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

This [https://github.com/django/django/pull/10141 PR] addresses the GIS
part.

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:1>

Django

unread,
Jul 6, 2018, 4:10:33 PM7/6/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* cc: felixxm (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:2>

Django

unread,
Jul 8, 2018, 5:42:57 AM7/8/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Forbes):

* cc: Tom Forbes (added)


Comment:

I've fixed all the failing non-gis tests here:
https://github.com/django/django/pull/10135

I've been thinking about how to best support version checking both MySQL
and MariaDB. You always have to check the MariaDB and MySQL versions
carefully as they are numerically comparable but not logically.
`connection.mysql_version > (8, 0, 0)` is True for all MariaDB versions,
even if the feature you're testing is not compatible. We could add a
`mariadb_version` property that returns an object that always compares to
False if the database is not Mariadb, and vice versa for `mysql_version`?

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:3>

Django

unread,
Jul 9, 2018, 3:11:55 PM7/9/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"45c035c823bfbd642dc1490f1c555316af403c4c" 45c035c8]:
{{{
#!CommitTicketReference repository=""
revision="45c035c823bfbd642dc1490f1c555316af403c4c"
Refs #29548 -- Fixed non-GIS test failures on MariaDB.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:4>

Django

unread,
Jul 9, 2018, 4:30:30 PM7/9/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

I installed MariaDB 10.3 and found the attached test failures for window
expressions.

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:5>

Django

unread,
Jul 9, 2018, 4:30:41 PM7/9/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* Attachment "window-expression-failures.txt" added.

Django

unread,
Jul 13, 2018, 4:44:43 PM7/13/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"c28bf990d71a8befb954482e3d6a925e89f3176f" c28bf990]:
{{{
#!CommitTicketReference repository=""
revision="c28bf990d71a8befb954482e3d6a925e89f3176f"
Refs #29548 -- Fixed GIS tests on MariaDB
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:6>

Django

unread,
Jul 25, 2018, 7:53:00 PM7/25/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tom Forbes):

PR for window function failures:
https://github.com/django/django/pull/10228

I've not had much experience with window expressions, but after doing some
exploration it seems MariaDB has a few annoying quirks. Firstly the
results of a query that uses window functions are not implicitly ordered,
so the ordering has to be repeated. All examples in the MariaDB KB show
this: https://mariadb.com/kb/en/library/window-functions-overview/. For
these tests I just added a conditional `.order()` call if it's MariaDB.

Secondly 'RANGE' frames have a limitation that's not present in other
databases (https://jira.mariadb.org/browse/MDEV-11747). For this I just
adapted the test to work around this limitation.

And lastly `LEAD` and `LAG` have no `default` parameter
(https://jira.mariadb.org/browse/MDEV-12981). I just skipped these tests.

The PR needs more work done before it's ready, but if I don't have time I
thought I would share what I've got so far for anyone else to pick up.
Tests pass locally with MariaDB 10.3.

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:7>

Django

unread,
Jul 30, 2018, 8:13:34 PM7/30/18
to django-...@googlegroups.com
#29548: Add official support for MariaDB
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"4198445afcba94eb7a25b50c96ec6c2694ed2192" 4198445]:
{{{
#!CommitTicketReference repository=""
revision="4198445afcba94eb7a25b50c96ec6c2694ed2192"
Refs #29548 -- Fixed failing window tests on MariaDB 10.3.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:8>

Django

unread,
May 14, 2019, 12:44:47 AM5/14/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* owner: nobody => felixxm
* status: new => assigned


Comment:

IMO we are almost ready to close this ticket. MariaDB is now officially
supported, we should document that and add release notes.

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:9>

Django

unread,
May 22, 2019, 7:59:45 AM5/22/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* has_patch: 0 => 1


Comment:

[https://code.djangoproject.com/ticket/29548 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:10>

Django

unread,
May 22, 2019, 2:36:42 PM5/22/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

@felixxm your PR link is self-referencing the ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:11>

Django

unread,
May 22, 2019, 2:39:11 PM5/22/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by felixxm):

Good point thanks, fixed.

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:12>

Django

unread,
May 27, 2019, 2:00:31 PM5/27/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"b6c4766f53cf00bcf63cc2aa8be977c8589d083e" b6c4766]:
{{{
#!CommitTicketReference repository=""
revision="b6c4766f53cf00bcf63cc2aa8be977c8589d083e"
Refs #29548 -- Updated docs for MariaDB support.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:13>

Django

unread,
May 27, 2019, 2:00:58 PM5/27/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: assigned => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:14>

Django

unread,
Jun 13, 2019, 4:27:00 AM6/13/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"fc2536fe66c519b306f673672b795d16f87ed57d" fc2536f]:
{{{
#!CommitTicketReference repository=""
revision="fc2536fe66c519b306f673672b795d16f87ed57d"
Refs #29548 -- Doc'd MariaDB support for GIS database functions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:15>

Django

unread,
Jul 23, 2019, 7:34:42 AM7/23/19
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"8d52a525c806ab162efb236e3e93785be9585184" 8d52a525]:
{{{
#!CommitTicketReference repository=""
revision="8d52a525c806ab162efb236e3e93785be9585184"
Refs #29548 -- Fixed DatabaseWrapper.display_name on MariaDB.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:16>

Django

unread,
Mar 19, 2020, 4:42:23 AM3/19/20
to django-...@googlegroups.com
#29548: Add official support for MariaDB.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: felixxm
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"6e026aec5fe24ebded360fbc40cff51ccb1f3901" 6e026ae]:
{{{
#!CommitTicketReference repository=""
revision="6e026aec5fe24ebded360fbc40cff51ccb1f3901"
Refs #29548 -- Mentioned MariaDB in database system checks.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29548#comment:17>

Reply all
Reply to author
Forward
0 new messages