Mailing List Archive

[MythTV/mythtv] 645ad0: Fix time and date handling on upgraded MariaDB
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 645ad05a3ecccb7ceee3cce4897bd6b6aae6d94c
https://github.com/MythTV/mythtv/commit/645ad05a3ecccb7ceee3cce4897bd6b6aae6d94c
Author: Roland Ernst <rcrernst@gmail.com>
Date: 2021-11-21 (Sun, 21 Nov 2021)

Changed paths:
M mythtv/bindings/python/MythTV/database.py

Log Message:
-----------
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


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits