数据库是MariaDB的旧版本,相当于MySQL 5.5。表中包含这些列。
id
auth
old_auth
device_id_fk这个错误正在显示。
Table contains 4 indexes inside InnoDB, which is different from the number of indexes 3 defined in MySQL
SHOW CREATE TABLE的结果
CREATE TABLE `wtb_device_auths` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`device_id_fk` int(11) NOT NULL,
`auth` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`old_auth` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `auth_index` (`auth`),
KEY `auth1_index` (`device_id_fk`),
KEY `auth2_index` (`old_auth`)
) ENGINE=InnoDB AUTO_INCREMENT=627642 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci怎么修呢?
发布于 2020-02-20 23:14:01
此错误与Innodb定义与frm文件定义之间的差异有关。
这可能是因为ALTER TABLE或类似的语句在某一时刻发生了崩溃。
为了恢复一致性,ALTER TABLE wtb_device_auths FORCE将重新创建表(同时只锁定表)。这种娱乐活动应该使innodb和frm的定义保持一致。
https://dba.stackexchange.com/questions/260121
复制相似问题