[mythtv-commits] [MythTV/mythtv] 645ad0: Fix time and date handling on upgraded MariaDB

rcrdnalor noreply at github.com
Sun Nov 21 20:24:13 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 645ad05a3ecccb7ceee3cce4897bd6b6aae6d94c
      https://github.com/MythTV/mythtv/commit/645ad05a3ecccb7ceee3cce4897bd6b6aae6d94c
  Author: Roland Ernst <rcrernst at 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




More information about the mythtv-commits mailing list