Bug #49868 RESET SLAVE should not clear ndb_binlog_index
Submitted: 22 Dec 2009 5:31 Modified: 14 Feb 2010 8:26
Reporter: Mikiya Okuno Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.2 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: 6.2.x

[22 Dec 2009 5:31] Mikiya Okuno
Description:
RESET SLAVE clears not only ndb_apply_status but also ndb_binlog_index at this moment. However, it must clear only a slave-related table, ndb_apply_status. ndb_binlog_index is a master table, so RESET SLAVE should not clear ndb_binlog_index. ndb_binlog_index should be cleared by RESET MASTER.

This problem affects multi-master setup.

How to repeat:
1. Configure dual-master cluster replication.
2. Kill one cluster.
3. Restore data from surviving cluster.
4. Re-configure cluster replication.
5. RESET SLAVE will clear on the surviving cluster.

Suggested fix:
Do not let RESET SLAVE to reset ndb_binlog_index.
[14 Jan 2010 8:26] Martin Skold
Cannot reproduce.
The code looks as follows, so a purging (clearing)
of ndb_binlog_index should not be done by the slave.

static int
ndbcluster_binlog_index_purge_file(THD *thd, const char *file)
{
  if (!ndb_binlog_running || thd->slave_thread)
    return 0;
... 

Please attach all logs from the scenario for analysis.
[15 Feb 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".