Failed to read auto-increment value from storage engine 诡异的mysql自增无效问题

今天遇到的,

ALTER TABLE `gsmc` CHANGE `id` `id` BIGINT(19) NOT NULL AUTO_INCREMENT COMMENT "id备注" ;

执行此语法后

插入记录提示Failed to read auto-increment value from storage engine

因为很多表对此表有外键引用,想把自增删掉重建,无法操作,查了很多资料

最后执行 ALTER TABLE  gsmc ORDER BY  `id` ;

后就可以再正常插入记录了

你可能感兴趣的:(Failed to read auto-increment value from storage engine 诡异的mysql自增无效问题)