From: Jonas Oreland Date: June 16 2011 1:20pm Subject: bzr push into mysql-5.1-telco-7.0 branch (jonas:4459 to 4460) List-Archive: http://lists.mysql.com/commits/139355 Message-Id: <20110616132002.48A0A93D474@perch.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4460 Jonas Oreland 2011-06-16 [merge] ndb - merge 63 to 70 modified: sql/ha_ndbcluster_binlog.cc 4459 Frazer Clement 2011-06-16 Modify 2 channel circular replication testcase to use IGNORE_SERVER_IDS The 2 channel circular replication testcase uses the same server id for both MySQLDs on each site to avoid double application of 'reflected' events. This is not necessary with the IGNORE_SERVER_IDs CHANGE MASTER option, so the testcase is modified to use distinct server ids + IGNORE_SERVER_IDS. added: mysql-test/suite/ndb_rpl/ndb_master-slave_2ch_end.inc modified: mysql-test/suite/ndb_rpl/ndb_master-slave_2ch.inc mysql-test/suite/ndb_rpl/r/ndb_rpl_circular_2ch.result mysql-test/suite/ndb_rpl/t/ndb_rpl_circular_2ch.cnf mysql-test/suite/ndb_rpl/t/ndb_rpl_circular_2ch.test === modified file 'sql/ha_ndbcluster_binlog.cc' --- a/sql/ha_ndbcluster_binlog.cc 2011-03-22 08:32:32 +0000 +++ b/sql/ha_ndbcluster_binlog.cc 2011-06-16 13:19:31 +0000 @@ -5966,6 +5966,13 @@ ndb_binlog_thread_func(void *arg) uint incident_id= 0; Binlog_thread_state do_ndbcluster_binlog_close_connection; + /** + * If we get error after having reported incident + * but before binlog started...we do "Restarting Cluster Binlog" + * in that case, don't report incident again + */ + bool do_incident = true; + #ifdef RUN_NDB_BINLOG_TIMER Timer main_timer; #endif @@ -6106,7 +6113,7 @@ restart_cluster_failure: /* Main NDB Injector loop */ - while (ndb_binlog_running) + while (do_incident && ndb_binlog_running) { /* check if it is the first log, if so we do not insert a GAP event @@ -6138,6 +6145,7 @@ restart_cluster_failure: int ret = inj->record_incident(thd, INCIDENT_LOST_EVENTS, msg[incident_id]); assert(ret == 0); + do_incident = false; // Don't report incident again, unless we get started break; } incident_id= 1; @@ -6263,6 +6271,7 @@ restart_cluster_failure: static char db[]= ""; thd->db= db; } + do_incident = true; // If we get disconnected again...do incident report do_ndbcluster_binlog_close_connection= BCCC_running; for ( ; !((ndbcluster_binlog_terminating || do_ndbcluster_binlog_close_connection) && No bundle (reason: useless for push emails).