Length mismatch in the column name table_name on mysql/innodb_table_stats and mysql/innodb_index_sta

Hi guys,

I’m getting the following crash log when I hit ‘select * from mysql.innodb_index_stats’ query.

18:17:47 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
Please help us make Percona XtraDB Cluster better by reporting any
bugs at https://jira.percona.com/projects/PXC/issues

key_buffer_size=268435456
read_buffer_size=131072
max_used_connections=4
max_threads=10001
thread_count=5
connection_count=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 4249736 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.


Build ID: fc2952fe5bc92e641593f6b8afcda0855755472e
Server Version: 5.7.31-34-57-log Percona XtraDB Cluster (GPL), Release rel34, Revision d76a6e8, WSREP version 31.45, wsrep_31.45

Thread pointer: 0x7f4270000d40
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f42c9331e50 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0x555e71aaf31b]
/usr/sbin/mysqld(handle_fatal_signal+0x40e)[0x555e7133098e]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f4a32c668a0]
/usr/sbin/mysqld(_Z38row_mysql_store_col_in_innobase_formatP8dfield_tPhmPKhmmbS3_mP14row_prebuilt_t+0x121)[0x555e71c57251]
/usr/sbin/mysqld(_Z37row_sel_convert_mysql_key_to_innobaseP8dtuple_tPhmP12dict_index_tPKhmP5trx_t+0x185)[0x555e71c77a65]
/usr/sbin/mysqld(_ZN11ha_innobase10index_readEPhPKhj16ha_rkey_function+0x12e)[0x555e71b5ec9e]
/usr/sbin/mysqld(_ZN7handler10ha_rnd_posEPhS0_+0x285)[0x555e713b0595]
/usr/sbin/mysqld(+0xae5d8b)[0x555e717aed8b]
/usr/sbin/mysqld(_Z10sub_selectP4JOINP7QEP_TABb+0x127)[0x555e71828c67]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x3a0)[0x555e718213a0]
/usr/sbin/mysqld(_Z12handle_queryP3THDP3LEXP12Query_resultyy+0x23a)[0x555e7189ad2a]
/usr/sbin/mysqld(+0x62ae4b)[0x555e712f3e4b]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THDb+0x4dbe)[0x555e71856dee]
/usr/sbin/mysqld(_Z11mysql_parseP3THDP12Parser_stateb+0x4cd)[0x555e71859bcd]
/usr/sbin/mysqld(+0xb90cf3)[0x555e71859cf3]
/usr/sbin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x1ed4)[0x555e7185c424]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x2d9)[0x555e7185d959]
/usr/sbin/mysqld(handle_connection+0x3c8)[0x555e7192fe28]
/usr/sbin/mysqld(pfs_spawn_thread+0x154)[0x555e71ac9d84]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f4a32c5b6db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f4a32045a3f]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f4270008430): is an invalid pointer
Connection ID (thread ID): 10
Status: NOT_KILLED

Actually I want to summarize to what I did;
To avoid the following warning messages in the mysql error log We have run the mysql_upgrade command but these errors still getting.

2020-12-19T18:22:25.188500Z 1 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
2020-12-19T18:22:25.188553Z 1 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade

When I check these tables it seems the table_name column is in the right type.

mysql> show create table mysql.innodb_table_stats\G

*************************** 1. row ***************************

      Table: innodb_table_stats

Create Table: CREATE TABLE `innodb_table_stats` (

 `database_name` varchar(64) COLLATE utf8_bin NOT NULL,

 `table_name` varchar(199) COLLATE utf8_bin NOT NULL,

 `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

 `n_rows` bigint(20) unsigned NOT NULL,

 `clustered_index_size` bigint(20) unsigned NOT NULL,

 `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,

 PRIMARY KEY (`database_name`,`table_name`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0

1 row in set (0.00 sec)

mysql> show create table mysql.innodb_index_stats\G

*************************** 1. row ***************************

      Table: innodb_index_stats

Create Table: CREATE TABLE `innodb_index_stats` (

 `database_name` varchar(64) COLLATE utf8_bin NOT NULL,

 `table_name` varchar(199) COLLATE utf8_bin NOT NULL,

 `index_name` varchar(64) COLLATE utf8_bin NOT NULL,

 `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

 `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,

 `stat_value` bigint(20) unsigned NOT NULL,

 `sample_size` bigint(20) unsigned DEFAULT NULL,

 `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,

 PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0

1 row in set (0.00 sec)

I’m using PXC 5.7 and here is the details;

root@db01:/var/lib/mysql/mysql# dpkg --list | grep -i percona
hi  percona-release                        1.0-25.generic                                  all          Package to install Percona gpg key and APT repos
ii  percona-toolkit                        3.2.1-1.bionic                                  amd64        Advanced MySQL and system command-line tools
hi  percona-xtrabackup-24                  2.4.20-1.bionic                                 amd64        Open source backup tool for InnoDB and XtraDB
hi  percona-xtradb-cluster-57              5.7.31-31.45-3.bionic                           amd64        Percona XtraDB Cluster with Galera
hi  percona-xtradb-cluster-client-5.7      5.7.31-31.45-3.bionic                           amd64        Percona XtraDB Cluster database client binaries
hi  percona-xtradb-cluster-common-5.7      5.7.31-31.45-3.bionic                           amd64        Percona XtraDB Cluster database common files (e.g. /etc/mysql/my.cnf)
hi  percona-xtradb-cluster-server-5.7      5.7.31-31.45-3.bionic                           amd64        Percona XtraDB Cluster database server binaries

I’m attaching the mysql_upgrade output and also the conf files. I tried to run mysql_upgrade command 2-3 times but the warning message still getting and database always crashing when I select * to mysql.innodb_index_stats table.

Can anyone help me?

Regards

conf_file.txt

mysql_upgrade-output.txt

conf_file.txt (1.41 KB)

mysql_upgrade-output.txt (6.61 KB)

1 Like

I believe this is also you? https://jira.percona.com/browse/PXC-3524
The recommendation is to upgrade to 5.7.32

1 Like