#26868: Change MySQL version detection to accomodate MariaDB
-------------------------------------+-------------------------------------
Reporter: marcaurele | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.9
(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 timgraham):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Old description:
> I found an edge case when you connect to mariadb server using the mysql
> client library, for example running a MySQL server on a local computer,
> which will install the client library but using a MariaDB in a docker
> container.
>
> The server string returned by the server is
> {{{5.5.5-10.0.25-MariaDB-1~jessie}}} and therefore the features list is
> incorrect, especially for the microsecond precision on the DATETIME. If
> you're using the mariadb client library you will get
> {{{10.0.25-MariaDB-1~jessie}}} and the features list is correct.
>
> https://mariadb.atlassian.net/browse/MDEV-4575
>
> My patch (PR) changes how the version is detected, and use a SQL query
> instead of the client library call. Then we get the correct MariaDB
> version and the features list is correct.
New description:
I found an edge case when you connect to mariadb server using the mysql
client library, for example running a MySQL server on a local computer,
which will install the client library but using a MariaDB in a docker
container.
The server string returned by the server is
{{{5.5.5-10.0.25-MariaDB-1~jessie}}} and therefore the features list is
incorrect, especially for the microsecond precision on the DATETIME. If
you're using the mariadb client library you will get
{{{10.0.25-MariaDB-1~jessie}}} and the features list is correct.
https://mariadb.atlassian.net/browse/MDEV-4575
My [https://github.com/django/django/pull/6893 PR] changes how the version
is detected, and use a SQL query instead of the client library call. Then
we get the correct MariaDB version and the features list is correct.
--
Comment:
I'm not a MariaDB/MySQL expert, but tentatively accepting.
--
Ticket URL: <https://code.djangoproject.com/ticket/26868#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.99fcecdfa3311be9149d15d4643bd815%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.