Commit 4234038b authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/stewart/Documents/MySQL/5.1/new

into  mysql.com:/home/stewart/Documents/MySQL/5.1/2868

parents b8c89538 4c7d6191
Loading
Loading
Loading
Loading
+4 −16
Original line number Diff line number Diff line
@@ -139,21 +139,11 @@ class StartBackupReq {
  friend bool printSTART_BACKUP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:

  STATIC_CONST( MaxTableTriggers = 4 );
  STATIC_CONST( HeaderLength = 5 );
  STATIC_CONST( TableTriggerLength = 4);
  STATIC_CONST( SignalLength = 2 );

private:
  Uint32 backupId;
  Uint32 backupPtr;
  Uint32 signalNo;
  Uint32 noOfSignals;
  Uint32 noOfTableTriggers;

  struct TableTriggers {
    Uint32 tableId;
    Uint32 triggerIds[3];
  } tableTriggers[MaxTableTriggers];
};

class StartBackupRef {
@@ -169,7 +159,7 @@ class StartBackupRef {

  friend bool printSTART_BACKUP_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
  STATIC_CONST( SignalLength = 5 );
  STATIC_CONST( SignalLength = 4 );

  enum ErrorCode {
    FailedToAllocateTriggerRecord = 1
@@ -177,7 +167,6 @@ public:
private:
  Uint32 backupId;
  Uint32 backupPtr;
  Uint32 signalNo;
  Uint32 errorCode;
  Uint32 nodeId;
};
@@ -195,12 +184,11 @@ class StartBackupConf {

  friend bool printSTART_BACKUP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
  STATIC_CONST( SignalLength = 3 );
  STATIC_CONST( SignalLength = 2 );

private:
  Uint32 backupId;
  Uint32 backupPtr;
  Uint32 signalNo;
};

class BackupFragmentReq {
+2 −10
Original line number Diff line number Diff line
@@ -48,16 +48,8 @@ printDEFINE_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
bool 
printSTART_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){
  StartBackupReq* sig = (StartBackupReq*)data;
  fprintf(out, " backupPtr: %d backupId: %d signalNo: %d of %d\n",
	  sig->backupPtr, sig->backupId,
	  sig->signalNo + 1, sig->noOfSignals);
  for(Uint32 i = 0; i<sig->noOfTableTriggers; i++)
    fprintf(out, 
	    "   Table: %d Triggers = [ insert: %d update: %d delete: %d ]\n",
	    sig->tableTriggers[i].tableId,
	    sig->tableTriggers[i].triggerIds[TriggerEvent::TE_INSERT],
	    sig->tableTriggers[i].triggerIds[TriggerEvent::TE_UPDATE],
	    sig->tableTriggers[i].triggerIds[TriggerEvent::TE_DELETE]);
  fprintf(out, " backupPtr: %d backupId: %d\n",
	  sig->backupPtr, sig->backupId);
  return true;
}

+247 −391

File changed.

Preview size limit exceeded, changes collapsed.

+14 −13
Original line number Diff line number Diff line
@@ -96,8 +96,6 @@ protected:
  void execGET_TABINFO_CONF(Signal* signal);
  void execCREATE_TRIG_REF(Signal* signal);
  void execCREATE_TRIG_CONF(Signal* signal);
  void execALTER_TRIG_REF(Signal* signal);
  void execALTER_TRIG_CONF(Signal* signal);
  void execDROP_TRIG_REF(Signal* signal);
  void execDROP_TRIG_CONF(Signal* signal);

@@ -426,6 +424,7 @@ public:
    Uint32 clientRef;
    Uint32 clientData;
    Uint32 flags;
    Uint32 signalNo;
    Uint32 backupId;
    Uint32 backupKey[2];
    Uint32 masterRef;
@@ -452,6 +451,17 @@ public:
    Array<Page32> pages;   // Used for (un)packing backup request
    SimpleProperties props;// Used for (un)packing backup request

    struct SlaveData {
      SignalCounter trigSendCounter;
      Uint32 gsn;
      struct {
	Uint32 tableId;
      } createTrig;
      struct {
	Uint32 tableId;
      } dropTrig;
    } slaveData;

    struct MasterData {
      MasterData(Backup & b) 
	{
@@ -462,15 +472,6 @@ public:
      Uint32 gsn;
      SignalCounter sendCounter;
      Uint32 errorCode;
      struct {
	Uint32 tableId;
      } createTrig;
      struct {
	Uint32 tableId;
      } dropTrig;
      struct {
	Uint32 tableId;
      } alterTrig;
      union {
	struct {
	  Uint32 startBackup;
@@ -563,7 +564,7 @@ public:
  void defineBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId);
  void createTrigReply(Signal* signal, BackupRecordPtr ptr);
  void alterTrigReply(Signal* signal, BackupRecordPtr ptr);
  void startBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32, Uint32);
  void startBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32);
  void stopBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId);
  
  void defineBackupRef(Signal*, BackupRecordPtr, Uint32 errCode = 0);
+6 −9
Original line number Diff line number Diff line
@@ -25,15 +25,12 @@ BACKUP_REQ
                <-------------------------------
BACKUP_CONF
<----------------
                 CREATE_TRIG
                 --------------> (If master crashes here -> rouge triggers/memory leak)
                 <--------------
                 START_BACKUP
                 ------------------------------>
                 <------------------------------
                 ALTER_TRIG
                                                CREATE_TRIG
                                                -------------->
                                                <--------------
                 <------------------------------
                 WAIT_GCP
                 -------------->
                 <--------------
@@ -46,11 +43,11 @@ BACKUP_CONF
                 WAIT_GCP
                 -------------->
                 <--------------
                 STOP_BACKUP
                 ------------------------------>
                                                DROP_TRIG
                                                -------------->
                                                <--------------
                 STOP_BACKUP
                 ------------------------------>
                 <------------------------------
BACKUP_COMPLETE_REP
<----------------
Loading