Commit e5a81746 authored by unknown's avatar unknown

Bug #21494 Master Cluster MySQLD is point of failure that can lead to mismatch slave data

- insert gap event on cluster connect

parent e0f91f22
......@@ -3589,6 +3589,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";
......
......@@ -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))
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment