Bug #94303 util.checkForServerUpgrade reports missing tables in I_S.TABLES table
Description:
Reports missing tables for table names with a hyphen or dash in them.
---
13) Schema inconsistencies resulting from file removal or corruption
Error: Following tables show signs that either table datadir directory or frm
file was removed/corrupted. Please check server logs, examine datadir to
detect the issue and fix it before upgrade
test.t1@002d3 - present in INFORMATION_SCHEMA's INNODB_SYS_TABLES table but
missing from TABLES table
---
Compare tables in I_S.innodb_sys_tables and I_S.tables:
mysql> select * from information_schema.innodb_sys_tables where name like 'test/%';
+----------+--------------------+------+--------+-------+-------------+------------+---------------+------------+
| TABLE_ID | NAME | FLAG | N_COLS | SPACE | FILE_FORMAT | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE |
+----------+--------------------+------+--------+-------+-------------+------------+---------------+------------+
| 42 | test/proxysqltest | 33 | 4 | 26 | Barracuda | Dynamic | 0 | Single |
| 43 | test/queryruletest | 33 | 4 | 27 | Barracuda | Dynamic | 0 | Single |
| 44 | test/t1@002d3 | 33 | 4 | 30 | Barracuda | Dynamic | 0 | Single |
+----------+--------------------+------+--------+-------+-------------+------------+---------------+------------+
mysql> select table_schema,table_name,engine,row_format,update_time from information_schema.tables where table_schema like 'test';
+--------------+-----------------+--------+------------+---------------------+
| table_schema | table_name | engine | row_format | update_time |
+--------------+-----------------+--------+------------+---------------------+
| test | myisamtabletest | MyISAM | Fixed | 2019-01-15 03:41:51 |
| test | proxysqltest | InnoDB | Dynamic | NULL |
| test | queryruletest | InnoDB | Dynamic | NULL |
| test | t1-3 | InnoDB | Dynamic | NULL |
+--------------+-----------------+--------+------------+---------------------+
How to repeat:
1. Create test.t1-3 table on latest version 5.7
create table `test`.`t1-3` (id int primary key) engine=innodb;
2. run util.checkForServerUpgrade
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Reports missing tables for table names with a hyphen or dash in them. --- 13) Schema inconsistencies resulting from file removal or corruption Error: Following tables show signs that either table datadir directory or frm file was removed/corrupted. Please check server logs, examine datadir to detect the issue and fix it before upgrade test.t1@002d3 - present in INFORMATION_SCHEMA's INNODB_SYS_TABLES table but missing from TABLES table --- Compare tables in I_S.innodb_sys_tables and I_S.tables: mysql> select * from information_schema.innodb_sys_tables where name like 'test/%'; +----------+--------------------+------+--------+-------+-------------+------------+---------------+------------+ | TABLE_ID | NAME | FLAG | N_COLS | SPACE | FILE_FORMAT | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE | +----------+--------------------+------+--------+-------+-------------+------------+---------------+------------+ | 42 | test/proxysqltest | 33 | 4 | 26 | Barracuda | Dynamic | 0 | Single | | 43 | test/queryruletest | 33 | 4 | 27 | Barracuda | Dynamic | 0 | Single | | 44 | test/t1@002d3 | 33 | 4 | 30 | Barracuda | Dynamic | 0 | Single | +----------+--------------------+------+--------+-------+-------------+------------+---------------+------------+ mysql> select table_schema,table_name,engine,row_format,update_time from information_schema.tables where table_schema like 'test'; +--------------+-----------------+--------+------------+---------------------+ | table_schema | table_name | engine | row_format | update_time | +--------------+-----------------+--------+------------+---------------------+ | test | myisamtabletest | MyISAM | Fixed | 2019-01-15 03:41:51 | | test | proxysqltest | InnoDB | Dynamic | NULL | | test | queryruletest | InnoDB | Dynamic | NULL | | test | t1-3 | InnoDB | Dynamic | NULL | +--------------+-----------------+--------+------------+---------------------+ How to repeat: 1. Create test.t1-3 table on latest version 5.7 create table `test`.`t1-3` (id int primary key) engine=innodb; 2. run util.checkForServerUpgrade