diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-04-03 14:31:46 +0200 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-04-03 14:31:46 +0200 |
commit | e5a81746de94d77e18d2b70a7410348dd6fc7624 (patch) | |
tree | 93eec7cc1878a6553da1c51083679bb39f4f91f7 /sql | |
parent | e0f91f2262f05a5e8b031b9c09c73211999073e0 (diff) | |
download | mariadb-git-e5a81746de94d77e18d2b70a7410348dd6fc7624.tar.gz |
Bug #21494 Master Cluster MySQLD is point of failure that can lead to mismatch slave data
- insert gap event on cluster connect
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_ndbcluster_binlog.cc | 8 | ||||
-rw-r--r-- | sql/rpl_injector.cc | 2 | ||||
-rw-r--r-- | sql/rpl_injector.h | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index e5b4cffa7fb..d1c2ad15894 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -3590,6 +3590,14 @@ restart: Main NDB Injector loop */ { + /* + Always insert a GAP event as we cannot know what has happened in the cluster + while not being connected. + */ + LEX_STRING const msg= { C_STRING_WITH_LEN("Cluster connect") }; + inj->record_incident(thd, INCIDENT_LOST_EVENTS, msg); + } + { thd->proc_info= "Waiting for ndbcluster to start"; pthread_mutex_lock(&injector_mutex); diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index b22b052a105..b66f0b1c7c1 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -198,7 +198,7 @@ int injector::record_incident(THD *thd, Incident incident) return 0; } -int injector::record_incident(THD *thd, Incident incident, LEX_STRING message) +int injector::record_incident(THD *thd, Incident incident, LEX_STRING const message) { Incident_log_event ev(thd, incident, message); if (int error= mysql_bin_log.write(&ev)) diff --git a/sql/rpl_injector.h b/sql/rpl_injector.h index eabf374857a..9c444ee20b3 100644 --- a/sql/rpl_injector.h +++ b/sql/rpl_injector.h @@ -324,7 +324,7 @@ public: void new_trans(THD *, transaction *); int record_incident(THD*, Incident incident); - int record_incident(THD*, Incident incident, LEX_STRING message); + int record_incident(THD*, Incident incident, LEX_STRING const message); private: explicit injector(); |