Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26868 closed Bug (fixed)

Change MySQL version detection to accomodate MariaDB

Reported by: Marc-Aurèle Brothier Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

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 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.

Change History (3)

comment:1 by Tim Graham, 8 years ago

Description: modified (diff)
Has patch: set
Summary: Microsecond precision in MariaDB / Version detectionChange MySQL version detection to accomodate MariaDB
Triage Stage: UnreviewedAccepted

I'm not a MariaDB/MySQL expert, but tentatively accepting.

comment:2 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In f8bfa806:

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.

comment:3 by Tim Graham <timograham@…>, 8 years ago

In a8b2445:

[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

Note: See TracTickets for help on using tickets.
Back to Top