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.
--
Ticket URL: <https://code.djangoproject.com/ticket/26868>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* 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>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"f8bfa806805a87d2cdd677089bd96fbf8400cb95" f8bfa806]:
{{{
#!CommitTicketReference repository=""
revision="f8bfa806805a87d2cdd677089bd96fbf8400cb95"
Fixed #26868 -- Changed MySQL version detection to use a query.
Workaround a bug with MariaDB and MySQL native client not stripping the
`5.5.5-` prefix.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26868#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a8b2445a78620859cf43f3e5c9387e85ab1d9387" a8b2445]:
{{{
#!CommitTicketReference repository=""
revision="a8b2445a78620859cf43f3e5c9387e85ab1d9387"
[1.10.x] Fixed #26868 -- Changed MySQL version detection to use a query.
Workaround a bug with MariaDB and MySQL native client not stripping the
`5.5.5-` prefix.
Backport of f8bfa806805a87d2cdd677089bd96fbf8400cb95 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26868#comment:3>