Comment 4 for bug 1086490

Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

Hi Blake,

I have looked at the entries from the errorlog you have posted, and the relevant parts of code. InnoDB is crashing inside the call to the function "innobase_build_index_translation". In simple terms, this function builds a translation table that maps indexes defined on a table at the MySQL server level to the indexes defined at the InnoDB level. The function raises an assertion when the number of indexes defined at the MySQL server level does not match the actual number of indexes in the InnoDB table. The above function that builds the translation table is called from inside the function ha_innobase::open which is executed when a an InnoDB table is accessed by a user query or an administrative query. Note that when indexes are defined both MySQL server and the InnoDB storage engine track the indexes separately.

At the moment, I think the reason why there could be an inconsistency between the indexes reported by InnoDB and the indexes MySQL server thinks should be present, could be because of data corruption. I suggest running CHECK TABLE to check if there are any corrupt tables. Although I notice that you have a lot of tables so this could be quite cumbersome. You mentioned that you had general log turned on when the crash happened. The general log logs date and time with each query, so we can do is filter out the queries that were executed at the time of the crash (as reported in the errorlog). Then run CHECK TABLE on the tables those queries access.