List:Commits« Previous MessageNext Message »
From:pekka Date:January 17 2007 3:23pm
Subject:bk commit into 5.1 tree (pekka:1.2391)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of pekka. When pekka does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-01-17 15:23:30+01:00, pekka@stripped +26 -0
  ndb - wl#3600 drop trigger, part 1
  fix more when alter trigger done and index can be tested

  storage/ndb/include/kernel/GlobalSignalNumbers.h@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +5 -1
    wl#3600 drop trigger, part 1

  storage/ndb/include/kernel/signaldata/DropTrig.hpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +36 -243
    wl#3600 drop trigger, part 1

  storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +75 -0
    wl#3600 drop trigger, part 1

  storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp@stripped, 2007-01-16 22:59:11+01:00,
pekka@stripped +0 -0
    BitKeeper file
/export/space/pekka/ndb/version/my52-wl3600-a/storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp

  storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp@stripped, 2007-01-16 22:59:11+01:00,
pekka@stripped +0 -0

  storage/ndb/include/kernel/signaldata/SignalData.hpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +4 -0
    wl#3600 drop trigger, part 1

  storage/ndb/src/common/debugger/signaldata/DropTrig.cpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +47 -63
    wl#3600 drop trigger, part 1

  storage/ndb/src/common/debugger/signaldata/DropTrigImpl.cpp@stripped, 2007-01-17
15:21:23+01:00, pekka@stripped +67 -0
    wl#3600 drop trigger, part 1

  storage/ndb/src/common/debugger/signaldata/DropTrigImpl.cpp@stripped, 2007-01-17
03:21:20+01:00, pekka@stripped +0 -0
    BitKeeper file
/export/space/pekka/ndb/version/my52-wl3600-a/storage/ndb/src/common/debugger/signaldata/DropTrigImpl.cpp

  storage/ndb/src/common/debugger/signaldata/DropTrigImpl.cpp@stripped, 2007-01-17
03:21:20+01:00, pekka@stripped +0 -0

  storage/ndb/src/common/debugger/signaldata/Makefile.am@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +2 -1
    wl#3600 drop trigger, part 1

  storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp@stripped, 2007-01-17
15:21:23+01:00, pekka@stripped +4 -0
    wl#3600 drop trigger, part 1

  storage/ndb/src/common/debugger/signaldata/SignalNames.cpp@stripped, 2007-01-17
15:21:23+01:00, pekka@stripped +5 -0
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/backup/Backup.cpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +54 -29
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/backup/Backup.hpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +2 -2
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/backup/BackupInit.cpp@stripped, 2007-01-17 15:21:23+01:00,
pekka@stripped +2 -2
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +315 -77
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +67 -17
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +3 -3
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +3 -3
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +6 -6
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +1 -1
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +1 -1
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +26 -16
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +3 -3
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +1 -1
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +45 -36
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +41 -27
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/suma/Suma.hpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +2 -2
    wl#3600 drop trigger, part 1

  storage/ndb/src/kernel/blocks/suma/SumaInit.cpp@stripped, 2007-01-17 15:21:24+01:00,
pekka@stripped +2 -2
    wl#3600 drop trigger, part 1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	pekka
# Host:	clam.(none)
# Root:	/export/space/pekka/ndb/version/my52-wl3600-a

--- 1.36/storage/ndb/include/kernel/GlobalSignalNumbers.h	2007-01-16 12:39:53 +01:00
+++ 1.37/storage/ndb/include/kernel/GlobalSignalNumbers.h	2007-01-17 15:21:23 +01:00
@@ -23,7 +23,7 @@
  *
  * When adding a new signal, remember to update MAX_GSN and SignalNames.cpp
  */
-const GlobalSignalNumber MAX_GSN = 751;
+const GlobalSignalNumber MAX_GSN = 754;
 
 struct GsnName {
   GlobalSignalNumber gsn;
@@ -1010,5 +1010,9 @@
 #define GSN_CREATE_TRIG_IMPL_REQ        749
 #define GSN_CREATE_TRIG_IMPL_CONF       750
 #define GSN_CREATE_TRIG_IMPL_REF        751
+
+#define GSN_DROP_TRIG_IMPL_REQ          752
+#define GSN_DROP_TRIG_IMPL_CONF         753
+#define GSN_DROP_TRIG_IMPL_REF          754
 
 #endif

--- 1.2/storage/ndb/include/kernel/signaldata/DropTrig.hpp	2005-04-08 02:43:50 +02:00
+++ 1.3/storage/ndb/include/kernel/signaldata/DropTrig.hpp	2007-01-17 15:21:23 +01:00
@@ -18,17 +18,11 @@
 #define DROP_TRIG_HPP
 
 #include "SignalData.hpp"
-#include <NodeBitmask.hpp>
-#include <trigger_definitions.h>
 
-/**
- * DropTrigReq.
- */
-class DropTrigReq {
+struct DropTrigReq {
   friend bool printDROP_TRIG_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-public:
-  enum RequestType {
+  enum RequestType {//wl3600_todo remove
     RT_UNDEFINED = 0,
     RT_USER = 1,
     RT_ALTER_INDEX = 2,
@@ -39,180 +33,41 @@
     RT_TC = 5 << 8,
     RT_LQH = 6 << 8
   };
-  STATIC_CONST( SignalLength = 7 );
+  STATIC_CONST( SignalLength = 10 );
   SECTION( TRIGGER_NAME_SECTION = 0 ); // optional
-  enum KeyValues {
+  enum xxxKeyValues {//wl3600_todo use DictTabInfo
     TriggerNameKey = 0xa1
   };
 
-private:
-  Uint32 m_userRef;
-  Uint32 m_connectionPtr;
-  Uint32 m_requestInfo;
-  Uint32 m_tableId;
-  Uint32 m_indexId;             // set by DICT if index trigger
-  Uint32 m_triggerId;           // set by DICT based on name
-  Uint32 m_triggerInfo;         // only for TUP
-  // extra
-  Uint32 m_opKey;
-
-public:
-  Uint32 getUserRef() const {
-    return m_userRef;
-  }
-  void setUserRef(Uint32 val) {
-    m_userRef = val;
-  }
-  Uint32 getConnectionPtr() const {
-    return m_connectionPtr;
-  }
-  void setConnectionPtr(Uint32 val) {
-    m_connectionPtr = val;
-  }
-  DropTrigReq::RequestType getRequestType() const {
-    const Uint32 val = BitmaskImpl::getField(1, &m_requestInfo, 0, 16);
-    return (DropTrigReq::RequestType)val;
-  }
-  void setRequestType(DropTrigReq::RequestType val) {
-    m_requestInfo = (Uint32)val;
-  }
-  Uint32 getRequestFlag() const {
-    return BitmaskImpl::getField(1, &m_requestInfo, 16, 16);
-  };
-  void addRequestFlag(Uint32 val) {
-    val |= BitmaskImpl::getField(1, &m_requestInfo, 16, 16);
-    BitmaskImpl::setField(1, &m_requestInfo, 16, 16, val);
-  };
-  Uint32 getTableId() const {
-    return m_tableId;
-  }
-  void setTableId(Uint32 val) {
-    m_tableId = val;
-  }
-  Uint32 getIndexId() const {
-    return m_indexId;
-  }
-  void setIndexId(Uint32 val) {
-    m_indexId = val;
-  }
-  Uint32 getTriggerId() const {
-    return m_triggerId;
-  }
-  void setTriggerId(Uint32 val) {
-    m_triggerId = val;
-  }
-  Uint32 getTriggerInfo() const {
-    return m_triggerInfo;
-  }
-  void setTriggerInfo(Uint32 val) {
-    m_triggerInfo = val;
-  }
-  TriggerType::Value getTriggerType() const {
-    const Uint32 val = BitmaskImpl::getField(1, &m_triggerInfo, 0, 8);
-    return (TriggerType::Value)val;
-  }
-  void setTriggerType(TriggerType::Value val) {
-    BitmaskImpl::setField(1, &m_triggerInfo, 0, 8, (Uint32)val);
-  }
-  TriggerActionTime::Value getTriggerActionTime() const {
-    const Uint32 val = BitmaskImpl::getField(1, &m_triggerInfo, 8, 8);
-    return (TriggerActionTime::Value)val;
-  }
-  void setTriggerActionTime(TriggerActionTime::Value val) {
-    BitmaskImpl::setField(1, &m_triggerInfo, 8, 8, (Uint32)val);
-  }
-  TriggerEvent::Value getTriggerEvent() const {
-    const Uint32 val = BitmaskImpl::getField(1, &m_triggerInfo, 16, 8);
-    return (TriggerEvent::Value)val;
-  }
-  void setTriggerEvent(TriggerEvent::Value val) {
-    BitmaskImpl::setField(1, &m_triggerInfo, 16, 8, (Uint32)val);
-  }
-  bool getMonitorReplicas() const {
-    return BitmaskImpl::getField(1, &m_triggerInfo, 24, 1);
-  }
-  void setMonitorReplicas(bool val) {
-    BitmaskImpl::setField(1, &m_triggerInfo, 24, 1, val);
-  }
-  bool getMonitorAllAttributes() const {
-    return BitmaskImpl::getField(1, &m_triggerInfo, 25, 1);
-  }
-  void setMonitorAllAttributes(bool val) {
-    BitmaskImpl::setField(1, &m_triggerInfo, 25, 1, val);
-  }
-  Uint32 getOpKey() const {
-    return m_opKey;
-  }
-  void setOpKey(Uint32 val) {
-    m_opKey = val;
-  }
+  Uint32 clientRef;
+  Uint32 clientData;
+  Uint32 transId;
+  Uint32 transKey;
+  Uint32 requestType;
+  Uint32 tableId;
+  Uint32 tableVersion;
+  Uint32 indexId;
+  Uint32 indexVersion;
+  Uint32 triggerId;
 };
 
-/**
- * DropTrigConf.
- */
-class DropTrigConf {
+struct DropTrigConf {
   friend bool printDROP_TRIG_CONF(FILE*, const Uint32*, Uint32, Uint16);
 
-public:
-  STATIC_CONST( InternalLength = 3 );
-  STATIC_CONST( SignalLength = 6 );
-
-private:
-  Uint32 m_userRef;
-  Uint32 m_connectionPtr;
-  Uint32 m_requestInfo;
-  Uint32 m_tableId;
-  Uint32 m_indexId;
-  Uint32 m_triggerId;
+  STATIC_CONST( SignalLength = 7 );
 
-  // Public methods
-public:
-  Uint32 getUserRef() const {
-    return m_userRef;
-  }
-  void setUserRef(Uint32 val) {
-    m_userRef = val;
-  }
-  Uint32 getConnectionPtr() const {
-    return m_connectionPtr;
-  }
-  void setConnectionPtr(Uint32 val) {
-    m_connectionPtr = val;
-  }
-  DropTrigReq::RequestType getRequestType() const {
-    return (DropTrigReq::RequestType)m_requestInfo;
-  }
-  void setRequestType(DropTrigReq::RequestType val) {
-    m_requestInfo = (Uint32)val;
-  }
-  Uint32 getTableId() const {
-    return m_tableId;
-  }
-  void setTableId(Uint32 val) {
-    m_tableId = val;
-  }
-  Uint32 getIndexId() const {
-    return m_indexId;
-  }
-  void setIndexId(Uint32 val) {
-    m_indexId = val;
-  }
-  Uint32 getTriggerId() const {
-    return m_triggerId;
-  }
-  void setTriggerId(Uint32 val) {
-    m_triggerId = val;
-  }
+  Uint32 senderRef;
+  Uint32 clientData;
+  Uint32 transId;
+  Uint32 requestType;
+  Uint32 tableId;
+  Uint32 indexId;
+  Uint32 triggerId;
 };
 
-/**
- * DropTrigRef.
- */
-class DropTrigRef {
+struct DropTrigRef {
   friend bool printDROP_TRIG_REF(FILE*, const Uint32*, Uint32, Uint16);
 
-public:
   enum ErrorCode {
     NoError = 0,
     Busy = 701,
@@ -220,81 +75,19 @@
     BadRequestType = 4247,
     InvalidName = 4248
   };
-  STATIC_CONST( SignalLength = DropTrigConf::SignalLength + 3 );
-
-private:
-  DropTrigConf m_conf;
-  //Uint32 m_userRef;
-  //Uint32 m_connectionPtr;
-  //Uint32 m_requestInfo;
-  //Uint32 m_tableId;
-  //Uint32 m_indexId;
-  //Uint32 m_triggerId;
-  Uint32 m_errorCode;
-  Uint32 m_errorLine;
-  Uint32 m_errorNode;
+  STATIC_CONST( SignalLength = 11 );
 
-public:
-  DropTrigConf* getConf() {
-    return &m_conf;
-  }
-  const DropTrigConf* getConf() const {
-    return &m_conf;
-  }
-  Uint32 getUserRef() const {
-    return m_conf.getUserRef();
-  }
-  void setUserRef(Uint32 val) {
-    m_conf.setUserRef(val);
-  }
-  Uint32 getConnectionPtr() const {
-    return m_conf.getConnectionPtr();
-  }
-  void setConnectionPtr(Uint32 val) {
-    m_conf.setConnectionPtr(val);
-  }
-  DropTrigReq::RequestType getRequestType() const {
-    return m_conf.getRequestType();
-  }
-  void setRequestType(DropTrigReq::RequestType val) {
-    m_conf.setRequestType(val);
-  }
-  Uint32 getTableId() const {
-    return m_conf.getTableId();
-  }
-  void setTableId(Uint32 val) {
-    m_conf.setTableId(val);
-  }
-  Uint32 getIndexId() const {
-    return m_conf.getIndexId();
-  }
-  void setIndexId(Uint32 val) {
-    m_conf.setIndexId(val);
-  }
-  Uint32 getTriggerId() const {
-    return m_conf.getTriggerId();
-  }
-  void setTriggerId(Uint32 val) {
-    m_conf.setTriggerId(val);
-  }
-  DropTrigRef::ErrorCode getErrorCode() const {
-    return (DropTrigRef::ErrorCode)m_errorCode;
-  }
-  void setErrorCode(DropTrigRef::ErrorCode val) {
-    m_errorCode = (Uint32)val;
-  }
-  Uint32 getErrorLine() const {
-    return m_errorLine;
-  }
-  void setErrorLine(Uint32 val) {
-    m_errorLine = val;
-  }
-  Uint32 getErrorNode() const {
-    return m_errorNode;
-  }
-  void setErrorNode(Uint32 val) {
-    m_errorNode = val;
-  }
+  Uint32 senderRef;
+  Uint32 clientData;
+  Uint32 transId;
+  Uint32 requestType;
+  Uint32 tableId;
+  Uint32 indexId;
+  Uint32 triggerId;
+  Uint32 errorCode;
+  Uint32 errorLine;
+  Uint32 errorNodeId;
+  Uint32 masterNodeId;
 };
 
 #endif

--- 1.20/storage/ndb/include/kernel/signaldata/SignalData.hpp	2007-01-16 12:39:53 +01:00
+++ 1.21/storage/ndb/include/kernel/signaldata/SignalData.hpp	2007-01-17 15:21:23 +01:00
@@ -265,4 +265,8 @@
 GSN_PRINT_SIGNATURE(printCREATE_TRIG_IMPL_CONF);
 GSN_PRINT_SIGNATURE(printCREATE_TRIG_IMPL_REF);
 
+GSN_PRINT_SIGNATURE(printDROP_TRIG_IMPL_REQ);
+GSN_PRINT_SIGNATURE(printDROP_TRIG_IMPL_CONF);
+GSN_PRINT_SIGNATURE(printDROP_TRIG_IMPL_REF);
+
 #endif

--- 1.2/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp	2005-04-08 02:43:55 +02:00
+++ 1.3/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp	2007-01-17 15:21:23 +01:00
@@ -16,74 +16,58 @@
 
 #include <signaldata/DropTrig.hpp>
 
-bool printDROP_TRIG_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16
receiverBlockNo)
+bool
+printDROP_TRIG_REQ(FILE* output, const Uint32* theData, Uint32 len, Uint16)
 {
-  const DropTrigReq * const sig = (DropTrigReq *) theData;
-
-  //char triggerName[MAX_TAB_NAME_SIZE];
-  //char triggerType[32];
-  //char triggerActionTime[32];
-  //char triggerEvent[32];
-
-  //sig->getTriggerName((char *) &triggerName);
-  //switch(sig->getTriggerType()) {
-  //case(TriggerType::SECONDARY_INDEX): 
-    //strcpy(triggerType, "SECONDARY_INDEX");
-    //break;
-  //case(TriggerType::SUBSCRIPTION):
-    //strcpy(triggerType, "SUBSCRIPTION");
-    //break;
-  //default:
-    //strcpy(triggerType, "UNSUPPORTED");
-  //}
-  //strcpy(triggerActionTime, 
-         //(sig->getTriggerActionTime() == TriggerActionTime::BEFORE)?
-         //"BEFORE":"AFTER");
-  //switch(sig->getTriggerEvent()) {
-  //case (TriggerEvent::TE_INSERT):
-    //strcpy(triggerEvent, "INSERT");
-    //break;
-  //case(TriggerEvent::TE_DELETE):
-    //strcpy(triggerEvent, "DELETE");
-    //break;
-  //case(TriggerEvent::TE_UPDATE):
-    //strcpy(triggerEvent, "UPDATE");
-    //break;
-  //}
-
-  fprintf(output, "User: %u, ", sig->getUserRef());
-  //fprintf(output, "Trigger name: \"%s\"\n", triggerName);
-  //fprintf(output, "Type: %s, ", triggerType);
-  //fprintf(output, "Action: %s, ", triggerActionTime);
-  //fprintf(output, "Event: %s, ", triggerEvent);
-  fprintf(output, "Trigger id: %u, ", sig->getTriggerId());
-  fprintf(output, "Table id: %u, ", sig->getTableId());
-  fprintf(output, "\n");  
-
-  return false;
+  const DropTrigReq* sig = (const DropTrigReq*)theData;
+  fprintf(output, " clientRef: %x", sig->clientRef);
+  fprintf(output, " clientData: %x", sig->clientData);
+  fprintf(output, " transId: %x", sig->transId);
+  fprintf(output, " transKey: %x", sig->transKey);
+  fprintf(output, "\n");
+  fprintf(output, " requestType: %x", sig->requestType);
+  fprintf(output, " tableId: %x", sig->tableId);
+  fprintf(output, " tableVersion: %x", sig->tableVersion);
+  fprintf(output, " indexId: %x", sig->indexId);
+  fprintf(output, " indexVersion: %x", sig->indexVersion);
+  fprintf(output, "\n");
+  fprintf(output, " triggerId: %x", sig->triggerId);
+  fprintf(output, "\n");
+  return true;
 }
 
-bool printDROP_TRIG_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16
receiverBlockNo)
+bool
+printDROP_TRIG_CONF(FILE* output, const Uint32* theData, Uint32 len, Uint16)
 {
-  const DropTrigConf * const sig = (DropTrigConf *) theData;
-
-  fprintf(output, "User: %u, ", sig->getUserRef());
-  fprintf(output, "Trigger id: %u, ", sig->getTriggerId());
-  fprintf(output, "Table id: %u, ", sig->getTableId());
-  fprintf(output, "\n");  
-
-  return false;
+  const DropTrigConf* sig = (const DropTrigConf*) theData;
+  fprintf(output, " senderRef: %x", sig->senderRef);
+  fprintf(output, " clientData: %x", sig->clientData);
+  fprintf(output, " requestType: %x", sig->requestType);
+  fprintf(output, "\n");
+  fprintf(output, " tableId: %x", sig->tableId);
+  fprintf(output, " indexId: %x", sig->indexId);
+  fprintf(output, " triggerId: %x", sig->triggerId);
+  fprintf(output, "\n");
+  return true;
 }
 
-bool printDROP_TRIG_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16
receiverBlockNo)
+bool
+printDROP_TRIG_REF(FILE* output, const Uint32* theData, Uint32 len, Uint16)
 {
-  const DropTrigRef * const sig = (DropTrigRef *) theData;
-
-  fprintf(output, "User: %u, ", sig->getUserRef());
-  fprintf(output, "Trigger id: %u, ", sig->getTriggerId());
-  fprintf(output, "Table id: %u, ", sig->getTableId());
-  fprintf(output, "Error code: %u, ", sig->getErrorCode());
-  fprintf(output, "\n");  
-  
-  return false;
+  const DropTrigRef * sig = (const DropTrigRef*) theData;
+  fprintf(output, " senderRef: %x", sig->senderRef);
+  fprintf(output, " clientData: %x", sig->clientData);
+  fprintf(output, " transId: %x", sig->transId);
+  fprintf(output, " requestType: %x", sig->requestType);
+  fprintf(output, "\n");
+  fprintf(output, " tableId: %x", sig->tableId);
+  fprintf(output, " indexId: %x", sig->indexId);
+  fprintf(output, " triggerId: %x", sig->triggerId);
+  fprintf(output, "\n");
+  fprintf(output, " errorCode: %u", sig->errorCode);
+  fprintf(output, " errorLine: %u", sig->errorLine);
+  fprintf(output, " errorNodeId: %u", sig->errorNodeId);
+  fprintf(output, " masterNodeId: %u", sig->masterNodeId);
+  fprintf(output, "\n");
+  return true;
 }

--- 1.24/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp	2007-01-16
12:39:54 +01:00
+++ 1.25/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp	2007-01-17
15:21:23 +01:00
@@ -241,6 +241,10 @@
   ,{ GSN_CREATE_TRIG_IMPL_CONF, printCREATE_TRIG_IMPL_CONF }
   ,{ GSN_CREATE_TRIG_IMPL_REF, printCREATE_TRIG_IMPL_REF }
 
+  ,{ GSN_DROP_TRIG_IMPL_REQ, printDROP_TRIG_IMPL_REQ }
+  ,{ GSN_DROP_TRIG_IMPL_CONF, printDROP_TRIG_IMPL_CONF }
+  ,{ GSN_DROP_TRIG_IMPL_REF, printDROP_TRIG_IMPL_REF }
+
   ,{ 0, 0 }
 };
 

--- 1.21/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp	2007-01-16 12:39:54
+01:00
+++ 1.22/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp	2007-01-17 15:21:23
+01:00
@@ -663,5 +663,10 @@
   ,{ GSN_CREATE_TRIG_IMPL_REQ, "CREATE_TRIG_IMPL_REQ" }
   ,{ GSN_CREATE_TRIG_IMPL_CONF, "CREATE_TRIG_IMPL_CONF" }
   ,{ GSN_CREATE_TRIG_IMPL_REF, "CREATE_TRIG_IMPL_REF" }
+
+  ,{ GSN_DROP_TRIG_IMPL_REQ, "DROP_TRIG_IMPL_REQ" }
+  ,{ GSN_DROP_TRIG_IMPL_CONF, "DROP_TRIG_IMPL_CONF" }
+  ,{ GSN_DROP_TRIG_IMPL_REF, "DROP_TRIG_IMPL_REF" }
+
 };
 const unsigned short NO_OF_SIGNAL_NAMES = sizeof(SignalNames)/sizeof(GsnName);

--- 1.61/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2007-01-16 12:39:54 +01:00
+++ 1.62/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2007-01-17 15:21:23 +01:00
@@ -48,7 +48,7 @@
 
 #include <signaldata/CreateTrigImpl.hpp>
 #include <signaldata/AlterTrig.hpp>
-#include <signaldata/DropTrig.hpp>
+#include <signaldata/DropTrigImpl.hpp>
 #include <signaldata/FireTrigOrd.hpp>
 #include <signaldata/TrigAttrInfo.hpp>
 #include <AttributeHeader.hpp>
@@ -939,7 +939,7 @@
       break;
     }
     case GSN_WAIT_GCP_REQ:
-    case GSN_DROP_TRIG_REQ:
+    case GSN_DROP_TRIG_IMPL_REQ:
     case GSN_CREATE_TRIG_IMPL_REQ:
     case GSN_ALTER_TRIG_REQ:
       ptr.p->setErrorCode(AbortBackupOrd::BackupFailureDueToNodeFail);
@@ -2033,7 +2033,7 @@
 Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr)
 {
   TablePtr tabPtr;
-  ptr.p->slaveData.gsn = GSN_DROP_TRIG_REQ;
+  ptr.p->slaveData.gsn = GSN_DROP_TRIG_IMPL_REQ;
 
   if (ptr.p->slaveData.dropTrig.tableId == RNIL) {
     jam();
@@ -2112,59 +2112,84 @@
 Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr, TablePtr tabPtr)
 {
   jam();
-  DropTrigReq * req = (DropTrigReq *)signal->getDataPtrSend();
+  DropTrigImplReq* req =
+    (DropTrigImplReq*)signal->getDataPtrSend();
+  Uint32 senderRef;
+  Uint32 senderData;
+  Uint32 requestType;
+  Uint32 tableId;
+  Uint32 tableVersion;
+  Uint32 indexId;
+  Uint32 indexVersion;
+  Uint32 triggerId;
+  Uint32 triggerInfo;
 
-  ptr.p->slaveData.gsn = GSN_DROP_TRIG_REQ;
+  ptr.p->slaveData.gsn = GSN_DROP_TRIG_IMPL_REQ;
   ptr.p->slaveData.trigSendCounter = 0;
-  req->setConnectionPtr(ptr.i);
-  req->setUserRef(reference()); // Sending to myself
-  req->setRequestType(DropTrigReq::RT_USER);
-  req->setIndexId(RNIL);
-  req->setTriggerInfo(0);       // not used on DROP
-  req->setTriggerType(TriggerType::SUBSCRIPTION);
-  req->setTriggerActionTime(TriggerActionTime::TA_DETACHED);
+
+  req->senderRef = reference(); // Sending to myself
+  req->senderData = ptr.i;
+  req->requestType = 0;
+  req->tableId = tabPtr.p->tableId;
+  req->tableVersion = 0; // not used
+  req->indexId = RNIL;
+  req->indexVersion = 0;
+
+  // TUP needs some triggerInfo to find right list (fill it all in)
+  Uint32 ti = 0;
+  TriggerInfo::setTriggerType(ti, TriggerType::SUBSCRIPTION);
+  TriggerInfo::setTriggerActionTime(ti, TriggerActionTime::TA_DETACHED);
+  TriggerInfo::setMonitorReplicas(ti, true);
+  TriggerInfo::setMonitorAllAttributes(ti, false);
 
   ptr.p->slaveData.dropTrig.tableId = tabPtr.p->tableId;
-  req->setTableId(tabPtr.p->tableId);
 
   for (int i = 0; i < 3; i++) {
     Uint32 id = tabPtr.p->triggerIds[i];
-    req->setTriggerId(id);
-    req->setTriggerEvent(triggerEventValues[i]);
-    sendSignal(DBTUP_REF, GSN_DROP_TRIG_REQ,
-	       signal, DropTrigReq::SignalLength, JBB);
+    req->triggerId = id;
+
+    Uint32 ti2 = ti;
+    TriggerInfo::setTriggerEvent(ti2, triggerEventValues[i]);
+    req->triggerInfo = ti2;
+
+    sendSignal(DBTUP_REF, GSN_DROP_TRIG_IMPL_REQ,
+	       signal, DropTrigImplReq::SignalLength, JBB);
     ptr.p->slaveData.trigSendCounter ++;
   }
 }
 
 void
-Backup::execDROP_TRIG_REF(Signal* signal)
+Backup::execDROP_TRIG_IMPL_REF(Signal* signal)
 {
   jamEntry();
 
-  DropTrigRef* ref = (DropTrigRef*)signal->getDataPtr();
-  const Uint32 ptrI = ref->getConnectionPtr();
+  const DropTrigImplRef* ref =
+    (const DropTrigImplRef*)signal->getDataPtr();
+
+  const Uint32 ptrI = ref->senderData;
 
   BackupRecordPtr ptr LINT_SET_PTR;
   c_backupPool.getPtr(ptr, ptrI);
 
-  if(ref->getConf()->getTriggerId() != ~(Uint32) 0)
+  if (ref->triggerId != ~(Uint32) 0)
   {
-    ndbout << "ERROR DROPPING TRIGGER: " <<
ref->getConf()->getTriggerId();
-    ndbout << " Err: " << (Uint32)ref->getErrorCode() << endl
<< endl;
+    ndbout << "ERROR DROPPING TRIGGER: " << ref->triggerId;
+    ndbout << " Err: " << ref->errorCode << endl << endl;
   }
 
   dropTrigReply(signal, ptr);
 }
 
 void
-Backup::execDROP_TRIG_CONF(Signal* signal)
+Backup::execDROP_TRIG_IMPL_CONF(Signal* signal)
 {
   jamEntry();
   
-  DropTrigConf* conf = (DropTrigConf*)signal->getDataPtr();
-  const Uint32 ptrI = conf->getConnectionPtr();
-  const Uint32 triggerId= conf->getTriggerId();
+  const DropTrigImplConf* conf =
+    (const DropTrigImplConf*)signal->getDataPtr();
+
+  const Uint32 ptrI = conf->senderData;
+  const Uint32 triggerId = conf->triggerId;
 
   BackupRecordPtr ptr LINT_SET_PTR;
   c_backupPool.getPtr(ptr, ptrI);
@@ -2177,7 +2202,7 @@
 {
   CRASH_INSERTION((10012));
 
-  ndbrequire(ptr.p->slaveData.gsn == GSN_DROP_TRIG_REQ);
+  ndbrequire(ptr.p->slaveData.gsn == GSN_DROP_TRIG_IMPL_REQ);
   ndbrequire(ptr.p->slaveData.trigSendCounter.done() == false);
 
   // move from .masterData to .slaveData
@@ -2365,7 +2390,7 @@
   case GSN_UTIL_LOCK_REQ:
     ndbrequire(false);
     return;
-  case GSN_DROP_TRIG_REQ:
+  case GSN_DROP_TRIG_IMPL_REQ:
   case GSN_STOP_BACKUP_REQ:
     return;
   }

--- 1.27/storage/ndb/src/kernel/blocks/backup/Backup.hpp	2007-01-16 12:39:54 +01:00
+++ 1.28/storage/ndb/src/kernel/blocks/backup/Backup.hpp	2007-01-17 15:21:23 +01:00
@@ -99,8 +99,8 @@
   void execGET_TABINFO_CONF(Signal* signal);
   void execCREATE_TRIG_IMPL_REF(Signal* signal);
   void execCREATE_TRIG_IMPL_CONF(Signal* signal);
-  void execDROP_TRIG_REF(Signal* signal);
-  void execDROP_TRIG_CONF(Signal* signal);
+  void execDROP_TRIG_IMPL_REF(Signal* signal);
+  void execDROP_TRIG_IMPL_CONF(Signal* signal);
 
   /**
    * DIH signals

--- 1.26/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2007-01-16 12:39:54 +01:00
+++ 1.27/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2007-01-17 15:21:23 +01:00
@@ -62,8 +62,8 @@
   addRecSignal(GSN_CREATE_TRIG_IMPL_REF, &Backup::execCREATE_TRIG_IMPL_REF);
   addRecSignal(GSN_CREATE_TRIG_IMPL_CONF, &Backup::execCREATE_TRIG_IMPL_CONF);
 
-  addRecSignal(GSN_DROP_TRIG_REF, &Backup::execDROP_TRIG_REF);
-  addRecSignal(GSN_DROP_TRIG_CONF, &Backup::execDROP_TRIG_CONF);
+  addRecSignal(GSN_DROP_TRIG_IMPL_REF, &Backup::execDROP_TRIG_IMPL_REF);
+  addRecSignal(GSN_DROP_TRIG_IMPL_CONF, &Backup::execDROP_TRIG_IMPL_CONF);
 
   addRecSignal(GSN_DI_FCOUNTCONF, &Backup::execDI_FCOUNTCONF);
   addRecSignal(GSN_DIGETPRIMCONF, &Backup::execDIGETPRIMCONF);

--- 1.133/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-01-16 12:39:54 +01:00
+++ 1.134/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-01-17 15:21:24 +01:00
@@ -1586,7 +1586,6 @@
   c_opSubEvent(c_opRecordPool),
   c_opDropEvent(c_opRecordPool),
   c_opSignalUtil(c_opRecordPool),
-  c_opDropTrigger(c_opRecordPool),
   c_opAlterTrigger(c_opRecordPool),
   c_schemaOperation(c_opRecordPool),
   c_Trans(c_opRecordPool),
@@ -2176,7 +2175,7 @@
   c_alterIndexDataPool.setSize(256);
   c_opBuildIndex.setSize(8);
   c_createTriggerDataPool.setSize(256);
-  c_opDropTrigger.setSize(8);
+  c_dropTriggerDataPool.setSize(256);
   c_opAlterTrigger.setSize(8);
 
   c_dictLockPool.setSize(32);
@@ -13289,7 +13288,6 @@
       break;
     case AlterIndxImplReq::AlterIndexOffline:
       jam();
-      return false; //wl3600_todo not yet
       {
         Callback c = {
           safe_cast(&Dbdict::alterIndex_fromDropTrigger),
@@ -13383,8 +13381,8 @@
     const Uint32 triggerNo = alterIndexPtr.p->m_triggerNo;
     ndbrequire(triggerNo < alterIndexPtr.p->m_triggerCount);
 
-    // connect trigger id to index wl3600_todo array would be nice
-    //indexPtr.p->indexTriggerId[triggerNo] = conf->triggerId;
+    // connect trigger id to index
+    indexPtr.p->indexTriggerId[triggerNo] = conf->triggerId;
 
     alterIndexPtr.p->m_triggerNo = triggerNo + 1;
   } else {
@@ -13404,66 +13402,41 @@
 void
 Dbdict::alterIndex_toDropTrigger(Signal* signal, SchemaOpPtr op_ptr)
 {
-  ndbrequire(false);
-#if wl3600_todo
-  ndbrequire(false);
-  jam();
+  D("alterIndex_toDropTrigger");
+
+  SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
+  AlterIndexDataPtr alterIndexPtr;
+  getOpData(op_ptr, alterIndexPtr);
+  const AlterIndxImplReq* impl_req = &alterIndexPtr.p->m_request;
+
   TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  // start drop of index triggers
-  DropTrigReq* const req = (DropTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(DropTrigReq::RT_ALTER_INDEX);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  req->setTableId(opPtr.p->m_request.getTableId());
-  req->setIndexId(opPtr.p->m_request.getIndexId());
-  req->setTriggerInfo(0);       // not used
-  opPtr.p->m_triggerCounter = 0;
-  if (indexPtr.p->isHashIndex()) {
-    // insert
-    req->setTriggerId(indexPtr.p->insertTriggerId);
-    sendSignal(reference(), GSN_DROP_TRIG_REQ, 
-        signal, DropTrigReq::SignalLength, JBB);
-    opPtr.p->m_triggerCounter++;
-    // update
-    req->setTriggerId(indexPtr.p->updateTriggerId);
-    sendSignal(reference(), GSN_DROP_TRIG_REQ, 
-        signal, DropTrigReq::SignalLength, JBB);
-    opPtr.p->m_triggerCounter++;
-    // delete
-    req->setTriggerId(indexPtr.p->deleteTriggerId);
-    sendSignal(reference(), GSN_DROP_TRIG_REQ, 
-        signal, DropTrigReq::SignalLength, JBB);
-    opPtr.p->m_triggerCounter++;
-    // build
-    if (indexPtr.p->buildTriggerId != RNIL) {
-      req->setTriggerId(indexPtr.p->buildTriggerId);
-      sendSignal(reference(), GSN_DROP_TRIG_REQ, 
-          signal, DropTrigReq::SignalLength, JBB);
-      opPtr.p->m_triggerCounter++;
-    }
-    return;
-  }
-  if (indexPtr.p->isOrderedIndex()) {
-    // custom
-    req->addRequestFlag(RequestFlag::RF_NOTCTRIGGER);
-    req->setTriggerId(indexPtr.p->customTriggerId);
-    sendSignal(reference(), GSN_DROP_TRIG_REQ, 
-        signal, DropTrigReq::SignalLength, JBB);
-    opPtr.p->m_triggerCounter++;
-    return;
-  }
-  ndbrequire(false);
-#endif
+  c_tableRecordPool.getPtr(indexPtr, impl_req->indexId);
+
+  // drop order is same as create order
+  const Uint32 triggerNo = alterIndexPtr.p->m_triggerNo;
+  const TriggerTmpl& triggerTmpl = alterIndexPtr.p->m_triggerTmpl[triggerNo];
+
+  DropTrigReq* req = (DropTrigReq*)signal->getDataPtrSend();
+
+  req->clientRef = reference();
+  req->clientData = op_ptr.p->op_key;
+  req->transId = trans_ptr.p->m_transId;
+  req->transKey = trans_ptr.p->trans_key;
+  req->requestType = 0;
+  req->tableId = impl_req->tableId;
+  req->tableVersion = impl_req->tableVersion;
+  req->indexId = impl_req->indexId;
+  req->indexVersion = impl_req->indexVersion;
+  req->triggerId = indexPtr.p->indexTriggerId[triggerNo];
+
+  sendSignal(reference(), GSN_DROP_TRIG_REQ, signal,
+             DropTrigReq::SignalLength, JBB);
 }
 
 void
 Dbdict::alterIndex_fromDropTrigger(Signal* signal, Uint32 op_key, Uint32 ret)
 {
-  ndbrequire(false);
-#if wl3600_todo
-  D("alterIndex_fromCreateTrigger" << hex << V(op_key) << dec <<
V(ret));
+  D("alterIndex_fromDropTrigger" << hex << V(op_key) << dec <<
V(ret));
 
   SchemaOpPtr op_ptr;
   AlterIndexDataPtr alterIndexPtr;
@@ -13479,23 +13452,23 @@
   Uint32 errorCode = 0;
   if (ret == 0) {
     jam();
-    const CreateTrigConf* conf =
-      (const CreateTrigConf*)signal->getDataPtr();
+    const DropTrigConf* conf =
+      (const DropTrigConf*)signal->getDataPtr();
 
     ndbrequire(conf->transId == trans_ptr.p->m_transId);
 
     const Uint32 triggerNo = alterIndexPtr.p->m_triggerNo;
     ndbrequire(triggerNo < alterIndexPtr.p->m_triggerCount);
 
-    // connect trigger id to index wl3600_todo array would be nice
-    //indexPtr.p->indexTriggerId[triggerNo] = conf->triggerId;
+    // disconnect trigger id from index
+    indexPtr.p->indexTriggerId[triggerNo] = RNIL;
 
     alterIndexPtr.p->m_triggerNo = triggerNo + 1;
   } else {
     ndbrequire(false);//TODO
     jam();
-    const CreateTrigRef* ref =
-      (const CreateTrigRef*)signal->getDataPtr();
+    const DropTrigRef* ref =
+      (const DropTrigRef*)signal->getDataPtr();
 
     ndbrequire(ref->transId == trans_ptr.p->m_transId);
     ndbrequire(ref->errorCode != 0);
@@ -13503,7 +13476,6 @@
   }
 
   createSubOps(signal, op_ptr);
-#endif
 }
 
 void
@@ -14552,6 +14524,8 @@
 void
 Dbdict::buildIndex_toDropConstr(Signal* signal, OpBuildIndexPtr opPtr)
 {
+  ndbrequire(false);
+#if wl3600_todo
   jam();
   TableRecordPtr indexPtr;
   c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
@@ -14567,6 +14541,7 @@
   req->setTriggerInfo(0);       // not used
   sendSignal(reference(), GSN_DROP_TRIG_REQ,
       signal, DropTrigReq::SignalLength, JBB);
+#endif
 }
 
 void
@@ -15535,10 +15510,101 @@
  * MODULE: Drop trigger.
  */
 
+// MODULE: DropTrigger
+
+const Dbdict::OpInfo
+Dbdict::DropTriggerData::g_opInfo = {
+  GSN_DROP_TRIG_IMPL_REQ,
+  DropTrigImplReq::SignalLength,
+  //
+  &Dbdict::dropTrigger_seize,
+  &Dbdict::dropTrigger_release,
+  //
+  &Dbdict::dropTrigger_parse,
+  &Dbdict::dropTrigger_parseCommon,
+  &Dbdict::dropTrigger_subOps,
+  &Dbdict::dropTrigger_reply,
+  //
+  &Dbdict::dropTrigger_prepare,
+  &Dbdict::dropTrigger_commit
+};
+
+bool
+Dbdict::dropTrigger_seize(SchemaOpPtr op_ptr)
+{
+  return seizeOpData<DropTriggerData>(op_ptr);
+}
+
+void
+Dbdict::dropTrigger_release(SchemaOpPtr op_ptr)
+{
+  releaseOpData<DropTriggerData>(op_ptr);
+}
+
 void
 Dbdict::execDROP_TRIG_REQ(Signal* signal) 
 {
   jamEntry();
+  if (!assembleFragments(signal)) {
+    jam();
+    return;
+  }
+
+  const DropTrigReq reqData =
+    *(const DropTrigReq*)signal->getDataPtr();
+  const DropTrigReq* req = &reqData;
+
+  ErrorInfo error;
+  do {
+    SchemaOpPtr op_ptr;
+    DropTriggerDataPtr dropTriggerPtr;
+
+    checkClientReq<DropTriggerData, DropTrigReq>(signal, op_ptr, error);
+    if (hasError(error)) {
+      jam();
+      break;
+    }
+    getOpData(op_ptr, dropTriggerPtr);
+
+    DropTrigImplReq* impl_req = &dropTriggerPtr.p->m_request;
+    impl_req->senderRef = reference();
+    impl_req->senderData = op_ptr.p->op_key;
+    impl_req->requestType = req->requestType;
+    impl_req->tableId = req->tableId;
+    impl_req->tableVersion = req->tableVersion;
+    impl_req->indexId = req->indexId;
+    impl_req->indexVersion = req->indexVersion;
+    impl_req->triggerId = req->triggerId;
+    impl_req->triggerInfo = ~(Uint32)0;
+
+    dropTrigger_parseCommon(signal, op_ptr, error);
+    if (hasError(error)) {
+      jam();
+      break;
+    }
+
+    schemaTrans_sendParseReq(signal, op_ptr);
+    return;
+  } while (0);
+
+  releaseSections(signal);
+
+  DropTrigRef* ref = (DropTrigRef*)signal->getDataPtrSend();
+
+  //wl3600_todo too many fields
+  ref->senderRef = reference();
+  ref->clientData = req->clientData;
+  ref->transId = req->transId;
+  ref->requestType = req->requestType;
+  ref->tableId = req->tableId;
+  ref->indexId = req->indexId;
+  getError(error, ref);
+
+  sendSignal(req->clientRef, GSN_DROP_TRIG_REF, signal,
+             DropTrigRef::SignalLength, JBB);
+
+#if wl3600_todo //parts to dropTrigger_parseCommon
+  jamEntry();
   DropTrigReq* const req = (DropTrigReq*)signal->getDataPtrSend();
   OpDropTriggerPtr opPtr;
   const Uint32 senderRef = signal->senderBlockRef();
@@ -15662,22 +15728,175 @@
   opPtr.p->m_errorCode = DropTrigRef::BadRequestType;
   opPtr.p->m_errorLine = __LINE__;
   dropTrigger_sendReply(signal,  opPtr, true);
+#endif
+}
+
+void
+Dbdict::dropTrigger_parse(Signal* signal, SchemaTransPtr trans_ptr)
+{
+  jam();
+  D("dropTrigger_parse");
+  parseClientReq<DropTriggerData, DropTrigImplReq>(signal, trans_ptr);
+}
+
+void
+Dbdict::dropTrigger_parseCommon(Signal* signal, SchemaOpPtr op_ptr,
+                                ErrorInfo& error)
+{
+  D("dropTrigger_parseCommon" << V(op_ptr.i) << *op_ptr.p);
+
+  DropTriggerDataPtr dropTriggerPtr;
+  getOpData(op_ptr, dropTriggerPtr);
+  DropTrigImplReq* impl_req = &dropTriggerPtr.p->m_request;
+
+  ndbrequire(impl_req->senderRef == numberToRef(DBDICT, c_masterNodeId));
+  ndbrequire(impl_req->senderData == op_ptr.p->op_key);
+
+  // save name if any wl3600_todo use a requestType for this
+  if (signal->getNoOfSections() > 0) {
+    jam();
+    ndbrequire(signal->getNoOfSections() == 1);
+
+    SegmentedSectionPtr ss_ptr;
+    signal->getSection(ss_ptr, DropTrigImplReq::TRIGGER_NAME_SECTION);
+    SimplePropertiesSectionReader r(ss_ptr, getSectionSegmentPool());
+    DictTabInfo::Table tableDesc;
+    tableDesc.init();
+    SimpleProperties::UnpackStatus status =
+      SimpleProperties::unpack(
+          r, &tableDesc,
+          DictTabInfo::TableMapping, DictTabInfo::TableMappingSize,
+          true, true);
+
+    if (status != SimpleProperties::Eof ||
+        tableDesc.TableName[0] == 0) {
+      jam();
+      setError(error, DropTrigRef::InvalidName, __LINE__);
+      return;
+    }
+    const Uint32 bytesize = sizeof(dropTriggerPtr.p->m_triggerName);
+    memcpy(dropTriggerPtr.p->m_triggerName, tableDesc.TableName, bytesize);
+
+#if wl3600_todo // do object stuff later
+    DictObject * obj_ptr_p = get_object(triggerName);
+    if (obj_ptr_p == 0){
+      jam();
+      req->setTriggerId(RNIL);
+    } else {
+      jam();
+      //ndbout_c("++++++++++ Found trigger %s", triggerPtr.p->triggerName);
+      TriggerRecordPtr triggerPtr;
+      c_triggerRecordPool.getPtr(triggerPtr, obj_ptr_p->m_id);
+      req->setTriggerId(triggerPtr.p->triggerId);
+      req->setTableId(triggerPtr.p->tableId);
+    }
+#endif
+  }
+
+  // check the table wl3600_todo
+  // check the index if any wl3600_todo
+
+  // check the trigger
+  {
+    const Uint32 triggerId = impl_req->triggerId;
+    if (! (impl_req->triggerId < c_triggerRecordPool.getSize())) {
+      jam();
+      setError(error, DropTrigImplRef::TriggerNotFound, __LINE__);
+      return;
+    }
+    // wl3600_todo state check
+  }
+}
+
+bool
+Dbdict::dropTrigger_subOps(Signal* signal, SchemaOpPtr op_ptr)
+{
+  D("dropTrigger_subOps" << V(op_ptr.i) << *op_ptr.p);
+  return false;
+}
+
+void
+Dbdict::dropTrigger_reply(Signal* signal, SchemaOpPtr op_ptr)
+{
+  const OpInfo& info = getOpInfo(op_ptr);
+
+  SchemaTransPtr& trans_ptr = op_ptr.p->m_trans_ptr;
+  DropTriggerDataPtr dropTriggerPtr;
+  getOpData(op_ptr, dropTriggerPtr);
+  const DropTrigImplReq* impl_req = &dropTriggerPtr.p->m_request;
+
+  TableRecordPtr triggerPtr;
+  c_tableRecordPool.getPtr(triggerPtr, dropTriggerPtr.p->m_request.triggerId);
+
+  DropTrigConf* conf = (DropTrigConf*)signal->getDataPtrSend();
+  conf->senderRef = reference();
+  conf->clientData = op_ptr.p->m_clientData;
+  conf->transId = trans_ptr.p->m_transId;
+  conf->requestType = impl_req->requestType;
+  conf->tableId = impl_req->tableId;
+  conf->indexId = impl_req->indexId;
+  conf->triggerId = impl_req->triggerId;
+
+  D("dropTrigger_reply" << V(conf->triggerId));
+
+  Uint32 clientRef = op_ptr.p->m_clientRef;
+  sendSignal(clientRef, GSN_DROP_TRIG_CONF, signal,
+             DropTrigConf::SignalLength, JBB);
+}
+
+void
+Dbdict::dropTrigger_prepare(Signal* signal, SchemaOpPtr op_ptr,
+                            Uint32 repeat)
+{
+  jam();
+  D("dropTrigger_prepare");
+
+  schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr, 0);
+}
+
+void
+Dbdict::dropTrigger_commit(Signal* signal, SchemaOpPtr op_ptr,
+                           Uint32 repeat)
+{
+  jam();
+  D("dropTrigger_commit");
+
+  schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr, 0);
 }
 
 void
 Dbdict::execDROP_TRIG_CONF(Signal* signal) 
 {
   jamEntry();
-  DropTrigConf* conf = (DropTrigConf*)signal->getDataPtrSend();
-  dropTrigger_recvReply(signal, conf, 0);
+  ndbrequire(signal->getNoOfSections() == 0);
+
+  const DropTrigConf* conf =
+    (const DropTrigConf*)signal->getDataPtr();
+
+  D("execDROP_TRIG_CONF" << hex << V(conf->clientData));
+
+  // the main operation e.g. alter index
+  SchemaOpPtr op_ptr;
+  findSchemaOp(op_ptr, conf->clientData);
+  execute(signal, op_ptr.p->m_callback, 0);
 }
 
 void
 Dbdict::execDROP_TRIG_REF(Signal* signal) 
 {
   jamEntry();
-  DropTrigRef* ref = (DropTrigRef*)signal->getDataPtrSend();
-  dropTrigger_recvReply(signal, ref->getConf(), ref);
+  ndbrequire(signal->getNoOfSections() == 0);
+
+  const DropTrigRef* ref =
+    (const DropTrigRef*)signal->getDataPtr();
+
+  D("execDROP_TRIG_REF" << hex << V(ref->clientData)
+                          << dec << V(ref->errorCode));
+
+  SchemaOpPtr op_ptr;
+  findSchemaOp(op_ptr, ref->clientData);
+  ndbrequire(ref->errorCode != 0);
+  execute(signal, op_ptr.p->m_callback, ref->errorCode);
 }
 
 void
@@ -15757,14 +15976,19 @@
 }
 
 void
-Dbdict::dropTrigger_slavePrepare(Signal* signal, OpDropTriggerPtr opPtr)
+Dbdict::dropTrigger_slavePrepare(Signal* signal, DropTriggerDataPtr opPtr)
 {
+  ndbrequire(false);
+#if wl3600_todo
   jam();
+#endif
 }
 
 void
-Dbdict::dropTrigger_toAlterTrigger(Signal* signal, OpDropTriggerPtr opPtr)
+Dbdict::dropTrigger_toAlterTrigger(Signal* signal, DropTriggerDataPtr opPtr)
 {
+  ndbrequire(false);
+#if wl3600_todo
   jam();
   AlterTrigReq* req = (AlterTrigReq*)signal->getDataPtrSend();
   req->setUserRef(reference());
@@ -15778,20 +16002,26 @@
   req->setReceiverRef(0);
   sendSignal(reference(), GSN_ALTER_TRIG_REQ,
       signal, AlterTrigReq::SignalLength, JBB);
+#endif
 }
 
 void
-Dbdict::dropTrigger_fromAlterTrigger(Signal* signal, OpDropTriggerPtr opPtr)
+Dbdict::dropTrigger_fromAlterTrigger(Signal* signal, DropTriggerDataPtr opPtr)
 {
+  ndbrequire(false);
+#if wl3600_todo
   jam();
   // remove in all
   opPtr.p->m_requestType = DropTrigReq::RT_DICT_COMMIT;
   dropTrigger_sendSlaveReq(signal, opPtr);
+#endif
 }
 
 void
-Dbdict::dropTrigger_sendSlaveReq(Signal* signal, OpDropTriggerPtr opPtr)
+Dbdict::dropTrigger_sendSlaveReq(Signal* signal, DropTriggerDataPtr opPtr)
 {
+  ndbrequire(false);
+#if wl3600_todo
   DropTrigReq* const req = (DropTrigReq*)signal->getDataPtrSend();
   *req = opPtr.p->m_request;
   req->setUserRef(opPtr.p->m_coordinatorRef);
@@ -15802,10 +16032,11 @@
   NodeReceiverGroup rg(DBDICT, c_aliveNodes);
   sendSignal(rg, GSN_DROP_TRIG_REQ,
       signal, DropTrigReq::SignalLength, JBB);
+#endif
 }
 
 void
-Dbdict::dropTrigger_slaveCommit(Signal* signal, OpDropTriggerPtr opPtr)
+Dbdict::dropTrigger_slaveCommit(Signal* signal, DropTriggerDataPtr opPtr)
 {
   ndbrequire(false);
 #if wl3600_todo
@@ -15857,15 +16088,20 @@
 }
 
 void
-Dbdict::dropTrigger_slaveAbort(Signal* signal, OpDropTriggerPtr opPtr)
+Dbdict::dropTrigger_slaveAbort(Signal* signal, DropTriggerDataPtr opPtr)
 {
+  ndbrequire(false);
+#if wl3600_todo
   jam();
+#endif
 }
 
 void
-Dbdict::dropTrigger_sendReply(Signal* signal, OpDropTriggerPtr opPtr,
+Dbdict::dropTrigger_sendReply(Signal* signal, DropTriggerDataPtr opPtr,
     bool toUser)
 {
+  ndbrequire(false);
+#if wl3600_todo
   DropTrigRef* rep = (DropTrigRef*)signal->getDataPtrSend();
   Uint32 gsn = GSN_DROP_TRIG_CONF;
   Uint32 length = DropTrigConf::InternalLength;
@@ -15897,6 +16133,7 @@
     length = CreateTrigRef::SignalLength;
   }
   sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
+#endif
 }
 
 /**
@@ -19269,6 +19506,7 @@
   &Dbdict::DropIndexData::g_opInfo,
   &Dbdict::AlterIndexData::g_opInfo,
   &Dbdict::CreateTriggerData::g_opInfo,
+  &Dbdict::DropTriggerData::g_opInfo,
   0
 };
 

--- 1.61/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2007-01-16 12:39:54 +01:00
+++ 1.62/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2007-01-17 15:21:24 +01:00
@@ -55,6 +55,7 @@
 #include <signaldata/CreateTrig.hpp>//wl3600_todo client sigs not used in .hpp
 #include <signaldata/CreateTrigImpl.hpp>
 #include <signaldata/DropTrig.hpp>
+#include <signaldata/DropTrigImpl.hpp>
 #include <signaldata/AlterTrig.hpp>
 #include <signaldata/DictLock.hpp>
 #include "SchemaFile.hpp"
@@ -371,6 +372,8 @@
     Uint32 updateTriggerId;
     Uint32 customTriggerId;     // ordered index
     Uint32 buildTriggerId;      // temp during build
+    // wl3600_todo replace by array
+    Uint32 indexTriggerId[3];
 
     /**  Index state in other blocks on this node */
     enum IndexLocal {
@@ -2498,6 +2501,7 @@
 #endif
     }
     void setError(const DropTrigRef* ref) {
+#if wl3600_todo
       m_lastError = BuildIndxRef::NoError;
       if (ref != 0) {
         m_lastError = (BuildIndxRef::ErrorCode)ref->getErrorCode();
@@ -2507,6 +2511,7 @@
           m_errorNode = ref->getErrorNode();
         }
       }
+#endif
     }
   };
   typedef Ptr<OpBuildIndex> OpBuildIndexPtr;
@@ -2732,12 +2737,32 @@
   void createTrigger_toAlterTrigger(Signal*, SchemaOpPtr);
   void createTrigger_fromAlterTrigger(Signal*, Uint32 op_key, Uint32 ret);
 
-  /**
-   * Operation record for drop trigger.
-   */
-  struct OpDropTrigger : OpRecordCommon {
-    // original request
-    DropTrigReq m_request;
+  // MODULE: DropTrigger
+
+  struct DropTriggerData : public  OpData {
+    DropTrigImplReq m_request;
+    char m_triggerName[MAX_TAB_NAME_SIZE];
+
+    // reflection
+    static const OpInfo g_opInfo;
+
+    static ArrayPool<Dbdict::DropTriggerData>&
+    getPool(Dbdict* dict) {
+      return dict->c_dropTriggerDataPool;
+    }
+
+    // sub-operation counters
+    bool m_sub_alter_trigger;
+
+    DropTriggerData() :
+      OpData(g_opInfo, (Uint32*)&m_request) {
+      memset(&m_request, 0, sizeof(m_request));
+      memset(m_triggerName, 0, sizeof(m_triggerName));
+      m_sub_alter_trigger = false;
+    }
+
+    //wl3600_todo rest out
+
     // coordinator DICT
     Uint32 m_coordinatorRef;
     bool m_isMaster;
@@ -2752,6 +2777,7 @@
     // counters
     SignalCounter m_signalCounter;
     // ctor
+#if wl3600_todo
     OpDropTrigger() {
       memset(&m_request, 0, sizeof(m_request));
       m_coordinatorRef = 0;
@@ -2762,10 +2788,13 @@
       m_errorLine = 0;
       m_errorNode = 0;
     }
+#endif
     void save(const DropTrigReq* req) {
+#if wl3600_todo
       m_request = *req;
       m_requestType = req->getRequestType();
       m_requestFlag = req->getRequestFlag();
+#endif
     }
     bool hasLastError() {
       return m_lastError != DropTrigRef::NoError;
@@ -2774,6 +2803,7 @@
       return m_errorCode != DropTrigRef::NoError;
     }
     void setError(const DropTrigRef* ref) {
+#if wl3600_todo
       m_lastError = DropTrigRef::NoError;
       if (ref != 0) {
         m_lastError = ref->getErrorCode();
@@ -2783,8 +2813,10 @@
           m_errorNode = ref->getErrorNode();
         }
       }
+#endif
     }
     void setError(const AlterTrigRef* ref) {
+#if wl3600_todo
       m_lastError = DropTrigRef::NoError;
       if (ref != 0) {
         m_lastError = (DropTrigRef::ErrorCode)ref->getErrorCode();
@@ -2794,9 +2826,28 @@
           m_errorNode = ref->getErrorNode();
         }
       }
+#endif
     }
   };
-  typedef Ptr<OpDropTrigger> OpDropTriggerPtr;
+
+  typedef Ptr<DropTriggerData> DropTriggerDataPtr;
+  ArrayPool<DropTriggerData> c_dropTriggerDataPool;
+
+  // OpInfo
+  bool dropTrigger_seize(SchemaOpPtr);
+  void dropTrigger_release(SchemaOpPtr);
+  //
+  void dropTrigger_parse(Signal*, SchemaTransPtr);
+  void dropTrigger_parseCommon(Signal*, SchemaOpPtr, ErrorInfo&);
+  bool dropTrigger_subOps(Signal*, SchemaOpPtr);
+  void dropTrigger_reply(Signal*, SchemaOpPtr);
+  //
+  void dropTrigger_prepare(Signal*, SchemaOpPtr, Uint32 repeat);
+  void dropTrigger_commit(Signal*, SchemaOpPtr, Uint32 repeat);
+
+  // sub-ops
+  void dropTrigger_toAlterTrigger(Signal*, SchemaOpPtr);
+  void dropTrigger_fromAlterTrigger(Signal*, Uint32 op_key, Uint32 ret);
 
   /**
    * Operation record for alter trigger.
@@ -2866,6 +2917,7 @@
 #endif
     }
     void setError(const DropTrigRef* ref) {
+#if wl3600_todo
       m_lastError = AlterTrigRef::NoError;
       if (ref != 0) {
         m_lastError = (AlterTrigRef::ErrorCode)ref->getErrorCode();
@@ -2875,6 +2927,7 @@
           m_errorNode = ref->getErrorNode();
         }
       }
+#endif
     }
   };
   typedef Ptr<OpAlterTrigger> OpAlterTriggerPtr;
@@ -2945,7 +2998,6 @@
   STATIC_CONST( opSubEventSize = sizeof(OpSubEvent) );
   STATIC_CONST( opDropEventSize = sizeof(OpDropEvent) );
   STATIC_CONST( opSignalUtilSize = sizeof(OpSignalUtil) );
-  STATIC_CONST( opDropTriggerSize = sizeof(OpDropTrigger) );
   STATIC_CONST( opAlterTriggerSize = sizeof(OpAlterTrigger) );
   STATIC_CONST( opCreateObjSize = sizeof(OpCreateObj) );
 private:
@@ -2957,7 +3009,6 @@
     Uint32 u_opDropEvent    [PTR_ALIGN(opDropEventSize)];
     Uint32 u_opSignalUtil   [PTR_ALIGN(opSignalUtilSize)];
     Uint32 u_opBuildIndex   [PTR_ALIGN(opBuildIndexSize)];
-    Uint32 u_opDropTrigger  [PTR_ALIGN(opDropTriggerSize)];
     Uint32 u_opAlterTrigger [PTR_ALIGN(opAlterTriggerSize)];
     Uint32 u_opCreateObj    [PTR_ALIGN(opCreateObjSize)];
     Uint32 nextPool;
@@ -2971,7 +3022,6 @@
   KeyTable2C<OpSubEvent, OpRecordUnion> c_opSubEvent;
   KeyTable2C<OpDropEvent, OpRecordUnion> c_opDropEvent;
   KeyTable2C<OpSignalUtil, OpRecordUnion> c_opSignalUtil;
-  KeyTable2<OpDropTrigger, OpRecordUnion> c_opDropTrigger;
   KeyTable2<OpAlterTrigger, OpRecordUnion> c_opAlterTrigger;
   KeyTable2<SchemaOperation, OpRecordUnion> c_schemaOperation; 
   KeyTable2<SchemaTransaction, OpRecordUnion> c_Trans;
@@ -3349,13 +3399,13 @@
   // drop trigger
   void dropTrigger_recvReply(Signal* signal, const DropTrigConf* conf,
       const DropTrigRef* ref);
-  void dropTrigger_slavePrepare(Signal* signal, OpDropTriggerPtr opPtr);
-  void dropTrigger_toAlterTrigger(Signal* signal, OpDropTriggerPtr opPtr);
-  void dropTrigger_fromAlterTrigger(Signal* signal, OpDropTriggerPtr opPtr);
-  void dropTrigger_slaveCommit(Signal* signal, OpDropTriggerPtr opPtr);
-  void dropTrigger_slaveAbort(Signal* signal, OpDropTriggerPtr opPtr);
-  void dropTrigger_sendSlaveReq(Signal* signal, OpDropTriggerPtr opPtr);
-  void dropTrigger_sendReply(Signal* signal, OpDropTriggerPtr opPtr, bool);
+  void dropTrigger_slavePrepare(Signal* signal, DropTriggerDataPtr opPtr);
+  void dropTrigger_toAlterTrigger(Signal* signal, DropTriggerDataPtr opPtr);
+  void dropTrigger_fromAlterTrigger(Signal* signal, DropTriggerDataPtr opPtr);
+  void dropTrigger_slaveCommit(Signal* signal, DropTriggerDataPtr opPtr);
+  void dropTrigger_slaveAbort(Signal* signal, DropTriggerDataPtr opPtr);
+  void dropTrigger_sendSlaveReq(Signal* signal, DropTriggerDataPtr opPtr);
+  void dropTrigger_sendReply(Signal* signal, DropTriggerDataPtr opPtr, bool);
   // alter trigger
   void alterTrigger_recvReply(Signal* signal, const AlterTrigConf* conf,
       const AlterTrigRef* ref);

--- 1.57/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2007-01-16 12:39:54 +01:00
+++ 1.58/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp	2007-01-17 15:21:24 +01:00
@@ -2180,9 +2180,9 @@
   void execCREATE_TRIG_IMPL_REF(Signal* signal);
   void execCREATE_TRIG_IMPL_REQ(Signal* signal);
 
-  void execDROP_TRIG_CONF(Signal* signal);
-  void execDROP_TRIG_REF(Signal* signal);
-  void execDROP_TRIG_REQ(Signal* signal);
+  void execDROP_TRIG_IMPL_CONF(Signal* signal);
+  void execDROP_TRIG_IMPL_REF(Signal* signal);
+  void execDROP_TRIG_IMPL_REQ(Signal* signal);
 
   void execPREP_DROP_TAB_REQ(Signal* signal);
   void execWAIT_DROP_TAB_REQ(Signal* signal);

--- 1.22/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp	2007-01-16 12:39:54 +01:00
+++ 1.23/storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp	2007-01-17 15:21:24 +01:00
@@ -199,9 +199,9 @@
   addRecSignal(GSN_CREATE_TRIG_IMPL_CONF, &Dblqh::execCREATE_TRIG_IMPL_CONF);
   addRecSignal(GSN_CREATE_TRIG_IMPL_REF, &Dblqh::execCREATE_TRIG_IMPL_REF);
 
-  addRecSignal(GSN_DROP_TRIG_REQ, &Dblqh::execDROP_TRIG_REQ);
-  addRecSignal(GSN_DROP_TRIG_CONF, &Dblqh::execDROP_TRIG_CONF);
-  addRecSignal(GSN_DROP_TRIG_REF, &Dblqh::execDROP_TRIG_REF);
+  addRecSignal(GSN_DROP_TRIG_IMPL_REQ, &Dblqh::execDROP_TRIG_IMPL_REQ);
+  addRecSignal(GSN_DROP_TRIG_IMPL_CONF, &Dblqh::execDROP_TRIG_IMPL_CONF);
+  addRecSignal(GSN_DROP_TRIG_IMPL_REF, &Dblqh::execDROP_TRIG_IMPL_REF);
 
   addRecSignal(GSN_DUMP_STATE_ORD, &Dblqh::execDUMP_STATE_ORD);
   addRecSignal(GSN_NODE_FAILREP, &Dblqh::execNODE_FAILREP);

--- 1.129/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-01-16 12:39:54 +01:00
+++ 1.130/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-01-17 15:21:24 +01:00
@@ -18875,29 +18875,29 @@
 }
 
 void
-Dblqh::execDROP_TRIG_REQ(Signal* signal)
+Dblqh::execDROP_TRIG_IMPL_REQ(Signal* signal)
 {
   jamEntry();
 
-  sendSignal(DBTUP_REF, GSN_DROP_TRIG_REQ, signal,
+  sendSignal(DBTUP_REF, GSN_DROP_TRIG_IMPL_REQ, signal,
              DropTrigReq::SignalLength, JBB);
 }
 
 void
-Dblqh::execDROP_TRIG_CONF(Signal* signal)
+Dblqh::execDROP_TRIG_IMPL_CONF(Signal* signal)
 {
   jamEntry();
 
-  sendSignal(DBDICT_REF, GSN_DROP_TRIG_CONF, signal,
+  sendSignal(DBDICT_REF, GSN_DROP_TRIG_IMPL_CONF, signal,
              DropTrigConf::SignalLength, JBB);
 }
 
 void
-Dblqh::execDROP_TRIG_REF(Signal* signal)
+Dblqh::execDROP_TRIG_IMPL_REF(Signal* signal)
 {
   jamEntry();
 
-  sendSignal(DBDICT_REF, GSN_DROP_TRIG_REF, signal,
+  sendSignal(DBDICT_REF, GSN_DROP_TRIG_IMPL_REF, signal,
              DropTrigRef::SignalLength, JBB);
 }
 

--- 1.48/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2007-01-16 12:39:54 +01:00
+++ 1.49/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2007-01-17 15:21:24 +01:00
@@ -1332,7 +1332,7 @@
   void execABORT_ALL_REQ(Signal* signal);
 
   void execCREATE_TRIG_IMPL_REQ(Signal* signal);
-  void execDROP_TRIG_REQ(Signal* signal);
+  void execDROP_TRIG_IMPL_REQ(Signal* signal);
   void execFIRE_TRIG_ORD(Signal* signal);
   void execTRIG_ATTRINFO(Signal* signal);
   void execCREATE_INDX_IMPL_REQ(Signal* signal);

--- 1.22/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp	2007-01-16 12:39:54 +01:00
+++ 1.23/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp	2007-01-17 15:21:24 +01:00
@@ -252,7 +252,7 @@
   addRecSignal(GSN_ABORT_ALL_REQ, &Dbtc::execABORT_ALL_REQ);
 
   addRecSignal(GSN_CREATE_TRIG_IMPL_REQ, &Dbtc::execCREATE_TRIG_IMPL_REQ);
-  addRecSignal(GSN_DROP_TRIG_REQ, &Dbtc::execDROP_TRIG_REQ);
+  addRecSignal(GSN_DROP_TRIG_IMPL_REQ, &Dbtc::execDROP_TRIG_IMPL_REQ);
   addRecSignal(GSN_FIRE_TRIG_ORD, &Dbtc::execFIRE_TRIG_ORD);
   addRecSignal(GSN_TRIG_ATTRINFO, &Dbtc::execTRIG_ATTRINFO);
   

--- 1.133/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2007-01-16 12:39:54 +01:00
+++ 1.134/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2007-01-17 15:21:24 +01:00
@@ -45,7 +45,7 @@
 #include <signaldata/DropTab.hpp>
 #include <signaldata/AlterTab.hpp>
 #include <signaldata/CreateTrigImpl.hpp>
-#include <signaldata/DropTrig.hpp>
+#include <signaldata/DropTrigImpl.hpp>
 #include <signaldata/FireTrigOrd.hpp>
 #include <signaldata/TrigAttrInfo.hpp>
 #include <signaldata/CreateIndxImpl.hpp>
@@ -11150,35 +11150,45 @@
              CreateTrigImplConf::SignalLength, JBB);
 }
 
-
-void Dbtc::execDROP_TRIG_REQ(Signal* signal)
+void Dbtc::execDROP_TRIG_IMPL_REQ(Signal* signal)
 {
   jamEntry();
-  DropTrigReq * const dropTrigReq =  (DropTrigReq *)&signal->theData[0];
-  BlockReference sender = signal->senderBlockRef();
+  const DropTrigImplReq
+    reqData = *(const DropTrigImplReq*)signal->getDataPtr(),
+    *req = &reqData;
 
   if (ERROR_INSERTED(8035) ||
-      (c_theDefinedTriggers.getPtr(dropTrigReq->getTriggerId())) == NULL) {
+      (c_theDefinedTriggers.getPtr(req->triggerId)) == NULL) {
     jam();
     CLEAR_ERROR_INSERT_VALUE;
     // Failed to find find trigger record
-    DropTrigRef * const dropTrigRef =  (DropTrigRef *)&signal->theData[0];
+    DropTrigImplRef* ref =
+      (DropTrigImplRef*)signal->getDataPtrSend();
+
+    ref->senderRef = reference();
+    ref->senderData = req->senderData;
+    ref->tableId = req->tableId;
+    ref->triggerId = req->triggerId;
+    ref->errorCode = DropTrigImplRef::TriggerNotFound;
 
-    dropTrigRef->setConnectionPtr(dropTrigReq->getConnectionPtr());
-    dropTrigRef->setErrorCode(DropTrigRef::TriggerNotFound);
-    sendSignal(sender, GSN_DROP_TRIG_REF, 
-               signal, DropTrigRef::SignalLength, JBB);
+    sendSignal(req->senderRef, GSN_DROP_TRIG_IMPL_REF, signal,
+               DropTrigImplRef::SignalLength, JBB);
     return;
   }
 
   // Release trigger record
-  c_theDefinedTriggers.release(dropTrigReq->getTriggerId());
+  c_theDefinedTriggers.release(req->triggerId);
 
-  DropTrigConf * const dropTrigConf =  (DropTrigConf *)&signal->theData[0];
+  DropTrigImplConf* conf =
+    (DropTrigImplConf*)signal->getDataPtr();
   
-  dropTrigConf->setConnectionPtr(dropTrigReq->getConnectionPtr());
-  sendSignal(sender, GSN_DROP_TRIG_CONF, 
-             signal, DropTrigConf::SignalLength, JBB);
+  conf->senderRef = reference();
+  conf->senderData = req->senderData;
+  conf->tableId = req->tableId;
+  conf->triggerId = req->triggerId;
+
+  sendSignal(req->senderRef, GSN_DROP_TRIG_IMPL_CONF, signal,
+             DropTrigImplConf::SignalLength, JBB);
 }
 
 void Dbtc::execCREATE_INDX_IMPL_REQ(Signal* signal)

--- 1.54/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-01-16 12:39:55 +01:00
+++ 1.55/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-01-17 15:21:24 +01:00
@@ -25,7 +25,7 @@
 #include <Bitmask.hpp>
 #include <signaldata/TupKey.hpp>
 #include <signaldata/CreateTrigImpl.hpp>
-#include <signaldata/DropTrig.hpp>
+#include <signaldata/DropTrigImpl.hpp>
 #include <signaldata/TrigAttrInfo.hpp>
 #include <signaldata/BuildIndx.hpp>
 #include "Undo_buffer.hpp"
@@ -1691,7 +1691,7 @@
 
 //------------------------------------------------------------------
 //------------------------------------------------------------------
-  void execDROP_TRIG_REQ(Signal* signal);
+  void execDROP_TRIG_IMPL_REQ(Signal* signal);
 
 // *****************************************************************
 // Support methods for ATTRINFO.
@@ -2061,7 +2061,7 @@
   bool createTrigger(Tablerec* table, const CreateTrigImplReq* req);
 
   Uint32 dropTrigger(Tablerec* table,
-		     const DropTrigReq* req,
+		     const DropTrigImplReq* req,
 		     BlockNumber sender);
 
   void

--- 1.35/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2007-01-16 12:39:55 +01:00
+++ 1.36/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2007-01-17 15:21:24 +01:00
@@ -85,7 +85,7 @@
 
   // Trigger Signals
   addRecSignal(GSN_CREATE_TRIG_IMPL_REQ, &Dbtup::execCREATE_TRIG_IMPL_REQ);
-  addRecSignal(GSN_DROP_TRIG_REQ,  &Dbtup::execDROP_TRIG_REQ);
+  addRecSignal(GSN_DROP_TRIG_IMPL_REQ,  &Dbtup::execDROP_TRIG_IMPL_REQ);
 
   addRecSignal(GSN_DROP_TAB_REQ, &Dbtup::execDROP_TAB_REQ);
 

--- 1.27/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2007-01-16 12:39:55 +01:00
+++ 1.28/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2007-01-17 15:21:24 +01:00
@@ -174,47 +174,52 @@
 }
 
 void
-Dbtup::execDROP_TRIG_REQ(Signal* signal)
+Dbtup::execDROP_TRIG_IMPL_REQ(Signal* signal)
 {
   ljamEntry();
-  BlockReference senderRef = signal->getSendersBlockRef();
-  const DropTrigReq reqCopy = *(const DropTrigReq*)signal->getDataPtr();
-  const DropTrigReq* const req = &reqCopy;
+  const DropTrigImplReq
+    reqData = *(const DropTrigImplReq*)signal->getDataPtr(),
+    *req = &reqData;
 
   // Find table
   TablerecPtr tabPtr;
-  tabPtr.i = req->getTableId();
+  tabPtr.i = req->tableId;
   ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
 
   // Drop trigger
-  Uint32 r = dropTrigger(tabPtr.p, req, refToBlock(senderRef));
+  Uint32 r = dropTrigger(tabPtr.p, req, refToBlock(req->senderRef));
   if (r == 0){
     // Send conf
-    DropTrigConf* const conf = (DropTrigConf*)signal->getDataPtrSend();
-    conf->setUserRef(senderRef);
-    conf->setConnectionPtr(req->getConnectionPtr());
-    conf->setRequestType(req->getRequestType());
-    conf->setTableId(req->getTableId());
-    conf->setIndexId(req->getIndexId());
-    conf->setTriggerId(req->getTriggerId());
-    sendSignal(senderRef, GSN_DROP_TRIG_CONF, 
-	       signal, DropTrigConf::SignalLength, JBB);
+    DropTrigImplConf* const conf =
+      (DropTrigImplConf*)signal->getDataPtrSend();
+
+    conf->senderRef = reference();
+    conf->senderData = req->senderData;
+    // wl3600_todo should we always have requestType ?
+    //conf->requestType = req->requestType;
+    conf->tableId = req->tableId;
+    conf->triggerId = req->triggerId;
+
+    sendSignal(req->senderRef, GSN_DROP_TRIG_IMPL_CONF, 
+	       signal, DropTrigImplConf::SignalLength, JBB);
   } else {
     // Send ref
-    DropTrigRef* const ref = (DropTrigRef*)signal->getDataPtrSend();
-    ref->setUserRef(senderRef);
-    ref->setConnectionPtr(req->getConnectionPtr());
-    ref->setRequestType(req->getRequestType());
-    ref->setTableId(req->getTableId());
-    ref->setIndexId(req->getIndexId());
-    ref->setTriggerId(req->getTriggerId());
-    ref->setErrorCode((DropTrigRef::ErrorCode)r);
-    ref->setErrorLine(__LINE__);
-    ref->setErrorNode(refToNode(reference()));
-    sendSignal(senderRef, GSN_DROP_TRIG_REF, 
-	       signal, DropTrigRef::SignalLength, JBB);
+    DropTrigImplRef* const ref =
+      (DropTrigImplRef*)signal->getDataPtrSend();
+    ref->senderRef = reference();
+    ref->senderData = req->senderData;
+    //ref->requestType = req->requestType;
+    ref->tableId = req->tableId;
+    ref->triggerId = req->triggerId;
+    ref->errorCode = (DropTrigImplRef::ErrorCode)r;
+    // wl3600_todo use these only in DICT ?
+    //ref->setErrorLine(__LINE__);
+    //ref->setErrorNode(refToNode(reference()));
+
+    sendSignal(req->senderRef, GSN_DROP_TRIG_IMPL_REF, 
+	       signal, DropTrigImplRef::SignalLength, JBB);
   }
-}//Dbtup::DROP_TRIG_REQ()
+}
 
 /* ---------------------------------------------------------------- */
 /* ------------------------- createTrigger ------------------------ */
@@ -303,7 +308,7 @@
     tptr.p->attributeMask = req->attributeMask;
   }
   return true;
-}//Dbtup::createTrigger()
+}
 
 bool
 Dbtup::primaryKey(Tablerec* const regTabPtr, Uint32 attrId)
@@ -325,17 +330,21 @@
 /*                                                                  */
 /* ---------------------------------------------------------------- */
 Uint32
-Dbtup::dropTrigger(Tablerec* table, const DropTrigReq* req, BlockNumber sender)
+Dbtup::dropTrigger(Tablerec* table, const DropTrigImplReq* req,
+                   BlockNumber sender)
 {
   if (ERROR_INSERTED(4004)) {
     CLEAR_ERROR_INSERT_VALUE;
     return 9999;
   }
-  Uint32 triggerId = req->getTriggerId();
+  Uint32 triggerId = req->triggerId;
 
-  TriggerType::Value ttype = req->getTriggerType();
-  TriggerActionTime::Value ttime = req->getTriggerActionTime();
-  TriggerEvent::Value tevent = req->getTriggerEvent();
+  TriggerType::Value ttype =
+    TriggerInfo::getTriggerType(req->triggerInfo);
+  TriggerActionTime::Value ttime =
+    TriggerInfo::getTriggerActionTime(req->triggerInfo);
+  TriggerEvent::Value tevent =
+    TriggerInfo::getTriggerEvent(req->triggerInfo);
 
   //  ndbout_c("Drop TupTrigger %u = %u %u %u %u by %u", triggerId, table, ttype, ttime,
tevent, sender);
 
@@ -364,8 +373,8 @@
       return 0;
     }
   }
-  return DropTrigRef::TriggerNotFound;
-}//Dbtup::dropTrigger()
+  return DropTrigImplRef::TriggerNotFound;
+}
 
 /* ---------------------------------------------------------------- */
 /* -------------- checkImmediateTriggersAfterOp ------------------ */

--- 1.50/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2007-01-16 12:39:55 +01:00
+++ 1.51/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2007-01-17 15:21:24 +01:00
@@ -35,7 +35,7 @@
 #include <signaldata/TransIdAI.hpp>
 #include <signaldata/CreateTrigImpl.hpp>
 #include <signaldata/AlterTrig.hpp>
-#include <signaldata/DropTrig.hpp>
+#include <signaldata/DropTrigImpl.hpp>
 #include <signaldata/FireTrigOrd.hpp>
 #include <signaldata/TrigAttrInfo.hpp>
 #include <signaldata/CheckNodeGroups.hpp>
@@ -2937,17 +2937,28 @@
     if(m_hasTriggerDefined[j] == 1) {
       jam();
 
-      DropTrigReq * const req = (DropTrigReq*)signal->getDataPtrSend();
-      req->setConnectionPtr(m_ptrI);
-      req->setUserRef(SUMA_REF); // Sending to myself
-      req->setRequestType(DropTrigReq::RT_USER);
-      req->setTriggerType(TriggerType::SUBSCRIPTION_BEFORE);
-      req->setTriggerActionTime(TriggerActionTime::TA_DETACHED);
-      req->setIndexId(RNIL);
-
-      req->setTableId(m_tableId);
-      req->setTriggerId(m_triggerIds[j]);
-      req->setTriggerEvent((TriggerEvent::Value)j);
+      DropTrigImplReq * const req =
+        (DropTrigImplReq*)signal->getDataPtrSend();
+      req->senderRef = SUMA_REF; // Sending to myself
+      req->senderData = m_ptrI;
+      req->requestType = 0;
+
+      // TUP needs some triggerInfo to find right list (set all)
+      // TODO fix TUP
+      Uint32 ti = 0;
+      TriggerInfo::setTriggerType(ti, TriggerType::SUBSCRIPTION_BEFORE);
+      TriggerInfo::setTriggerActionTime(ti, TriggerActionTime::TA_DETACHED);
+      TriggerInfo::setTriggerEvent(ti, (TriggerEvent::Value)j);
+      TriggerInfo::setMonitorReplicas(ti, true);
+      TriggerInfo::setMonitorAllAttributes(ti, j == TriggerEvent::TE_DELETE);
+      TriggerInfo::setReportAllMonitoredAttributes(ti, m_reportAll);
+      req->triggerInfo = ti;
+
+      req->tableId = m_tableId;
+      req->tableVersion = 0; // not used
+      req->indexId = ~(Uint32)0;
+      req->indexVersion = 0;
+      req->triggerId = m_triggerIds[j];
 
       DBUG_PRINT("info",("DROPPING trigger %u = %u %u %u on table %u[%u]",
 			 m_triggerIds[j],
@@ -2955,8 +2966,8 @@
 			 TriggerActionTime::TA_DETACHED,
 			 j,
 			 m_tableId, j));
-      suma.sendSignal(DBTUP_REF, GSN_DROP_TRIG_REQ,
-		      signal, DropTrigReq::SignalLength, JBB);
+      suma.sendSignal(DBTUP_REF, GSN_DROP_TRIG_IMPL_REQ,
+		      signal, DropTrigImplReq::SignalLength, JBB);
     } else {
       jam();
       suma.suma_ndbrequire(m_hasTriggerDefined[j] > 1);
@@ -2967,35 +2978,38 @@
 }
 
 void
-Suma::execDROP_TRIG_REF(Signal* signal){
+Suma::execDROP_TRIG_IMPL_REF(Signal* signal){
   jamEntry();
-  DBUG_ENTER("Suma::execDROP_TRIG_REF");
+  DBUG_ENTER("Suma::execDROP_TRIG_IMPL_REF");
   ndbassert(signal->getNoOfSections() == 0);
-  DropTrigRef * const ref = (DropTrigRef*)signal->getDataPtr();
-  if (ref->getErrorCode() != DropTrigRef::TriggerNotFound)
+
+  const DropTrigImplRef * const ref =
+    (const DropTrigImplRef*)signal->getDataPtr();
+  if (ref->errorCode != DropTrigImplRef::TriggerNotFound)
   {
     ndbrequire(false);
   }
   TablePtr tabPtr;
-  c_tables.getPtr(tabPtr, ref->getConnectionPtr());
-  ndbrequire(ref->getTableId() == tabPtr.p->m_tableId);
+  c_tables.getPtr(tabPtr, ref->senderData);
+  ndbrequire(ref->tableId == tabPtr.p->m_tableId);
 
-  tabPtr.p->runDropTrigger(signal, ref->getTriggerId(), *this);
+  tabPtr.p->runDropTrigger(signal, ref->triggerId, *this);
   DBUG_VOID_RETURN;
 }
 
 void
-Suma::execDROP_TRIG_CONF(Signal* signal){
+Suma::execDROP_TRIG_IMPL_CONF(Signal* signal){
   jamEntry();
-  DBUG_ENTER("Suma::execDROP_TRIG_CONF");
+  DBUG_ENTER("Suma::execDROP_TRIG_IMPL_CONF");
   ndbassert(signal->getNoOfSections() == 0);
 
-  DropTrigConf * const conf = (DropTrigConf*)signal->getDataPtr();
+  const DropTrigImplConf* const conf =
+    (const DropTrigImplConf*)signal->getDataPtr();
   TablePtr tabPtr;
-  c_tables.getPtr(tabPtr, conf->getConnectionPtr());
-  ndbrequire(conf->getTableId() == tabPtr.p->m_tableId);
+  c_tables.getPtr(tabPtr, conf->senderData);
+  ndbrequire(conf->tableId == tabPtr.p->m_tableId);
 
-  tabPtr.p->runDropTrigger(signal, conf->getTriggerId(),*this);
+  tabPtr.p->runDropTrigger(signal, conf->triggerId, *this);
   DBUG_VOID_RETURN;
 }
 

--- 1.18/storage/ndb/src/kernel/blocks/suma/Suma.hpp	2007-01-16 12:39:55 +01:00
+++ 1.19/storage/ndb/src/kernel/blocks/suma/Suma.hpp	2007-01-17 15:21:24 +01:00
@@ -102,8 +102,8 @@
    */
   void execCREATE_TRIG_IMPL_REF(Signal* signal);
   void execCREATE_TRIG_IMPL_CONF(Signal* signal);
-  void execDROP_TRIG_REF(Signal* signal);
-  void execDROP_TRIG_CONF(Signal* signal);
+  void execDROP_TRIG_IMPL_REF(Signal* signal);
+  void execDROP_TRIG_IMPL_CONF(Signal* signal);
   
   /**
    * continueb

--- 1.15/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp	2007-01-16 12:39:55 +01:00
+++ 1.16/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp	2007-01-17 15:21:24 +01:00
@@ -117,8 +117,8 @@
 
   addRecSignal(GSN_CREATE_TRIG_IMPL_REF, &Suma::execCREATE_TRIG_IMPL_REF);
   addRecSignal(GSN_CREATE_TRIG_IMPL_CONF, &Suma::execCREATE_TRIG_IMPL_CONF);
-  addRecSignal(GSN_DROP_TRIG_REF, &Suma::execDROP_TRIG_REF);
-  addRecSignal(GSN_DROP_TRIG_CONF, &Suma::execDROP_TRIG_CONF);
+  addRecSignal(GSN_DROP_TRIG_IMPL_REF, &Suma::execDROP_TRIG_IMPL_REF);
+  addRecSignal(GSN_DROP_TRIG_IMPL_CONF, &Suma::execDROP_TRIG_IMPL_CONF);
   
   addRecSignal(GSN_SUB_GCP_COMPLETE_REP, 
 	       &Suma::execSUB_GCP_COMPLETE_REP);
--- New file ---
+++ storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp	07/01/16 22:59:11
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#ifndef DROP_TRIG_IMPL_HPP
#define DROP_TRIG_IMPL_HPP

#include "SignalData.hpp"

struct DropTrigImplReq {
  friend bool printDROP_TRIG_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);

  STATIC_CONST( SignalLength = 9 );
  SECTION( TRIGGER_NAME_SECTION = 0 ); // optional
  enum xxxKeyValues {//wl3600_todo use DictTabInfo
    TriggerNameKey = 0xa1
  };

  Uint32 senderRef;
  Uint32 senderData;
  Uint32 requestType;
  Uint32 tableId;
  Uint32 tableVersion;
  Uint32 indexId;
  Uint32 indexVersion;
  Uint32 triggerId;
  Uint32 triggerInfo;
};

struct DropTrigImplConf {
  friend bool printDROP_TRIG_IMPL_CONF(FILE*, const Uint32*, Uint32, Uint16);

  STATIC_CONST( SignalLength = 4 );

  Uint32 senderRef;
  Uint32 senderData;
  Uint32 tableId;
  Uint32 triggerId;
};

struct DropTrigImplRef {
  friend bool printDROP_TRIG_IMPL_REF(FILE*, const Uint32*, Uint32, Uint16);

  enum ErrorCode {
    NoError = 0,
    Busy = 701,
    TriggerNotFound = 4238,
    BadRequestType = 4247,
    InvalidName = 4248
  };
  STATIC_CONST( SignalLength = 8 );

  Uint32 senderRef;
  Uint32 senderData;
  Uint32 tableId;
  Uint32 triggerId;
  Uint32 errorCode;
  Uint32 errorLine;
  Uint32 errorNodeId;
  Uint32 masterNodeId;
};

#endif

--- New file ---
+++ storage/ndb/src/common/debugger/signaldata/DropTrigImpl.cpp	07/01/17 03:21:20
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#include <signaldata/DropTrigImpl.hpp>

bool
printDROP_TRIG_IMPL_REQ(FILE* output, const Uint32* theData, Uint32 len, Uint16)
{
  const DropTrigImplReq* sig = (const DropTrigImplReq*)theData;
  fprintf(output, " senderRef: %x", sig->senderRef);
  fprintf(output, " senderData: %x", sig->senderData);
  fprintf(output, "\n");
  fprintf(output, " requestType: %x", sig->requestType);
  fprintf(output, " tableId: %x", sig->tableId);
  fprintf(output, " tableVersion: %x", sig->tableVersion);
  fprintf(output, " indexId: %x", sig->indexId);
  fprintf(output, " indexVersion: %x", sig->indexVersion);
  fprintf(output, "\n");
  fprintf(output, " triggerId: %x", sig->triggerId);
  fprintf(output, " triggerInfo: %x", sig->triggerInfo);
  fprintf(output, "\n");
  return true;
}

bool
printDROP_TRIG_IMPL_CONF(FILE* output, const Uint32* theData, Uint32 len, Uint16)
{
  const DropTrigImplConf* sig = (const DropTrigImplConf*) theData;
  fprintf(output, " senderRef: %x", sig->senderRef);
  fprintf(output, " senderData: %x", sig->senderData);
  fprintf(output, "\n");
  fprintf(output, " tableId: %x", sig->tableId);
  fprintf(output, " triggerId: %x", sig->triggerId);
  fprintf(output, "\n");
  return true;
}

bool
printDROP_TRIG_IMPL_REF(FILE* output, const Uint32* theData, Uint32 len, Uint16)
{
  const DropTrigImplRef * sig = (const DropTrigImplRef*) theData;
  fprintf(output, " senderRef: %x", sig->senderRef);
  fprintf(output, " senderData: %x", sig->senderData);
  fprintf(output, "\n");
  fprintf(output, " tableId: %x", sig->tableId);
  fprintf(output, " triggerId: %x", sig->triggerId);
  fprintf(output, "\n");
  fprintf(output, " errorCode: %u", sig->errorCode);
  fprintf(output, " errorLine: %u", sig->errorLine);
  fprintf(output, " errorNodeId: %u", sig->errorNodeId);
  fprintf(output, " masterNodeId: %u", sig->masterNodeId);
  fprintf(output, "\n");
  return true;
}


--- 1.17/storage/ndb/src/common/debugger/signaldata/Makefile.am	2007-01-16 12:39:54 +01:00
+++ 1.18/storage/ndb/src/common/debugger/signaldata/Makefile.am	2007-01-17 15:21:23 +01:00
@@ -28,7 +28,7 @@
 	  SchemaTrans.cpp SchemaTransImpl.cpp \
 	  GetTabInfo.cpp CreateTab.cpp DropTable.cpp \
 	  CreateIndxImpl.cpp DropIndxImpl.cpp AlterIndxImpl.cpp \
-	  CreateTrigImpl.cpp
+	  CreateTrigImpl.cpp DropTrigImpl.cpp
 
 include $(top_srcdir)/storage/ndb/config/common.mk.am
 include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am
@@ -49,6 +49,7 @@
 	@$(top_srcdir)/storage/ndb/config/win-includes $@ $(INCLUDES)
 	@$(top_srcdir)/storage/ndb/config/win-sources $@ $(libsignaldataprint_la_SOURCES)
 	@$(top_srcdir)/storage/ndb/config/win-libraries $@ LIB $(LDADD)
+
 
 
 
Thread
bk commit into 5.1 tree (pekka:1.2391)pekka17 Jan