Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6.11, 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
-
None
Description
After upgrade from Mysql 5.7 to MariaDB 10.3 then to 10.6, I'm now seeing the following error in the logs periodically:
"InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL"
The last_update column appears to be correctly defined (TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP).
Running mysql_upgrade does not resolve the issue,
2023-01-27 10:16:23 8756 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
2023-01-27 10:16:23 8756 [ERROR] InnoDB: Fetch of persistent statistics requested for table `cl`.`#sql-alter-6a27-2234` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
2023-01-27 10:16:23 8756 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
2023-01-27 10:16:23 8756 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
2023-01-27 10:16:23 8756 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Attachments
Issue Links
- relates to
-
MDEV-6349 innodb_table_stats/innodb_index_stats broken after upgrade from 5.6
-
- Closed
-
-
MDEV-29128 Possible table (mysql.innodb_table_stats) structure mismatch in internals
-
- Open
-
-
MDEV-30809 mysql_upgrade is not upgrading the type of last_update column for innodb_index_stats and innodb_table_stats tables
-
- Stalled
-
Activity
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Component/s | Upgrades [ 15807 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Affects Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.5 [ 23123 ] | |
Affects Version/s | 10.6 [ 24028 ] | |
Affects Version/s | 10.7 [ 24805 ] | |
Affects Version/s | 10.8 [ 26121 ] | |
Affects Version/s | 10.9 [ 26905 ] | |
Affects Version/s | 10.10 [ 27530 ] | |
Affects Version/s | 10.11 [ 27614 ] | |
Assignee | Marko Mäkelä [ marko ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Fix Version/s | 10.7 [ 24805 ] |
Link | This issue relates to MDEV-30809 [ MDEV-30809 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Alexander Barkov [ bar ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Assignee | Alexander Barkov [ bar ] | Marko Mäkelä [ marko ] |
Fix Version/s | 10.8 [ 26121 ] |
Assignee | Marko Mäkelä [ marko ] | Alexander Barkov [ bar ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Alexander Barkov [ bar ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Alexander Barkov [ bar ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 11.1.1 [ 28704 ] | |
Fix Version/s | 11.0.2 [ 28706 ] | |
Fix Version/s | 10.6.14 [ 28914 ] | |
Fix Version/s | 10.9.7 [ 28916 ] | |
Fix Version/s | 10.10.5 [ 28917 ] | |
Fix Version/s | 10.11.4 [ 28918 ] | |
Fix Version/s | 10.8.8 [ 28518 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Fix Version/s | 10.8.8 [ 28518 ] |
Fix Version/s | 10.6.15 [ 29013 ] | |
Fix Version/s | 10.9.8 [ 29015 ] | |
Fix Version/s | 10.10.6 [ 29017 ] | |
Fix Version/s | 10.11.5 [ 29019 ] | |
Fix Version/s | 11.0.3 [ 28920 ] | |
Fix Version/s | 11.1.2 [ 28921 ] | |
Fix Version/s | 11.1.1 [ 28704 ] | |
Fix Version/s | 11.0.2 [ 28706 ] | |
Fix Version/s | 10.6.14 [ 28914 ] | |
Fix Version/s | 10.9.7 [ 28916 ] | |
Fix Version/s | 10.10.5 [ 28917 ] | |
Fix Version/s | 10.11.4 [ 28918 ] |
Link | This issue relates to MDEV-29128 [ MDEV-29128 ] |
Thanks for the report.
First of all, the InnoDB message is really misleading, because in fact the column is TIMESTAMP, both in MySQL and MariaDB. Probably a different internal format of timestamp.
I cannot reproduce it if in the described scenario I run mysql_upgrade on 10.3 before further upgrading to 10.6; but otherwise, starting from 10.4, it is easily reproducible.
I suppose the reason is that while mysql_upgrade actually runs an unconditional ALTER on the table
even if the columns are already of the same type, in 10.3 it works via table-copy and thus upgrades it, while in 10.4+ it remains essentially a no-op.
If so, then
should help as a workaround, to get rid of the error messages. Possibly server restart will also be needed.