Commit e5a81746 authored by unknown's avatar unknown
Browse files

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

- insert gap event on cluster connect

parent e0f91f22
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3589,6 +3589,14 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
  /*
    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";

+1 −1
Original line number Diff line number Diff line
@@ -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))
+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ class injector
    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();