简体   繁体   English

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

[英]How to Repair MySQL InnoDB Table That Has Issues?

Our company is using SailPoint IIQ for its IAM solution. 我们公司将SailPoint IIQ用于其IAM解决方案。

When trying to run: delete IdentityRequest * 尝试运行时: delete IdentityRequest *

I get an error of sailpoint.tools.GeneralException: null index column for collection: sailpoint.object.IdentityRequest.items 我收到了sailpoint.tools.GeneralException: null index column for collection: sailpoint.object.IdentityRequest.items错误sailpoint.tools.GeneralException: null index column for collection: sailpoint.object.IdentityRequest.items

Doing a select * from spt_identity_request_item where id is null; select * from spt_identity_request_item where id is null;进行select * from spt_identity_request_item where id is null; returns no results. 没有返回结果。

I'm reaching for straws and have attempted to repair the table, in case that is what is causing the issue. 我正在拿起吸管,并试图修理桌子,以防引起问题。 The table types they use for their db is innodb. 他们用于数据库的表类型是innodb。

repair table spt_identity_request_item; yields a note of The storage engine for the table doesn't support repair 产生一个注释, The storage engine for the table doesn't support repair

I've also tried the command: 我也尝试过以下命令:

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

While it runs, it gives a bunch of notes of: 在运行时,它给出了许多注释:

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

Is this command actually doing something to repair the issues? 这个命令实际上是在做些事情来解决问题吗? If not, is there a way to repair this and how? 如果没有,有没有办法解决这个问题以及如何解决?

It looks like the above is using an ORM to do a delete operation, and is erring not in sql, but on the application-level: 看起来上面是使用ORM进行删除操作,并且不是在sql中而是在应用程序级别上出错:

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

In other words, it's probably failing before it even gets to the SQL level and so doing a repair table would have no consequence. 换句话说,它甚至可能在到达SQL级别之前就失败了,因此进行repair table不会有任何后果。 Perhaps you need to specify how to handle the deletions of the M2M table in sailpoint.object.IdentityRequest.items . 也许您需要在sailpoint.object.IdentityRequest.items指定如何处理M2M表的sailpoint.object.IdentityRequest.items For example, my guess is that it doesn't know whether to NULLify or DELETE the objects that are being referenced in the FK relations. 例如,我的猜测是,它不知道是否要对FK关系中引用的对象进行NULL化或DELETE处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM