Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-06 15:12:27+01:00, tomas@stripped +1 -0
Bug #31484 Cluster LOST_EVENTS entry not added to binlog on mysqld restart
- correction, do not insert GAP on first startup
sql/ha_ndbcluster_binlog.cc@stripped, 2007-11-06 15:12:25+01:00,
tomas@stripped +20 -2
Bug #31484 Cluster LOST_EVENTS entry not added to binlog on mysqld restart
- correction, do not insert GAP on first startup
diff -Nrup a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
--- a/sql/ha_ndbcluster_binlog.cc 2007-11-06 10:27:53 +01:00
+++ b/sql/ha_ndbcluster_binlog.cc 2007-11-06 15:12:25 +01:00
@@ -3725,9 +3725,26 @@ restart:
/*
Main NDB Injector loop
*/
- if (ndb_binlog_running)
+ while (ndb_binlog_running)
{
/*
+ check if it is the first log, if so we do not insert a GAP event
+ as there is really no log to have a GAP in
+ */
+ {
+ LOG_INFO log_info;
+ mysql_bin_log.get_current_log(&log_info);
+ int len= strlen(log_info.log_file_name);
+ uint no= 0;
+ if ((sscanf(log_info.log_file_name + len - 6, "%u", &no) == 1) &&
+ no == 1)
+ {
+ /* this is the fist log, so skip GAP event */
+ break;
+ }
+ }
+
+ /*
Always insert a GAP event as we cannot know what has happened
in the cluster while not being connected.
*/
@@ -3739,8 +3756,9 @@ restart:
IF_DBUG(int error=)
inj->record_incident(thd, INCIDENT_LOST_EVENTS, msg[incident_id]);
DBUG_ASSERT(!error);
- incident_id= 1;
+ break;
}
+ incident_id= 1;
{
thd->proc_info= "Waiting for ndbcluster to start";
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2581) BUG#31484 | tomas | 6 Nov |