如何修复有问题的MySQL InnoDB表?

时间:2017-01-06 23:19:51

标签: mysql innodb mysqlcheck

我们公司正在使用SailPoint IIQ作为其IAM解决方案。

尝试运行时: delete IdentityRequest *

我收到sailpoint.tools.GeneralException: null index column for collection: sailpoint.object.IdentityRequest.items

的错误

执行select * from spt_identity_request_item where id is null;不会返回任何结果。

我伸手去抓稻草,并试图修理桌子,以防造成这个问题。他们用于db的表类型是innodb。

repair table spt_identity_request_item;会产生The storage engine for the table doesn't support repair

的音符

我也尝试过这个命令:

sudo mysqlcheck --repair --databases identityiq -u identityiq -p

当它运行时,它给出了一堆笔记:

note : The storage engine for the table doesn't support repair

这个命令实际上是在修复问题吗?如果没有,有没有办法修复这个以及如何?

1 个答案:

答案 0 :(得分:1)

看起来上面是使用ORM进行删除操作,并且不是在sql中犯错,而是在应用程序级错误:

sailpoint.tools.GeneralException: 
    null index column for collection: sailpoint.object.IdentityRequest.items

换句话说,它甚至可能在它进入SQL级别之前失败,因此执行repair table将没有任何后果。也许您需要在sailpoint.object.IdentityRequest.items中指定如何处理M2M表的删除。例如,我的猜测是它不知道是否对FK关系中引用的对象进行NULL化或删除。