我在AWS RDS上具有MySQL模式,其中有一个表,该表在show tables;
命令的输出中列出,但是使用desc <tableName>;
命令查看表结构时会引发错误。我已经查询了该表的所有引用的元数据,也找不到。
奇怪的是,我们已经设置了mysql变量lower_case_table_names=1
,但是这个特定的表是用表名中的大写名称创建的。除非可以在我不知道的会话上进行设置。
显示表的输出;
desc的输出/错误消息;
以下查询元数据中表名的命令将返回零结果。
select * from information_schema.COLUMNS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.COLUMN_PRIVILEGES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.FILES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.KEY_COLUMN_USAGE where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.KEY_COLUMN_USAGE where REFERENCED_TABLE_NAME like '%tempPartInfo%';
select * from information_schema.PARTITIONS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.REFERENTIAL_CONSTRAINTS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.REFERENTIAL_CONSTRAINTS where REFERENCED_TABLE_NAME like '%tempPartInfo%';
select * from information_schema.STATISTICS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.TABLES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.TABLE_CONSTRAINTS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.TABLE_PRIVILEGES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.VIEWS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.INNODB_CMP_PER_INDEX where table_name like '%tempPartInfo%';
select * from information_schema.INNODB_BUFFER_PAGE_LRU where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.INNODB_CMP_PER_INDEX_RESET where table_name like '%tempPartInfo%';
select * from information_schema.INNODB_BUFFER_PAGE where TABLE_NAME like '%tempPartInfo%';
目前,任何转储整个模式的尝试都在此表上失败。并且任何删除该表的尝试也会失败,并显示相同的错误消息SQL Error (1051): Unknown table 'v*******r.temppartinfo'
。
由于我在较早的备份中具有表结构,因此不确定该表在何时被损坏。
感谢您对删除此表的任何帮助。
我找到解决此问题的唯一方法是将除损坏的表以外的整个架构导出到新架构中。