Bug #51374 Incorrect error handling, can lead to mysqld dropping table wo/ dropping indexes
Submitted: 22 Feb 2010 8:30 Modified: 23 Feb 2010 9:55
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[22 Feb 2010 8:30] Jonas Oreland
Description:
the new ndb_restore feature "--disable-indexes"/"--rebuild-indexes" causes
schema version of indexes to change.

and when mysqld then tried to drop table, there was an error in the detection
of this causing it to drop the table, leaving stray indexes in db.

this can later cause problems for backup/restore.

How to repeat:
.

Suggested fix:
.
[22 Feb 2010 9:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/101021

3095 Jonas Oreland	2010-02-22
      ndb - bug#51374 - check for INCOMPATIBLE_VERSION as return code of dropIndex
[22 Feb 2010 9:36] Bugs System
Pushed into 5.1.41-ndb-7.0.13 (revid:jonas@mysql.com-20100222093039-ywrnkr014yzsq81q) (version source revid:jonas@mysql.com-20100222093039-ywrnkr014yzsq81q) (merge vers: 5.1.41-ndb-7.0.13) (pib:16)
[22 Feb 2010 9:37] Bugs System
Pushed into 5.1.41-ndb-6.3.32 (revid:jonas@mysql.com-20100222093222-x69anhm36izad3ag) (version source revid:jonas@mysql.com-20100222090337-buv9240a745qwdkb) (merge vers: 5.1.41-ndb-6.3.32) (pib:16)
[22 Feb 2010 9:40] Jonas Oreland
pushed to 6.3.32, 7.0.13 and 7.1.2
[23 Feb 2010 9:55] Jon Stephens
Documented bugfix in the 6.3.32, 7.0.13, and 7.1.2 changelogs, as follows:

        A side effect of the ndb_restore --disable-indexes and
        --rebuild-indexes options is to change the schema versions of
        indexes. When a mysqld later tried to drop a table that had been
        restored from backup using one or both of these options, the
        server failed to detect these changed indexes. This caused the
        table to be dropped, but the indexes to be left behind, leading
        to problems with subsequent backup and restore operations.

Closed.