diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-11-06 15:12:27 +0100 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-11-06 15:12:27 +0100 |
commit | 9d7ae6f002538f557dc4203557b3bfdf62808334 (patch) | |
tree | b8c8465c8f49845e783bbfa9be49497d04d073cf /sql/ha_ndbcluster_binlog.cc | |
parent | f8fcc6185a7551fe19473639ca87e00b4e6cb934 (diff) | |
download | mariadb-git-9d7ae6f002538f557dc4203557b3bfdf62808334.tar.gz |
Bug #31484 Cluster LOST_EVENTS entry not added to binlog on mysqld restart
- correction, do not insert GAP on first startup
Diffstat (limited to 'sql/ha_ndbcluster_binlog.cc')
-rw-r--r-- | sql/ha_ndbcluster_binlog.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 4bb17dffa4a..baa8b1ada66 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -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"; |