Opened 8 years ago
Last modified 8 years ago
#26868 closed Bug
Microsecond precision in MariaDB / Version detection — at Initial Version
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
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.