Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix time and date handling on upgraded MariaDB
In MariaDB 10.1.2 a new temporal format was introduced from MySQL 5.6 that alters how the `TIME`, `DATETIME` and `TIMESTAMP` columns operate at lower levels. These changes allow these temporal data types to have fractional parts and negative values. You can disable this feature using the `mysql56_temporal_format` system variable. Starting from MariaDB 10.5.1 columns with old temporal formats are marked with a `/* mariadb-5.3 */` comment in the output of `SHOW CREATE TABLE`, `SHOW COLUMNS`, `DESCRIBE` statements, as well as in the `COLUMN_TYPE` column of the `INFORMATION_SCHEMA.COLUMNS` Table. Since the python bindings use the `DESCRIBE` statement to identify the type of an MySQL entry, the comment must be stripped off. This happens on old MariaDB databases upgraded automatically during system upgrade, e.g.: Debian 10 -> 11. Ref: https://mariadb.com/kb/en/datetime/ Fixes #384 (cherry picked from commit 645ad05)
- Loading branch information