Bug #34356 Using TRUNCATE on ndb_binlog_index when using RESET MASTER
Submitted: 6 Feb 2008 18:35 Modified: 2 Jul 2008 21:03
Reporter: Geert Vanderkelen
Status: Closed
Category:Server: ClusterRep Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Tomas Ulin Target Version:
Triage: D5 (Feature request)

[6 Feb 2008 18:35] Geert Vanderkelen
Description:
Currently when doing RESET MASTER the mysql.ndb_binlog_index gets cleaned using DELETE
statement. When this table is big, resetting master might take a while, and it will also
leaving the table fragmented. This will also prevent the table left corrupted (for
whatever reason).

How to repeat:
.

Suggested fix:
Use TRUNCATE instead of DELETE statement when doing RESET MASTER.
[2 Jul 2008 21:03] Jon Stephens
Documented as follows in the NDB 6.2.14 and 6.3.11 changelogs:

        RESET MASTER now uses TRUNCATE rather than DELETE to clear the
        mysql.ndb_binlog_index table. This improves the performance of the 
        statement and is less likely to leave the table in a fragmented state.