Bug #34356 Using TRUNCATE on ndb_binlog_index when using RESET MASTER
Submitted: 6 Feb 2008 17:35 Modified: 2 Jul 2008 19:03
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Tomas Ulin CPU Architecture:Any

[6 Feb 2008 17: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 19: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.