Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.4
-
None
-
None
Description
Started mariadb_10.0.4 with mysql_5.6.14 databaste. Server error log had lots of errors of course, so ran mysql_upgrade. Stopped and re-started server. Following messages still appear:
2013-10-18 12:16:37 919fab40 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL (flags mismatch).
|
2013-10-18 12:16:37 919fab40 InnoDB: Error: Fetch of persistent statistics requested for table "mysql"."gtid_slave_pos" 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.
|
131018 12:16:37 [Note] /usr/libexec/mysqld: ready for connections.
|
Version: '10.0.4-MariaDB' socket: '/var/run/mysql/mysql.sock' port: 0 MariaDB Server
|
2013-10-18 12:17:58 911fab40 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL (flags mismatch).
|
2013-10-18 12:17:58 911fab40 InnoDB: Error: Fetch of persistent statistics requested for table "CD_collection"."Album" 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.
|
Attachments
- mysql_50614.tar.gz
- 363 kB
- mariadb_100004.tar.gz
- 359 kB
Issue Links
- duplicates
-
MDEV-6349 innodb_table_stats/innodb_index_stats broken after upgrade from 5.6
-
- Closed
-
- relates to
-
MDEV-30809 mysql_upgrade is not upgrading the type of last_update column for innodb_index_stats and innodb_table_stats tables
-
- Stalled
-
-
MDEV-5010 InnoDB errors appearing in logs with upgrade from 10.0.0 to 10.0.4
-
- Closed
-
Activity
Does this bug also affect 10.1.7? (note, however, the 1136 error after the other errors)
root@ubu1:/usr/local/mysql# ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql
|
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
|
2015-10-04 14:30:34 140696390404032 [Note] /usr/local/mysql/bin/mysqld (mysqld 10.1.7-MariaDB-log) starting as process 3431 ...
|
2015-10-04 14:30:34 140696390404032 [Note] CONNECT: Version 1.03.0007 July 05, 2015
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Using mutexes to ref count buffer pool pages
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: The InnoDB memory heap is disabled
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Memory barrier is not used
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Compressed tables use zlib 1.2.3
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Using Linux native AIO
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Using CPU crc32 instructions
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Initializing buffer pool, size = 256.0M
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Completed initialization of buffer pool
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Highest supported file format is Barracuda.
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: 128 rollback segment(s) are active.
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Waiting for purge to start
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.25-73.1 started; log sequence number 36477166193
|
2015-10-04 14:30:34 140695473981184 [Note] InnoDB: Dumping buffer pool(s) not yet started
|
2015-10-04 14:30:34 7ff66e5d5700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
|
2015-10-04 14:30:34 7ff66e5d5700 InnoDB: Error: Fetch of persistent statistics requested for table "mysql"."gtid_slave_pos" 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.
|
ERROR: 1136 Column count doesn't match value count at row 1
|
2015-10-04 14:30:34 140696390404032 [ERROR] Aborting
|
|
2015-10-04 14:30:34 140695457195776 [Note] InnoDB: FTS optimize thread exiting.
|
2015-10-04 14:30:34 140696390404032 [Note] InnoDB: Starting shutdown...
|
2015-10-04 14:30:37 140696390404032 [Note] InnoDB: Shutdown completed; log sequence number 36477166203
|
2015-10-04 14:30:37 140696390404032 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
|
I can confirm it is fixed at mysqld 10.0.21-MariaDB
I am offered a link to 10.1.8 (not 7) - will try that next
10.1.8 fails to build on my 32-bit Slackware 14.1 system. Undefined references to __atomic_fetch_add_8 and __atomic_load_8.
These entry points are available in /usr/lib/libatomic.so.1.0.0
Will report as a new bug if I can't fix it easily tomorrow or soon after
Experienced this on a MySQL 5.7.38 to mariadb 10.6.11 migration. Looking at the prtype of innodb_index_stats and innodb_table_stats it seems the prtype differs in MySQL vs MariaDB. mysqlupgrade should prob rebuild these tables to avoid issues.
MySQL 5.7.38 pre upgrade:
mysql> SELECT a.name AS `Table`, b.TABLE_ID,b.NAME,b.POS,b.MTYPE,b.PRTYPE,b.LEN from innodb_sys_tables a, innodb_sys_columns b where a.name like 'mysql/innodb_table_stats' and a.table_id=b.table_id order by b.table_id,b.pos; |
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
| Table | TABLE_ID | NAME | POS | MTYPE | PRTYPE | LEN | |
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
.
|
.
|
| mysql/innodb_table_stats | 27 | last_update | 2 | 3 | 525575 | 4 |
|
.
|
.
|
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
6 rows in set (0.00 sec) |
|
mysql> SELECT a.name AS `Table`, b.TABLE_ID,b.NAME,b.POS,b.MTYPE,b.PRTYPE,b.LEN from innodb_sys_tables a, innodb_sys_columns b where a.name like 'mysql/innodb_index_stats' and a.table_id=b.table_id order by b.table_id,b.pos; |
+--------------------------+----------+------------------+-----+-------+---------+------+ |
| Table | TABLE_ID | NAME | POS | MTYPE | PRTYPE | LEN | |
+--------------------------+----------+------------------+-----+-------+---------+------+ |
.
|
.
|
| mysql/innodb_index_stats | 28 | last_update | 3 | 3 | 525575 | 4 |
|
.
|
.
|
+--------------------------+----------+------------------+-----+-------+---------+------+ |
8 rows in set (0.00 sec) |
Mariadb post running mysql upgrade, prtype is incorrect leading to the following errs:
2023-02-27 20:32:52 11 [ERROR] InnoDB: Fetch of persistent statistics requested for table `db`.`table` 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-02-27 20:32:52 11 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
|
MariaDB [information_schema]> SELECT a.name AS `Table`, b.TABLE_ID,b.NAME,b.POS,b.MTYPE,b.PRTYPE,b.LEN from innodb_sys_tables a, innodb_sys_columns b where a.name like 'mysql/innodb_table_stats' and a.table_id=b.table_id order by b.table_id,b.pos; |
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
| Table | TABLE_ID | NAME | POS | MTYPE | PRTYPE | LEN | |
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
.
|
.
|
| mysql/innodb_table_stats | 27 | last_update | 2 | 3 | 525575 | 4 |
|
.
|
.
|
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
6 rows in set (0.001 sec) |
|
MariaDB [information_schema]> SELECT a.name AS `Table`, b.TABLE_ID,b.NAME,b.POS,b.MTYPE,b.PRTYPE,b.LEN from innodb_sys_tables a, innodb_sys_columns b where a.name like 'mysql/innodb_index_stats' and a.table_id=b.table_id order by b.table_id,b.pos; |
+--------------------------+----------+------------------+-----+-------+---------+------+ |
| Table | TABLE_ID | NAME | POS | MTYPE | PRTYPE | LEN | |
+--------------------------+----------+------------------+-----+-------+---------+------+ |
.
|
.
|
| mysql/innodb_index_stats | 28 | last_update | 3 | 3 | 525575 | 4 |
|
.
|
.
|
+--------------------------+----------+------------------+-----+-------+---------+------+ |
8 rows in set (0.000 sec) |
Running optimize to rebuild table corrects this, note change in prtype post optimize:
MariaDB [information_schema]> optimize table mysql.innodb_table_stats; |
+--------------------------+----------+----------+-------------------------------------------------------------------+ |
| Table | Op | Msg_type | Msg_text | |
+--------------------------+----------+----------+-------------------------------------------------------------------+ |
| mysql.innodb_table_stats | optimize | note | Table does not support optimize, doing recreate + analyze instead | |
| mysql.innodb_table_stats | optimize | status | OK |
|
+--------------------------+----------+----------+-------------------------------------------------------------------+ |
2 rows in set (0.051 sec) |
|
MariaDB [information_schema]> optimize table mysql.innodb_index_stats; |
+--------------------------+----------+----------+-------------------------------------------------------------------+ |
| Table | Op | Msg_type | Msg_text | |
+--------------------------+----------+----------+-------------------------------------------------------------------+ |
| mysql.innodb_index_stats | optimize | note | Table does not support optimize, doing recreate + analyze instead | |
| mysql.innodb_index_stats | optimize | status | OK |
|
+--------------------------+----------+----------+-------------------------------------------------------------------+ |
2 rows in set (0.018 sec) |
|
MariaDB [information_schema]> SELECT a.name AS `Table`, b.TABLE_ID,b.NAME,b.POS,b.MTYPE,b.PRTYPE,b.LEN from innodb_sys_tables a, innodb_sys_columns b where a.name like 'mysql/innodb_table_stats' and a.table_id=b.table_id order by b.table_id,b.pos; |
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
| Table | TABLE_ID | NAME | POS | MTYPE | PRTYPE | LEN | |
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
.
|
.
|
| mysql/innodb_table_stats | 100 | last_update | 2 | 3 | 526087 | 4 | <-- Note change in prtype |
.
|
.
|
+--------------------------+----------+--------------------------+-----+-------+---------+-----+ |
6 rows in set (0.000 sec) |
|
MariaDB [information_schema]> SELECT a.name AS `Table`, b.TABLE_ID,b.NAME,b.POS,b.MTYPE,b.PRTYPE,b.LEN from innodb_sys_tables a, innodb_sys_columns b where a.name like 'mysql/innodb_index_stats' and a.table_id=b.table_id order by b.table_id,b.pos; |
+--------------------------+----------+------------------+-----+-------+---------+------+ |
| Table | TABLE_ID | NAME | POS | MTYPE | PRTYPE | LEN | |
+--------------------------+----------+------------------+-----+-------+---------+------+ |
.
|
.
|
| mysql/innodb_index_stats | 101 | last_update | 3 | 3 | 526087 | 4 | <-- Note change in prtype |
.
|
.
|
.
|
+--------------------------+----------+------------------+-----+-------+---------+------+ |
8 rows in set (0.000 sec) |
This is not really fixed up on due usage on CPanel/WHM server running Maria DB 10.0.15
22:27:45 server root@5997911 ~]cPs# tail /var/lib/mysql/server.brandyou.in.err
2015-01-20 22:27:25 7fdb46fb6700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT NOT NULL (type mismatch).
2015-01-20 22:27:25 7fdb46fb6700 InnoDB: Error: Fetch of persistent statistics requested for table "photoz_wp84"."wp_wfVulnScanners" 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.
2015-01-20 22:27:25 7fdb46fb6700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT NOT NULL (type mismatch).
2015-01-20 22:27:25 7fdb46fb6700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT NOT NULL (type mismatch).
2015-01-20 22:27:25 7fdb46fb6700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT NOT NULL (type mismatch).
2015-01-20 22:27:25 7fdb46fb6700 InnoDB: Error: Fetch of persistent statistics requested for table "photoz_wp84"."wp_wfLockedOut" 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.
2015-01-20 22:27:25 7fdb4cbff700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT NOT NULL (type mismatch).
2015-01-20 22:27:25 7fdb4cbff700 InnoDB: Error: Fetch of persistent statistics requested for table "photoz_wp84"."wp_wfLeechers" 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.
2015-01-20 22:27:25 7fdb4cbff700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is BINARY(4) NOT NULL but should be INT NOT NULL (type mismatch).
2015-01-20 22:27:25 7fdb4cbff700 InnoDB: Error: Fetch of persistent statistics requested for table "photoz_wp84"."wp_wfHits" 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.