List:Commits« Previous MessageNext Message »
From:pekka Date:March 7 2007 3:58pm
Subject:bk commit into 5.1 tree (pekka:1.2411)
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-03-07 17:58:46+02:00, pekka@stripped +13 -0
  ndb - wl#3600 remove old index+trigger code

  storage/ndb/include/kernel/signaldata/AlterIndx.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -14
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/AlterTrig.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -12
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/BuildIndx.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -13
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/BuildIndxImpl.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -13
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/CreateIndx.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -8
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/CreateTrig.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -12
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/CreateTrigImpl.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -3
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/DropIndx.hpp@stripped, 2007-03-07 17:57:20+02:00, pekka@stripped +0 -8
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/DropTrig.hpp@stripped, 2007-03-07 17:57:21+02:00, pekka@stripped +2 -15
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp@stripped, 2007-03-07 17:57:21+02:00, pekka@stripped +0 -3
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2007-03-07 17:57:21+02:00, pekka@stripped +0 -1
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-03-07 17:57:21+02:00, pekka@stripped +317 -3662
    wl#3600 remove old index+trigger code; start on build hash index constraints

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp@stripped, 2007-03-07 17:57:21+02:00, pekka@stripped +22 -690
    wl#3600 remove old index+trigger code; start on build hash index constraints

# 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-c

--- 1.7/storage/ndb/include/kernel/signaldata/AlterIndx.hpp	2007-02-19 19:09:29 +02:00
+++ 1.8/storage/ndb/include/kernel/signaldata/AlterIndx.hpp	2007-03-07 17:57:20 +02:00
@@ -24,20 +24,6 @@
 struct AlterIndxReq {
   friend bool printALTER_INDX_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum xxxRequestType {//wl3600_todo remove
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_CREATE_INDEX = 2,
-    RT_DROP_INDEX = 3,
-    RT_SYSTEMRESTART = 4,
-    RT_NODERESTART = 5,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_TC = 5 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TC = 5 << 8,
-    RT_TUX = 8 << 8
-  };
   enum RequestType {
     AlterIndexOnline = 1,
     AlterIndexOffline = 2

--- 1.4/storage/ndb/include/kernel/signaldata/AlterTrig.hpp	2007-02-19 19:09:29 +02:00
+++ 1.5/storage/ndb/include/kernel/signaldata/AlterTrig.hpp	2007-03-07 17:57:20 +02:00
@@ -22,17 +22,6 @@
 struct AlterTrigReq {
   friend bool printALTER_TRIG_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum xxxRequestType {//wl3600_todo remove
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_CREATE_TRIGGER = 2,
-    RT_DROP_TRIGGER = 3,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_TC = 5 << 4,
-    RT_DICT_LQH = 6 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4
-  };
   enum RequestType {
     AlterTriggerOnline = 1,
     AlterTriggerOffline = 2
@@ -83,7 +72,6 @@
   Uint32 errorLine;
   Uint32 errorNodeId;
   Uint32 masterNodeId;
-
 };
 
 #endif

--- 1.9/storage/ndb/include/kernel/signaldata/BuildIndx.hpp	2007-02-19 19:09:29 +02:00
+++ 1.10/storage/ndb/include/kernel/signaldata/BuildIndx.hpp	2007-03-07 17:57:20 +02:00
@@ -22,19 +22,6 @@
 struct BuildIndxReq {
   friend bool printBUILD_INDX_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum xxxRequestType { //wl3600_todo out
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_ALTER_INDEX = 2,
-    RT_SYSTEMRESTART = 3,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_TC = 5 << 4,
-    RT_DICT_TRIX = 7 << 4,
-    RT_DICT_TUX = 8 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TRIX = 7 << 8
-  };
   STATIC_CONST( SignalLength = 11 );
   STATIC_CONST( INDEX_COLUMNS = 0 );
   STATIC_CONST( KEY_COLUMNS = 1 );

--- 1.13/storage/ndb/include/kernel/signaldata/CreateIndx.hpp	2007-02-19 19:09:29 +02:00
+++ 1.14/storage/ndb/include/kernel/signaldata/CreateIndx.hpp	2007-03-07 17:57:20 +02:00
@@ -22,14 +22,6 @@
 struct CreateIndxReq {
   friend bool printCREATE_INDX_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum RequestType {//wl3600 remove
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TC = 5 << 8
-  };
   STATIC_CONST( SignalLength = 9 );
   SECTION( ATTRIBUTE_LIST_SECTION = 0 );
   SECTION( INDEX_NAME_SECTION = 1 );

--- 1.9/storage/ndb/include/kernel/signaldata/CreateTrig.hpp	2007-02-19 19:09:30 +02:00
+++ 1.10/storage/ndb/include/kernel/signaldata/CreateTrig.hpp	2007-03-07 17:57:20 +02:00
@@ -24,18 +24,6 @@
 struct CreateTrigReq {
   friend bool printCREATE_TRIG_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum xxxRequestType {//wl3600_todo remove
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_ALTER_INDEX = 2,
-    RT_BUILD_INDEX = 3,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_CREATE = 2 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TC = 5 << 8,
-    RT_LQH = 6 << 8
-  };
   enum RequestType {
     CreateTriggerOnline = 1,
     CreateTriggerOffline = 2

--- 1.7/storage/ndb/include/kernel/signaldata/DropIndx.hpp	2007-02-19 19:09:30 +02:00
+++ 1.8/storage/ndb/include/kernel/signaldata/DropIndx.hpp	2007-03-07 17:57:20 +02:00
@@ -23,14 +23,6 @@
 struct DropIndxReq {
   friend bool printDROP_INDX_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum RequestType {//wl3600_todo remove
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TC = 5 << 8
-  };
   STATIC_CONST( SignalLength = 7 );
 
   Uint32 clientRef;

--- 1.5/storage/ndb/include/kernel/signaldata/DropTrig.hpp	2007-02-19 19:09:30 +02:00
+++ 1.6/storage/ndb/include/kernel/signaldata/DropTrig.hpp	2007-03-07 17:57:21 +02:00
@@ -22,22 +22,8 @@
 struct DropTrigReq {
   friend bool printDROP_TRIG_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum RequestType {//wl3600_todo remove
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_ALTER_INDEX = 2,
-    RT_BUILD_INDEX = 3,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TC = 5 << 8,
-    RT_LQH = 6 << 8
-  };
   STATIC_CONST( SignalLength = 11 );
   SECTION( TRIGGER_NAME_SECTION = 0 ); // optional
-  enum xxxKeyValues {//wl3600_todo use DictTabInfo
-    TriggerNameKey = 0xa1
-  };
 
   Uint32 clientRef;
   Uint32 clientData;
@@ -73,7 +59,8 @@
     Busy = 701,
     TriggerNotFound = 4238,
     BadRequestType = 4247,
-    InvalidName = 4248
+    InvalidName = 4248,
+    InvalidTable =  4249
   };
   STATIC_CONST( SignalLength = 10 );
 

--- 1.33/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2007-02-18 23:51:05 +02:00
+++ 1.34/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2007-03-07 17:57:21 +02:00
@@ -454,7 +454,6 @@
 8034: Fail next index create in TC
 8035: Fail next trigger drop in TC
 8036: Fail next index drop in TC
-6006: Crash participant in create index
 
 4013: verify TUP tab descr before and after next DROP TABLE
 

--- 1.153/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-05 11:42:29 +02:00
+++ 1.154/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-07 17:57:21 +02:00
@@ -1633,8 +1633,6 @@
 
   // Index signals
   addRecSignal(GSN_CREATE_INDX_REQ, &Dbdict::execCREATE_INDX_REQ);
-  addRecSignal(GSN_CREATE_INDX_CONF, &Dbdict::execCREATE_INDX_CONF);
-  addRecSignal(GSN_CREATE_INDX_REF, &Dbdict::execCREATE_INDX_REF);
 
   addRecSignal(GSN_ALTER_INDX_REQ, &Dbdict::execALTER_INDX_REQ);
   addRecSignal(GSN_ALTER_INDX_CONF, &Dbdict::execALTER_INDX_CONF);
@@ -1647,8 +1645,6 @@
   addRecSignal(GSN_CREATE_TABLE_REF, &Dbdict::execCREATE_TABLE_REF);
 
   addRecSignal(GSN_DROP_INDX_REQ, &Dbdict::execDROP_INDX_REQ);
-  addRecSignal(GSN_DROP_INDX_CONF, &Dbdict::execDROP_INDX_CONF);
-  addRecSignal(GSN_DROP_INDX_REF, &Dbdict::execDROP_INDX_REF);
 
   addRecSignal(GSN_DROP_TABLE_CONF, &Dbdict::execDROP_TABLE_CONF);
   addRecSignal(GSN_DROP_TABLE_REF, &Dbdict::execDROP_TABLE_REF);
@@ -9821,17 +9817,8 @@
  *
  * Create index in DICT via create table operation.  Then invoke alter
  * index opearation to online the index.
- *
- * Request type in CREATE_INDX signals:
- *
- * RT_USER - from API to DICT master
- * RT_DICT_PREPARE - prepare participants
- * RT_DICT_COMMIT - commit participants
- * RT_TC - create index in TC (part of alter index operation)
  */
 
-// MODULE: CreateIndex
-
 const Dbdict::OpInfo
 Dbdict::CreateIndexData::g_opInfo = {
   GSN_CREATE_INDX_IMPL_REQ,
@@ -9921,143 +9908,6 @@
 
   sendSignal(req->clientRef, GSN_CREATE_INDX_REF, signal,
              CreateIndxRef::SignalLength, JBB);
-
-#if wl3600_todo //remove
-  jamEntry();
-  CreateIndxReq* const req = (CreateIndxReq*)signal->getDataPtrSend();
-  CreateIndexDataPtr opPtr;
-  const Uint32 senderRef = signal->senderBlockRef();
-  const CreateIndxReq::RequestType requestType = req->getRequestType();
-  if (requestType == CreateIndxReq::RT_USER) {
-    jam();
-    if (! assembleFragments(signal)) {
-      jam();
-      return;
-    }
-    if (signal->getLength() == CreateIndxReq::SignalLength) {
-      jam();
-      CreateIndxRef::ErrorCode tmperr = CreateIndxRef::NoError;
-      if (getOwnNodeId() != c_masterNodeId) {
-        jam();
-        tmperr = CreateIndxRef::NotMaster;
-      } else if (c_blockState == BS_NODE_RESTART) {
-        jam();
-        tmperr = CreateIndxRef::BusyWithNR;
-      } else if (c_blockState != BS_IDLE) {
-        jam();
-        tmperr = CreateIndxRef::Busy;
-      }
-      if (tmperr != CreateIndxRef::NoError) {
-	releaseSections(signal);
-	OpCreateIndex opBusy;
-	opPtr.p = &opBusy;
-	opPtr.p->save(req);
-	opPtr.p->m_isMaster = (senderRef == reference());
-	opPtr.p->key = 0;
-	opPtr.p->m_requestType = CreateIndxReq::RT_DICT_PREPARE;
-	opPtr.p->m_errorCode = tmperr;
-	opPtr.p->m_errorLine = __LINE__;
-	opPtr.p->m_errorNode = c_masterNodeId;
-	createIndex_sendReply(signal, opPtr, true);
-	return;
-      }
-      // forward initial request plus operation key to all
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-      sendSignal(rg, GSN_CREATE_INDX_REQ,
-          signal, CreateIndxReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == CreateIndxReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    OpCreateIndex opBusy;
-    if (! c_opCreateIndex.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = CreateIndxReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = CreateIndxRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      releaseSections(signal);
-      createIndex_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opCreateIndex.add(opPtr);
-    // save attribute list
-    SegmentedSectionPtr ssPtr;
-    signal->getSection(ssPtr, CreateIndxReq::ATTRIBUTE_LIST_SECTION);
-    SimplePropertiesSectionReader r0(ssPtr, getSectionSegmentPool());
-    r0.reset(); // undo implicit first()
-    if (! r0.getWord(&opPtr.p->m_attrList.sz) ||
-        ! r0.getWords(opPtr.p->m_attrList.id, opPtr.p->m_attrList.sz)) {
-      jam();
-      opPtr.p->m_errorCode = CreateIndxRef::InvalidName;
-      opPtr.p->m_errorLine = __LINE__;
-      releaseSections(signal);
-      createIndex_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    // save name and index table properties
-    signal->getSection(ssPtr, CreateIndxReq::INDEX_NAME_SECTION);
-    SimplePropertiesSectionReader r1(ssPtr, getSectionSegmentPool());
-    c_tableDesc.init();
-    SimpleProperties::UnpackStatus status = SimpleProperties::unpack(
-        r1, &c_tableDesc,
-        DictTabInfo::TableMapping, DictTabInfo::TableMappingSize,
-        true, true);
-    if (status != SimpleProperties::Eof) {
-      opPtr.p->m_errorCode = CreateIndxRef::InvalidName;
-      opPtr.p->m_errorLine = __LINE__;
-      releaseSections(signal);
-      createIndex_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    memcpy(opPtr.p->m_indexName, c_tableDesc.TableName, MAX_TAB_NAME_SIZE);
-    opPtr.p->m_loggedIndex = c_tableDesc.TableLoggedFlag;
-    opPtr.p->m_temporaryIndex = c_tableDesc.TableTemporaryFlag;
-    releaseSections(signal);
-    // master expects to hear from all
-    if (opPtr.p->m_isMaster)
-      opPtr.p->m_signalCounter = c_aliveNodes;
-    createIndex_slavePrepare(signal, opPtr);
-    createIndex_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opCreateIndex.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == CreateIndxReq::RT_DICT_COMMIT ||
-        requestType == CreateIndxReq::RT_DICT_ABORT) {
-      jam();
-      if (requestType == CreateIndxReq::RT_DICT_COMMIT) {
-        opPtr.p->m_request.setIndexId(req->getIndexId());
-        opPtr.p->m_request.setIndexVersion(req->getIndexVersion());
-        createIndex_slaveCommit(signal, opPtr);
-      } else {
-        createIndex_slaveAbort(signal, opPtr);
-      }
-      createIndex_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-        c_opCreateIndex.release(opPtr);
-      return;
-    }
-  }
-  jam();
-  // return to sender
-  releaseSections(signal);
-  OpCreateIndex opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = CreateIndxRef::BadRequestType;
-  opPtr.p->m_errorLine = __LINE__;
-  createIndex_sendReply(signal, opPtr, true);
-#endif
 }
 
 void
@@ -10084,15 +9934,15 @@
   // save attribute list
   AttributeList& attrList = createIndexPtr.p->m_attrList;
   {
-    SegmentedSectionPtr ssPtr;
-    signal->getSection(ssPtr, CreateIndxReq::ATTRIBUTE_LIST_SECTION);
-    SimplePropertiesSectionReader r(ssPtr, getSectionSegmentPool());
+    SegmentedSectionPtr ss_ptr;
+    signal->getSection(ss_ptr, CreateIndxReq::ATTRIBUTE_LIST_SECTION);
+    SimplePropertiesSectionReader r(ss_ptr, getSectionSegmentPool());
     r.reset(); // undo implicit first()
-    if (! r.getWord(&attrList.sz) ||
+    if (!r.getWord(&attrList.sz) ||
         r.getSize() != 1 + attrList.sz ||
         attrList.sz == 0 ||
         attrList.sz > MAX_ATTRIBUTES_IN_INDEX ||
-        ! r.getWords(attrList.id, attrList.sz)) {
+        !r.getWords(attrList.id, attrList.sz)) {
       jam();
       setError(error, CreateIndxRef::InvalidIndexType, __LINE__);
       return;
@@ -10103,9 +9953,9 @@
   Uint32& bits = createIndexPtr.p->m_bits;
   bits = TableRecord::TR_RowChecksum;
   {
-    SegmentedSectionPtr ssPtr;
-    signal->getSection(ssPtr, CreateIndxReq::INDEX_NAME_SECTION);
-    SimplePropertiesSectionReader r(ssPtr, getSectionSegmentPool());
+    SegmentedSectionPtr ss_ptr;
+    signal->getSection(ss_ptr, CreateIndxReq::INDEX_NAME_SECTION);
+    SimplePropertiesSectionReader r(ss_ptr, getSectionSegmentPool());
     DictTabInfo::Table tableDesc;
     tableDesc.init();
     SimpleProperties::UnpackStatus status =
@@ -10625,534 +10475,6 @@
   schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr);
 }
 
-void
-Dbdict::execCREATE_INDX_CONF(Signal* signal)
-{
-  ndbrequire(false);
-#if wl3600_todo //to alter index
-  jamEntry();
-  ndbrequire(signal->getNoOfSections() == 0);
-  CreateIndxConf* conf = (CreateIndxConf*)signal->getDataPtrSend();
-  createIndex_recvReply(signal, conf, 0);
-#endif
-}
-
-void
-Dbdict::execCREATE_INDX_REF(Signal* signal) 
-{
-  ndbrequire(false);
-#if wl3600_todo //to alter index
-  jamEntry();      
-  CreateIndxRef* ref = (CreateIndxRef*)signal->getDataPtrSend();
-  createIndex_recvReply(signal, ref->getConf(), ref);
-#endif
-}
-
-void
-Dbdict::createIndex_recvReply(Signal* signal, const CreateIndxConf* conf,
-    const CreateIndxRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const CreateIndxReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == CreateIndxReq::RT_TC) {
-    jam();
-    // part of alter index operation
-    AlterIndexDataPtr opPtr;
-    c_opAlterIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterIndex_fromCreateTc(signal, opPtr);
-    return;
-  }
-  CreateIndexDataPtr opPtr;
-  c_opCreateIndex.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  opPtr.p->setError(ref);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == CreateIndxReq::RT_DICT_COMMIT ||
-      requestType == CreateIndxReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    createIndex_sendReply(signal, opPtr, true);
-    c_opCreateIndex.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = CreateIndxReq::RT_DICT_ABORT;
-    createIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (requestType == CreateIndxReq::RT_DICT_PREPARE) {
-    jam();
-    // start index table create
-    createIndex_toCreateTable(signal, opPtr);
-    if (opPtr.p->hasError()) {
-      jam();
-      opPtr.p->m_requestType = CreateIndxReq::RT_DICT_ABORT;
-      createIndex_sendSlaveReq(signal, opPtr);
-      return;
-    }
-    return;
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::createIndex_slavePrepare(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  jam();
-  if (ERROR_INSERTED(6006) && ! opPtr.p->m_isMaster) {
-    ndbrequire(false);
-  }
-}
-
-#if wl3600_todo //moved to parse and sub-ops
-void
-Dbdict::createIndex_toCreateTable(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  union {
-    char tableName[MAX_TAB_NAME_SIZE];
-    char attributeName[MAX_ATTR_NAME_SIZE];
-  };
-  Uint32 k;
-  Uint32 attrid_map[MAX_ATTRIBUTES_IN_INDEX];
-
-  jam();
-  const CreateIndxReq* const req = &opPtr.p->m_request;
-  // signal data writer
-  Uint32* wbuffer = &c_indexPage.word[0];
-  LinearWriter w(wbuffer, sizeof(c_indexPage) >> 2);
-  w.first();
-  // get table being indexed
-  if (! (req->getTableId() < c_tableRecordPool.getSize())) {
-    jam();
-    opPtr.p->m_errorCode = CreateIndxRef::InvalidPrimaryTable;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  TableRecordPtr tablePtr;
-  c_tableRecordPool.getPtr(tablePtr, req->getTableId());
-  if (tablePtr.p->tabState != TableRecord::DEFINED &&
-      tablePtr.p->tabState != TableRecord::BACKUP_ONGOING) {
-    jam();
-    opPtr.p->m_errorCode = CreateIndxRef::InvalidPrimaryTable;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  if (! tablePtr.p->isTable()) {
-    jam();
-    opPtr.p->m_errorCode = CreateIndxRef::InvalidPrimaryTable;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-
-  // Check that the temporary status of index is compatible with table.
-  if (!opPtr.p->m_temporaryIndex &&
-      tablePtr.p->m_bits & TableRecord::TR_Temporary)
-  {
-    jam();
-    opPtr.p->m_errorCode= CreateIndxRef::TableIsTemporary;
-    opPtr.p->m_errorLine= __LINE__;
-    return;
-  }
-  if (opPtr.p->m_temporaryIndex &&
-      !(tablePtr.p->m_bits & TableRecord::TR_Temporary))
-  {
-    // This could be implemented later, but mysqld does currently not detect
-    // that the index disappears after SR, and it appears not too useful.
-    jam();
-    opPtr.p->m_errorCode= CreateIndxRef::TableIsNotTemporary;
-    opPtr.p->m_errorLine= __LINE__;
-    return;
-  }
-  if (opPtr.p->m_temporaryIndex && opPtr.p->m_loggedIndex)
-  {
-    jam();
-    opPtr.p->m_errorCode= CreateIndxRef::NoLoggingTemporaryIndex;
-    opPtr.p->m_errorLine= __LINE__;
-    return;
-  }
-
-  // compute index table record
-  TableRecord indexRec;
-  TableRecordPtr indexPtr;
-  indexPtr.i = RNIL;            // invalid
-  indexPtr.p = &indexRec;
-  initialiseTableRecord(indexPtr);
-  indexPtr.p->m_bits = TableRecord::TR_RowChecksum;
-  if (req->getIndexType() == DictTabInfo::UniqueHashIndex) {
-    indexPtr.p->m_bits |= (opPtr.p->m_loggedIndex ? TableRecord::TR_Logged:0);
-    indexPtr.p->m_bits |=
-      (opPtr.p->m_temporaryIndex ? TableRecord::TR_Temporary : 0);
-    indexPtr.p->fragmentType = DictTabInfo::DistrKeyUniqueHashIndex;
-  } else if (req->getIndexType() == DictTabInfo::OrderedIndex) {
-    // first version will not supported logging
-    if (opPtr.p->m_loggedIndex) {
-      jam();
-      opPtr.p->m_errorCode = CreateIndxRef::InvalidIndexType;
-      opPtr.p->m_errorLine = __LINE__;
-      return;
-    }
-    indexPtr.p->m_bits |=
-      (opPtr.p->m_temporaryIndex ? TableRecord::TR_Temporary : 0);
-    indexPtr.p->fragmentType = DictTabInfo::DistrKeyOrderedIndex;
-  } else {
-    jam();
-    opPtr.p->m_errorCode = CreateIndxRef::InvalidIndexType;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  indexPtr.p->tableType = (DictTabInfo::TableType)req->getIndexType();
-  indexPtr.p->primaryTableId = req->getTableId();
-  indexPtr.p->noOfAttributes = opPtr.p->m_attrList.sz;
-  indexPtr.p->tupKeyLength = 0;
-  if (indexPtr.p->noOfAttributes == 0) {
-    jam();
-    opPtr.p->m_errorCode = CreateIndxRef::InvalidIndexType;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-
-  if (indexPtr.p->isOrderedIndex()) {
-    // tree node size in words (make configurable later)
-    indexPtr.p->tupKeyLength = MAX_TTREE_NODE_SIZE;
-  }
-
-  AttributeMask mask;
-  mask.clear();
-  for (k = 0; k < opPtr.p->m_attrList.sz; k++) {
-    jam();
-    unsigned current_id= opPtr.p->m_attrList.id[k];
-    Uint32 tAttr = tablePtr.p->m_attributes.firstItem;
-    AttributeRecord* aRec = NULL;
-    for (; tAttr != RNIL; )
-    {
-      aRec = c_attributeRecordPool.getPtr(tAttr);
-      if (aRec->attributeId != current_id)
-      {
-	tAttr= aRec->nextList;
-	continue;
-      }
-      jam();
-      break;
-    }
-    if (tAttr == RNIL) {
-      jam();
-      opPtr.p->m_errorCode = CreateIndxRef::BadRequestType;
-      opPtr.p->m_errorLine = __LINE__;
-      return;
-    }
-    if (mask.get(current_id))
-    {
-      jam();
-      opPtr.p->m_errorCode = CreateIndxRef::DuplicateAttributes;
-      opPtr.p->m_errorLine = __LINE__;
-      return;
-    }
-    const Uint32 a = aRec->attributeDescriptor;
-
-    if (AttributeDescriptor::getDiskBased(a))
-    {
-      jam();
-      opPtr.p->m_errorCode = CreateIndxRef::IndexOnDiskAttributeError;
-      opPtr.p->m_errorLine = __LINE__;
-      return;
-    }
-    
-    mask.set(current_id);
-    unsigned kk= k;
-    if (indexPtr.p->isHashIndex()) {
-      const Uint32 s1 = AttributeDescriptor::getSize(a);
-      const Uint32 s2 = AttributeDescriptor::getArraySize(a);
-      indexPtr.p->tupKeyLength += ((1 << s1) * s2 + 31) >> 5;
-
-      for (; kk > 0 && current_id < attrid_map[kk-1]>>16; kk--)
-	attrid_map[kk]= attrid_map[kk-1];
-    }
-    attrid_map[kk]= k | (current_id << 16);
-  }
-
-  indexPtr.p->noOfPrimkey = indexPtr.p->noOfAttributes;
-  // plus concatenated primary table key attribute
-  indexPtr.p->noOfAttributes += 1;
-  indexPtr.p->noOfNullAttr = 0;
-  // write index table
-  w.add(DictTabInfo::TableName, opPtr.p->m_indexName);
-  w.add(DictTabInfo::TableLoggedFlag, !!(indexPtr.p->m_bits & TableRecord::TR_Logged));
-  w.add(DictTabInfo::TableTemporaryFlag, !!(indexPtr.p->m_bits & TableRecord::TR_Temporary));
-  w.add(DictTabInfo::FragmentTypeVal, indexPtr.p->fragmentType);
-  w.add(DictTabInfo::TableTypeVal, indexPtr.p->tableType);
-  Rope name(c_rope_pool, tablePtr.p->tableName);
-  name.copy(tableName);
-  w.add(DictTabInfo::PrimaryTable, tableName);
-  w.add(DictTabInfo::PrimaryTableId, tablePtr.i);
-  w.add(DictTabInfo::NoOfAttributes, indexPtr.p->noOfAttributes);
-  w.add(DictTabInfo::NoOfKeyAttr, indexPtr.p->noOfPrimkey);
-  w.add(DictTabInfo::NoOfNullable, indexPtr.p->noOfNullAttr);
-  w.add(DictTabInfo::KeyLength, indexPtr.p->tupKeyLength);
-  // write index key attributes
-  for (k = 0; k < opPtr.p->m_attrList.sz; k++) {
-    // insert the attributes in the order decided above in attrid_map
-    // k is new order, current_id is in previous order
-    // ToDo: make sure "current_id" is stored with the table and
-    // passed up to NdbDictionary
-    unsigned current_id= opPtr.p->m_attrList.id[attrid_map[k] & 0xffff];
-    jam();
-    for (Uint32 tAttr = tablePtr.p->m_attributes.firstItem; tAttr != RNIL; ) {
-      AttributeRecord* aRec = c_attributeRecordPool.getPtr(tAttr);
-      tAttr = aRec->nextList;
-      if (aRec->attributeId != current_id)
-        continue;
-      jam();
-      const Uint32 a = aRec->attributeDescriptor;
-      bool isNullable = AttributeDescriptor::getNullable(a);
-      Uint32 arrayType = AttributeDescriptor::getArrayType(a);
-      Rope attrName(c_rope_pool, aRec->attributeName);
-      attrName.copy(attributeName);
-      w.add(DictTabInfo::AttributeName, attributeName);
-      Uint32 attrType = AttributeDescriptor::getType(a);
-      // computed
-      w.add(DictTabInfo::AttributeId, k);
-      if (indexPtr.p->isHashIndex()) {
-        w.add(DictTabInfo::AttributeKeyFlag, (Uint32)true);
-        w.add(DictTabInfo::AttributeNullableFlag, (Uint32)false);
-      }
-      if (indexPtr.p->isOrderedIndex()) {
-        w.add(DictTabInfo::AttributeKeyFlag, (Uint32)false);
-        w.add(DictTabInfo::AttributeNullableFlag, (Uint32)isNullable);
-      }
-      w.add(DictTabInfo::AttributeArrayType, arrayType);
-      w.add(DictTabInfo::AttributeExtType, attrType);
-      w.add(DictTabInfo::AttributeExtPrecision, aRec->extPrecision);
-      w.add(DictTabInfo::AttributeExtScale, aRec->extScale);
-      w.add(DictTabInfo::AttributeExtLength, aRec->extLength);
-      w.add(DictTabInfo::AttributeEnd, (Uint32)true);
-    }
-  }
-  if (indexPtr.p->isHashIndex()) {
-    jam();
-    
-    Uint32 key_type = NDB_ARRAYTYPE_FIXED;
-    AttributeRecordPtr attrPtr;
-    LocalDLFifoList<AttributeRecord> alist(c_attributeRecordPool,
-					   tablePtr.p->m_attributes);
-    for (alist.first(attrPtr); !attrPtr.isNull(); alist.next(attrPtr)) 
-    {
-      const Uint32 desc = attrPtr.p->attributeDescriptor;
-      if (AttributeDescriptor::getPrimaryKey(desc) &&
-	  AttributeDescriptor::getArrayType(desc) != NDB_ARRAYTYPE_FIXED)
-      {
-	key_type = NDB_ARRAYTYPE_MEDIUM_VAR;
-	break;
-      }
-    }
-    
-    // write concatenated primary table key attribute i.e. keyinfo
-    w.add(DictTabInfo::AttributeName, "NDB$PK");
-    w.add(DictTabInfo::AttributeId, opPtr.p->m_attrList.sz);
-    w.add(DictTabInfo::AttributeArrayType, key_type);
-    w.add(DictTabInfo::AttributeKeyFlag, (Uint32)false);
-    w.add(DictTabInfo::AttributeNullableFlag, (Uint32)false);
-    w.add(DictTabInfo::AttributeExtType, (Uint32)DictTabInfo::ExtUnsigned);
-    w.add(DictTabInfo::AttributeExtLength, tablePtr.p->tupKeyLength+1);
-    w.add(DictTabInfo::AttributeEnd, (Uint32)true);
-  }
-  if (indexPtr.p->isOrderedIndex()) {
-    jam();
-    // write index tree node as Uint32 array attribute
-    w.add(DictTabInfo::AttributeName, "NDB$TNODE");
-    w.add(DictTabInfo::AttributeId, opPtr.p->m_attrList.sz);
-    // should not matter but VAR crashes in TUP
-    w.add(DictTabInfo::AttributeArrayType, (Uint32)NDB_ARRAYTYPE_FIXED);
-    w.add(DictTabInfo::AttributeKeyFlag, (Uint32)true);
-    w.add(DictTabInfo::AttributeNullableFlag, (Uint32)false);
-    w.add(DictTabInfo::AttributeExtType, (Uint32)DictTabInfo::ExtUnsigned);
-    w.add(DictTabInfo::AttributeExtLength, indexPtr.p->tupKeyLength);
-    w.add(DictTabInfo::AttributeEnd, (Uint32)true);
-  }
-  // finish
-  w.add(DictTabInfo::TableEnd, (Uint32)true);
-  // remember to...
-  releaseSections(signal);
-  // send create index table request
-  CreateTableReq * const cre = (CreateTableReq*)signal->getDataPtrSend();
-  cre->clientRef = reference();
-  cre->clientData = opPtr.p->key;
-  LinearSectionPtr lsPtr[3];
-  lsPtr[0].p = wbuffer;
-  lsPtr[0].sz = w.getWordsUsed();
-  sendSignal(DBDICT_REF, GSN_CREATE_TABLE_REQ,
-      signal, CreateTableReq::SignalLength, JBB, lsPtr, 1);
-}
-#endif
-
-#if wl3600_todo //moved
-void
-Dbdict::createIndex_fromCreateTable(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  jam();
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = CreateIndxReq::RT_DICT_ABORT;
-    createIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (! opPtr.p->m_request.getOnline()) {
-    jam();
-    opPtr.p->m_requestType = CreateIndxReq::RT_DICT_COMMIT;
-    createIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  createIndex_toAlterIndex(signal, opPtr);
-}
-#endif
-
-#if wl3600_todo //moved
-void
-Dbdict::createIndex_toAlterIndex(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  jam();
-  AlterIndxReq* const req = (AlterIndxReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(AlterIndxReq::RT_CREATE_INDEX);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  req->setTableId(opPtr.p->m_request.getTableId());
-  req->setIndexId(opPtr.p->m_request.getIndexId());
-  req->setIndexVersion(opPtr.p->m_request.getIndexVersion());
-  req->setOnline(true);
-  sendSignal(reference(), GSN_ALTER_INDX_REQ,
-      signal, AlterIndxReq::SignalLength, JBB);
-}
-#endif
-
-#if wl3600_todo //moved
-void
-Dbdict::createIndex_fromAlterIndex(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  jam();
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = CreateIndxReq::RT_DICT_ABORT;
-    createIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  opPtr.p->m_requestType = CreateIndxReq::RT_DICT_COMMIT;
-  createIndex_sendSlaveReq(signal, opPtr);
-}
-#endif
-
-void
-Dbdict::createIndex_slaveCommit(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 indexId = opPtr.p->m_request.getIndexId();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, indexId);
-  if (! opPtr.p->m_request.getOnline()) {
-    ndbrequire(indexPtr.p->indexState == TableRecord::IS_UNDEFINED);
-    indexPtr.p->indexState = TableRecord::IS_OFFLINE;
-  } else {
-    ndbrequire(indexPtr.p->indexState == TableRecord::IS_ONLINE);
-  }
-#endif
-}
-
-void
-Dbdict::createIndex_slaveAbort(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  CreateIndxReq* const req = &opPtr.p->m_request;
-  const Uint32 indexId = req->getIndexId();
-  if (indexId >= c_tableRecordPool.getSize()) {
-    jam();
-    return;
-  }
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, indexId);
-  if (! indexPtr.p->isIndex()) {
-    jam();
-    return;
-  }
-  indexPtr.p->indexState = TableRecord::IS_BROKEN;
-#endif
-}
-
-void
-Dbdict::createIndex_sendSlaveReq(Signal* signal, CreateIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  CreateIndxReq* const req = (CreateIndxReq*)signal->getDataPtrSend();
-  *req = opPtr.p->m_request;
-  req->setUserRef(opPtr.p->m_coordinatorRef);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  opPtr.p->m_signalCounter = c_aliveNodes;
-  NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-  sendSignal(rg, GSN_CREATE_INDX_REQ,
-      signal, CreateIndxReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::createIndex_sendReply(Signal* signal, CreateIndexDataPtr opPtr,
-    bool toUser)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  CreateIndxRef* rep = (CreateIndxRef*)signal->getDataPtrSend();
-  Uint32 gsn = GSN_CREATE_INDX_CONF;
-  Uint32 length = CreateIndxConf::InternalLength;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == CreateIndxReq::RT_DICT_ABORT)
-      sendRef = false;
-  } else {
-    sendRef = opPtr.p->hasError();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = CreateIndxConf::SignalLength;
-  }
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setIndexId(opPtr.p->m_request.getIndexId());
-  rep->setIndexVersion(opPtr.p->m_request.getIndexVersion());
-  if (sendRef) {
-    if (opPtr.p->m_errorNode == 0)
-      opPtr.p->m_errorNode = getOwnNodeId();
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->setErrorLine(opPtr.p->m_errorLine);
-    rep->setErrorNode(opPtr.p->m_errorNode);
-    gsn = GSN_CREATE_INDX_REF;
-    length = CreateIndxRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
-}
-
 /**
  * MODULE: Drop index.
  *
@@ -11160,8 +10482,6 @@
  * other blocks) and then drops the index table.
  */
 
-// MODULE: DropIndex
-
 const Dbdict::OpInfo
 Dbdict::DropIndexData::g_opInfo = {
   GSN_DROP_INDX_IMPL_REQ,
@@ -11247,124 +10567,6 @@
 
   sendSignal(req->clientRef, GSN_DROP_INDX_REF, signal,
              DropIndxRef::SignalLength, JBB);
-
-#if wl3600_todo //remove
-  jamEntry();
-  DropIndxReq* const req = (DropIndxReq*)signal->getDataPtrSend();
-  DropIndexDataPtr opPtr;
-
-  int err = DropIndxRef::BadRequestType;
-  const Uint32 senderRef = signal->senderBlockRef();
-  const DropIndxReq::RequestType requestType = req->getRequestType();
-  if (requestType == DropIndxReq::RT_USER) {
-    jam();
-    if (signal->getLength() == DropIndxReq::SignalLength) {
-      jam();
-      DropIndxRef::ErrorCode tmperr = DropIndxRef::NoError;
-      if (getOwnNodeId() != c_masterNodeId) {
-        jam();
-        tmperr = DropIndxRef::NotMaster;
-      } else if (c_blockState == BS_NODE_RESTART) {
-        jam();
-        tmperr = DropIndxRef::BusyWithNR;
-      } else if (c_blockState != BS_IDLE) {
-        jam();
-        tmperr = DropIndxRef::Busy;
-      }
-      if (tmperr != DropIndxRef::NoError) {
-	err = tmperr;
-	goto error;
-      }
-      // forward initial request plus operation key to all
-      Uint32 indexId= req->getIndexId();
-      Uint32 indexVersion= req->getIndexVersion();
-
-      if(indexId >= c_tableRecordPool.getSize())
-      {
-	err = DropIndxRef::IndexNotFound;
-	goto error;
-      }
-
-      TableRecordPtr tmp;
-      c_tableRecordPool.getPtr(tmp, indexId);
-      if(tmp.p->tabState == TableRecord::NOT_DEFINED ||
-	 tmp.p->tableVersion != indexVersion)
-      {
-	err = DropIndxRef::InvalidIndexVersion;
-	goto error;
-      }
-      
-      if (! tmp.p->isIndex()) {
-	jam();
-	err = DropIndxRef::NotAnIndex;
-	goto error;
-      }
-      
-      if (tmp.p->indexState != TableRecord::IS_ONLINE)
-        req->addRequestFlag(RequestFlag::RF_FORCE);
-
-      tmp.p->indexState = TableRecord::IS_DROPPING;
-
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-      sendSignal(rg, GSN_DROP_INDX_REQ,
-		 signal, DropIndxReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == DropIndxReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    OpDropIndex opBusy;
-    if (! c_opDropIndex.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = DropIndxReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = DropIndxRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      dropIndex_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opDropIndex.add(opPtr);
-    // master expects to hear from all
-    if (opPtr.p->m_isMaster)
-      opPtr.p->m_signalCounter = c_aliveNodes;
-    dropIndex_slavePrepare(signal, opPtr);
-    dropIndex_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opDropIndex.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == DropIndxReq::RT_DICT_COMMIT ||
-        requestType == DropIndxReq::RT_DICT_ABORT) {
-      jam();
-      if (requestType == DropIndxReq::RT_DICT_COMMIT)
-        dropIndex_slaveCommit(signal, opPtr);
-      else
-        dropIndex_slaveAbort(signal, opPtr);
-      dropIndex_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-        c_opDropIndex.release(opPtr);
-      return;
-    }
-  }
-error:
-  jam();
-  // return to sender
-  OpDropIndex opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = (DropIndxRef::ErrorCode)err;
-  opPtr.p->m_errorLine = __LINE__;
-  opPtr.p->m_errorNode = c_masterNodeId;
-  dropIndex_sendReply(signal, opPtr, true);
-#endif
 }
 
 void
@@ -11554,116 +10756,6 @@
 }
 
 void
-Dbdict::execDROP_INDX_CONF(Signal* signal)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jamEntry();
-  DropIndxConf* conf = (DropIndxConf*)signal->getDataPtrSend();
-  dropIndex_recvReply(signal, conf, 0);
-#endif
-}
-
-void
-Dbdict::execDROP_INDX_REF(Signal* signal) 
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jamEntry();
-  DropIndxRef* ref = (DropIndxRef*)signal->getDataPtrSend();
-  dropIndex_recvReply(signal, ref->getConf(), ref);
-#endif
-}
-
-void
-Dbdict::dropIndex_recvReply(Signal* signal, const DropIndxConf* conf,
-    const DropIndxRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const DropIndxReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == DropIndxReq::RT_TC) {
-    jam();
-    // part of alter index operation
-    AlterIndexDataPtr opPtr;
-    c_opAlterIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterIndex_fromDropTc(signal, opPtr);
-    return;
-  }
-  DropIndexDataPtr opPtr;
-  c_opDropIndex.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  opPtr.p->setError(ref);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == DropIndxReq::RT_DICT_COMMIT ||
-      requestType == DropIndxReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    dropIndex_sendReply(signal, opPtr, true);
-    c_opDropIndex.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = DropIndxReq::RT_DICT_ABORT;
-    dropIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (requestType == DropIndxReq::RT_DICT_PREPARE) {
-    jam();
-    // start alter offline
-    dropIndex_toAlterIndex(signal, opPtr);
-    return;
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::dropIndex_slavePrepare(Signal* signal, DropIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  DropIndxReq* const req = &opPtr.p->m_request;
-  // check index exists
-  TableRecordPtr indexPtr;
-  if (! (req->getIndexId() < c_tableRecordPool.getSize())) {
-    jam();
-    opPtr.p->m_errorCode = DropIndxRef::IndexNotFound;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  c_tableRecordPool.getPtr(indexPtr, req->getIndexId());
-  if (indexPtr.p->tabState != TableRecord::DEFINED) {
-    jam();
-    opPtr.p->m_errorCode = DropIndxRef::IndexNotFound;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  if (! indexPtr.p->isIndex()) {
-    jam();
-    opPtr.p->m_errorCode = DropIndxRef::NotAnIndex;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  // ignore incoming primary table id
-  req->setTableId(indexPtr.p->primaryTableId);
-#endif
-}
-
-void
 Dbdict::dropIndex_toAlterIndex(Signal* signal, SchemaOpPtr op_ptr)
 {
   D("dropIndex_toAlterIndex");
@@ -11718,16 +10810,6 @@
     setError(error, ref);
     abortSubOps(signal, op_ptr, error);
   }
-
-#if wl3600_todo //remove
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = DropIndxReq::RT_DICT_ABORT;
-    dropIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  dropIndex_toDropTable(signal, opPtr);
-#endif
 }
 
 void
@@ -11783,91 +10865,6 @@
   }
 }
 
-void
-Dbdict::dropIndex_slaveCommit(Signal* signal, DropIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-#endif
-}
-
-void
-Dbdict::dropIndex_slaveAbort(Signal* signal, DropIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  DropIndxReq* const req = &opPtr.p->m_request;
-  const Uint32 indexId = req->getIndexId();
-  if (indexId >= c_tableRecordPool.getSize()) {
-    jam();
-    return;
-  }
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, indexId);
-  indexPtr.p->indexState = TableRecord::IS_BROKEN;
-#endif
-}
-
-void
-Dbdict::dropIndex_sendSlaveReq(Signal* signal, DropIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  DropIndxReq* const req = (DropIndxReq*)signal->getDataPtrSend();
-  *req = opPtr.p->m_request;
-  req->setUserRef(opPtr.p->m_coordinatorRef);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  opPtr.p->m_signalCounter = c_aliveNodes;
-  NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-  sendSignal(rg, GSN_DROP_INDX_REQ,
-      signal, DropIndxReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::dropIndex_sendReply(Signal* signal, DropIndexDataPtr opPtr,
-    bool toUser)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  DropIndxRef* rep = (DropIndxRef*)signal->getDataPtrSend();
-  Uint32 gsn = GSN_DROP_INDX_CONF;
-  Uint32 length = DropIndxConf::InternalLength;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == DropIndxReq::RT_DICT_ABORT)
-      sendRef = false;
-  } else {
-    sendRef = opPtr.p->hasError();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = DropIndxConf::SignalLength;
-  }
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setIndexId(opPtr.p->m_request.getIndexId());
-  rep->setIndexVersion(opPtr.p->m_request.getIndexVersion());
-  if (sendRef) {
-    if (opPtr.p->m_errorNode == 0)
-      opPtr.p->m_errorNode = getOwnNodeId();
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->setErrorLine(opPtr.p->m_errorLine);
-    rep->setErrorNode(opPtr.p->m_errorNode);
-    gsn = GSN_DROP_INDX_REF;
-    length = DropIndxRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
-}
-
 /*****************************************************
  *
  * Util signalling
@@ -14092,24 +13089,11 @@
 /**
  * MODULE: Alter index
  *
- * Alter index state.  Alter online creates the index in each TC and
- * then invokes create trigger and alter trigger protocols to activate
- * the 3 triggers.  Alter offline does the opposite.
- *
- * Request type received in REQ and returned in CONF/REF:
- *
- * RT_USER - from API to DICT master
- * RT_CREATE_INDEX - part of create index operation
- * RT_DROP_INDEX - part of drop index operation
- * RT_NODERESTART - node restart, activate locally only
- * RT_SYSTEMRESTART - system restart, activate and build if not logged
- * RT_DICT_PREPARE - prepare participants
- * RT_DICT_TC - to local TC via each participant
- * RT_DICT_COMMIT - commit in each participant
+ * Alter index state.  Alter online creates the index in each TC
+ * (if hash index) and invokes create trigger and alter trigger ops
+ * to activate the 3 triggers.  Alter offline does the opposite.
  */
 
-// MODULE: AlterIndex
-
 const Dbdict::OpInfo
 Dbdict::AlterIndexData::g_opInfo = {
   GSN_ALTER_INDX_IMPL_REQ,
@@ -14194,108 +13178,6 @@
 
   sendSignal(req->clientRef, GSN_ALTER_INDX_REF, signal,
              AlterIndxRef::SignalLength, JBB);
-
-#if wl3600_todo //remove
-  jamEntry();
-  AlterIndxReq* const req = (AlterIndxReq*)signal->getDataPtrSend();
-  AlterIndexDataPtr opPtr;
-  const Uint32 senderRef = signal->senderBlockRef();
-  const AlterIndxReq::RequestType requestType = req->getRequestType();
-  if (requestType == AlterIndxReq::RT_USER ||
-      requestType == AlterIndxReq::RT_CREATE_INDEX ||
-      requestType == AlterIndxReq::RT_DROP_INDEX ||
-      requestType == AlterIndxReq::RT_NODERESTART ||
-      requestType == AlterIndxReq::RT_SYSTEMRESTART) {
-    jam();
-    const bool isLocal = req->getRequestFlag() & RequestFlag::RF_LOCAL;
-    NdbNodeBitmask receiverNodes = c_aliveNodes;
-    if (isLocal) {
-      receiverNodes.clear();
-      receiverNodes.set(getOwnNodeId());
-    }
-    if (signal->getLength() == AlterIndxReq::SignalLength) {
-      jam();
-      if (! isLocal && getOwnNodeId() != c_masterNodeId) {
-        jam();
-
-	releaseSections(signal);
-	OpAlterIndex opBad;
-	opPtr.p = &opBad;
-	opPtr.p->save(req);
-	opPtr.p->m_errorCode = AlterIndxRef::NotMaster;
-	opPtr.p->m_errorLine = __LINE__;
-	opPtr.p->m_errorNode = c_masterNodeId;
-	alterIndex_sendReply(signal, opPtr, true);
-        return;
-      }
-      // forward initial request plus operation key to all
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, receiverNodes);
-      sendSignal(rg, GSN_ALTER_INDX_REQ,
-          signal, AlterIndxReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == AlterIndxReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    OpAlterIndex opBusy;
-    if (! c_opAlterIndex.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = AlterIndxReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = AlterIndxRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      alterIndex_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opAlterIndex.add(opPtr);
-    // master expects to hear from all
-    if (opPtr.p->m_isMaster)
-      opPtr.p->m_signalCounter = receiverNodes;
-    // check request in all participants
-    alterIndex_slavePrepare(signal, opPtr);
-    alterIndex_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opAlterIndex.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == AlterIndxReq::RT_DICT_TC) {
-      jam();
-      if (opPtr.p->m_request.getOnline())
-        alterIndex_toCreateTc(signal, opPtr);
-      else
-        alterIndex_toDropTc(signal, opPtr);
-      return;
-    }
-    if (requestType == AlterIndxReq::RT_DICT_COMMIT ||
-        requestType == AlterIndxReq::RT_DICT_ABORT) {
-      jam();
-      if (requestType == AlterIndxReq::RT_DICT_COMMIT)
-        alterIndex_slaveCommit(signal, opPtr);
-      else
-        alterIndex_slaveAbort(signal, opPtr);
-      alterIndex_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-        c_opAlterIndex.release(opPtr);
-      return;
-    }
-  }
-  jam();
-  // return to sender
-  OpAlterIndex opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = AlterIndxRef::BadRequestType;
-  opPtr.p->m_errorLine = __LINE__;
-  alterIndex_sendReply(signal, opPtr, true);
-#endif
 }
 
 void
@@ -14345,6 +13227,18 @@
   }
 };
 
+const Dbdict::TriggerTmpl
+Dbdict::g_buildIndexConstraintTmpl[1] = {
+  { "NDB$INDEX_%u_BUILD",
+    {
+      TriggerType::READ_ONLY_CONSTRAINT,
+      TriggerActionTime::TA_AFTER,
+      TriggerEvent::TE_UPDATE,
+      false, true, false
+    }
+  }
+};
+
 void
 Dbdict::alterIndex_parseCommon(Signal* signal, SchemaOpPtr op_ptr,
                               ErrorInfo& error)
@@ -14561,11 +13455,11 @@
 Dbdict::alterIndex_atCreateTrigger(Signal* signal, SchemaOpPtr op_ptr)
 {
   /*
-   * Index trigger req has been parsed on this participant.
-   * Connect the index and the trigger on this node.  Trigger
-   * number comes in the signal because we have no access to
-   * trigger counter in coordinator.  There is a counter under
-   * index record but it is better to use it for verification.
+   * Index trigger req has been parsed on this participant.  Connect the
+   * index and the trigger on this node.  Trigger number comes in the
+   * signal because we have no access to trigger counter in coordinator.
+   * There is a counter under index record but it is better to use it
+   * for verification.
    */
   CreateTriggerDataPtr createTriggerPtr;
   getOpData(op_ptr, createTriggerPtr);
@@ -14748,30 +13642,6 @@
 
   sendSignal(reference(), GSN_BUILDINDXREQ, signal,
              BuildIndxReq::SignalLength, JBB);
-
-#if wl3600_todo
-  jam();
-  // get index and table records
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  TableRecordPtr tablePtr;
-  c_tableRecordPool.getPtr(tablePtr, indexPtr.p->primaryTableId);
-  // build request to self (short signal)
-  BuildIndxReq* const req = (BuildIndxReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(BuildIndxReq::RT_ALTER_INDEX);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  req->setBuildId(0);   // not used
-  req->setBuildKey(0);  // not used
-  req->setIndexType(indexPtr.p->tableType);
-  req->setIndexId(indexPtr.i);
-  req->setTableId(indexPtr.p->primaryTableId);
-  req->setParallelism(16);
-  // send
-  sendSignal(reference(), GSN_BUILDINDXREQ,
-      signal, BuildIndxReq::SignalLength, JBB);
-#endif
 }
 
 void
@@ -14804,18 +13674,6 @@
     setError(error, ref);
     abortSubOps(signal, op_ptr, error);
   }
-
-#if wl3600_todo
-  jam();
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = AlterIndxReq::RT_DICT_ABORT;
-    alterIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  opPtr.p->m_requestType = AlterIndxReq::RT_DICT_COMMIT;
-  alterIndex_sendSlaveReq(signal, opPtr);
-#endif
 }
 
 void
@@ -15170,583 +14028,12 @@
   execute(signal, callback, ref->errorCode);
 }
 
-void
-Dbdict::alterIndex_recvReply(Signal* signal, const AlterIndxConf* conf,
-    const AlterIndxRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const AlterIndxReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == AlterIndxReq::RT_CREATE_INDEX) {
-    jam();
-    // part of create index operation
-    CreateIndexDataPtr opPtr;
-    c_opCreateIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    createIndex_fromAlterIndex(signal, opPtr);
-    return;
-  }
-  if (requestType == AlterIndxReq::RT_DROP_INDEX) {
-    jam();
-    // part of drop index operation
-    DropIndexDataPtr opPtr;
-    c_opDropIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    dropIndex_fromAlterIndex(signal, opPtr);
-    return;
-  }
-  if (requestType == AlterIndxReq::RT_TC ||
-      requestType == AlterIndxReq::RT_TUX) {
-    jam();
-    // part of build index operation
-    BuildIndexDataPtr opPtr;
-    c_opBuildIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    buildIndex_fromOnline(signal, opPtr);
-    return;
-  }
-  if (requestType == AlterIndxReq::RT_NODERESTART) {
-    jam();
-    if (ref == 0) {
-      infoEvent("DICT: index %u activated", (unsigned)key);
-    } else {
-      warningEvent("DICT: index %u activation failed: code=%d line=%d",
-          (unsigned)key,
-          ref->getErrorCode(), ref->getErrorLine());
-    }
-    activateIndexes(signal, key + 1);
-    return;
-  }
-  if (requestType == AlterIndxReq::RT_SYSTEMRESTART) {
-    jam();
-    if (ref == 0) {
-      infoEvent("DICT: index %u activated done", (unsigned)key);
-    } else {
-      warningEvent("DICT: index %u activated failed: code=%d line=%d node=%d",
-          (unsigned)key,
-          ref->getErrorCode(), ref->getErrorLine(), ref->getErrorNode());
-    }
-    activateIndexes(signal, key + 1);
-    return;
-  }
-  AlterIndexDataPtr opPtr;
-  c_opAlterIndex.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  opPtr.p->setError(ref);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == AlterIndxReq::RT_DICT_COMMIT ||
-      requestType == AlterIndxReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    alterIndex_sendReply(signal, opPtr, true);
-    c_opAlterIndex.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = AlterIndxReq::RT_DICT_ABORT;
-    alterIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  if (indexPtr.p->isHashIndex()) {
-    if (requestType == AlterIndxReq::RT_DICT_PREPARE) {
-      jam();
-      if (opPtr.p->m_request.getOnline()) {
-        opPtr.p->m_requestType = AlterIndxReq::RT_DICT_TC;
-        alterIndex_sendSlaveReq(signal, opPtr);
-      } else {
-        // start drop triggers
-        alterIndex_toDropTrigger(signal, opPtr);
-      }
-      return;
-    }
-    if (requestType == AlterIndxReq::RT_DICT_TC) {
-      jam();
-      if (opPtr.p->m_request.getOnline()) {
-        // start create triggers
-        alterIndex_toCreateTrigger(signal, opPtr);
-      } else {
-        opPtr.p->m_requestType = AlterIndxReq::RT_DICT_COMMIT;
-        alterIndex_sendSlaveReq(signal, opPtr);
-      }
-      return;
-    }
-  }
-  if (indexPtr.p->isOrderedIndex()) {
-    if (requestType == AlterIndxReq::RT_DICT_PREPARE) {
-      jam();
-      if (opPtr.p->m_request.getOnline()) {
-        // start create triggers
-        alterIndex_toCreateTrigger(signal, opPtr);
-      } else {
-        // start drop triggers
-        alterIndex_toDropTrigger(signal, opPtr);
-      }
-      return;
-    }
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::alterIndex_slavePrepare(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const AlterIndxReq* const req = &opPtr.p->m_request;
-  if (! (req->getIndexId() < c_tableRecordPool.getSize())) {
-    jam();
-    opPtr.p->m_errorCode = AlterIndxRef::Inconsistency;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, req->getIndexId());
-  if (indexPtr.p->tabState != TableRecord::DEFINED) {
-    jam();
-    opPtr.p->m_errorCode = AlterIndxRef::IndexNotFound;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  if (! indexPtr.p->isIndex()) {
-    jam();
-    opPtr.p->m_errorCode = AlterIndxRef::NotAnIndex;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  if (req->getOnline())
-    indexPtr.p->indexState = TableRecord::IS_BUILDING;
-  else
-    indexPtr.p->indexState = TableRecord::IS_DROPPING;
-#endif
-}
-
-void
-Dbdict::alterIndex_toCreateTc(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  // request to create index in local TC
-  CreateIndxReq* const req = (CreateIndxReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(CreateIndxReq::RT_TC);
-  req->setIndexType(indexPtr.p->tableType);
-  req->setTableId(indexPtr.p->primaryTableId);
-  req->setIndexId(indexPtr.i);
-  req->setOnline(true);
-  getIndexAttrList(indexPtr, opPtr.p->m_attrList);
-  // send
-  LinearSectionPtr lsPtr[3];
-  lsPtr[0].p = (Uint32*)&opPtr.p->m_attrList;
-  lsPtr[0].sz = 1 + opPtr.p->m_attrList.sz;
-  sendSignal(calcTcBlockRef(getOwnNodeId()), GSN_CREATE_INDX_REQ,
-      signal, CreateIndxReq::SignalLength, JBB, lsPtr, 1);
-#endif
-}
-
-void
-Dbdict::alterIndex_fromCreateTc(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  // mark created in local TC
-  if (! opPtr.p->hasLastError()) {
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-    indexPtr.p->indexLocal |= TableRecord::IL_CREATED_TC;
-  }
-  // forward CONF or REF to master
-  ndbrequire(opPtr.p->m_requestType == AlterIndxReq::RT_DICT_TC);
-  alterIndex_sendReply(signal, opPtr, false);
-#endif
-}
-
-void
-Dbdict::alterIndex_toDropTc(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  // broken index allowed if force
-  if (! (indexPtr.p->indexLocal & TableRecord::IL_CREATED_TC)) {
-    jam();
-    ndbassert(opPtr.p->m_requestFlag & RequestFlag::RF_FORCE);
-    alterIndex_sendReply(signal, opPtr, false);
-    return;
-  }
-  // request to drop in local TC
-  DropIndxReq* const req = (DropIndxReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(DropIndxReq::RT_TC);
-  req->setTableId(indexPtr.p->primaryTableId);
-  req->setIndexId(indexPtr.i);
-  req->setIndexVersion(indexPtr.p->tableVersion);
-  // send
-  sendSignal(calcTcBlockRef(getOwnNodeId()), GSN_DROP_INDX_REQ,
-      signal, DropIndxReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::alterIndex_fromDropTc(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  ndbrequire(opPtr.p->m_requestType == AlterIndxReq::RT_DICT_TC);
-  // mark dropped locally
-  if (! opPtr.p->hasLastError()) {
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-    indexPtr.p->indexLocal &= ~TableRecord::IL_CREATED_TC;
-  }
-  // forward CONF or REF to master
-  alterIndex_sendReply(signal, opPtr, false);
-#endif
-}
-
-#if wl3600_todo
-void
-Dbdict::alterIndex_toCreateTrigger(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  // start creation of index triggers
-  CreateTrigReq* const req = (CreateTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(CreateTrigReq::RT_ALTER_INDEX);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  req->setTableId(opPtr.p->m_request.getTableId());
-  req->setIndexId(opPtr.p->m_request.getIndexId());
-  req->setTriggerId(RNIL);
-  req->setTriggerActionTime(TriggerActionTime::TA_AFTER);
-  req->setMonitorAllAttributes(false);
-  req->setOnline(true);         // alter online after create
-  req->setReceiverRef(0);       // implicit for index triggers
-  getIndexAttrMask(indexPtr, req->getAttributeMask());
-  // name section
-  char triggerName[MAX_TAB_NAME_SIZE];
-  Uint32 buffer[2 + ((MAX_TAB_NAME_SIZE + 3) >> 2)];    // SP string
-  LinearWriter w(buffer, sizeof(buffer) >> 2);
-  LinearSectionPtr lsPtr[3];
-  if (indexPtr.p->isHashIndex()) {
-    req->setTriggerType(TriggerType::SECONDARY_INDEX);
-    req->setMonitorReplicas(false);
-    req->setReportAllMonitoredAttributes(true);
-    // insert
-    if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL)
-      req->setTriggerId(indexPtr.p->insertTriggerId);
-    req->setTriggerEvent(TriggerEvent::TE_INSERT);
-    sprintf(triggerName, "NDB$INDEX_%u_INSERT", opPtr.p->m_request.getIndexId());
-    w.reset();
-    w.add(CreateTrigReq::TriggerNameKey, triggerName);
-    lsPtr[0].p = buffer;
-    lsPtr[0].sz = w.getWordsUsed();
-    sendSignal(reference(), GSN_CREATE_TRIG_REQ, 
-        signal, CreateTrigReq::SignalLength, JBB, lsPtr, 1);
-    // update
-    if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL)
-      req->setTriggerId(indexPtr.p->updateTriggerId);
-    req->setTriggerEvent(TriggerEvent::TE_UPDATE);
-    sprintf(triggerName, "NDB$INDEX_%u_UPDATE", opPtr.p->m_request.getIndexId());
-    w.reset();
-    w.add(CreateTrigReq::TriggerNameKey, triggerName);
-    lsPtr[0].p = buffer;
-    lsPtr[0].sz = w.getWordsUsed();
-    sendSignal(reference(), GSN_CREATE_TRIG_REQ, 
-        signal, CreateTrigReq::SignalLength, JBB, lsPtr, 1);
-    // delete
-    if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL)
-      req->setTriggerId(indexPtr.p->deleteTriggerId);
-    req->setTriggerEvent(TriggerEvent::TE_DELETE);
-    sprintf(triggerName, "NDB$INDEX_%u_DELETE", opPtr.p->m_request.getIndexId());
-    w.reset();
-    w.add(CreateTrigReq::TriggerNameKey, triggerName);
-    lsPtr[0].p = buffer;
-    lsPtr[0].sz = w.getWordsUsed();
-    sendSignal(reference(), GSN_CREATE_TRIG_REQ, 
-        signal, CreateTrigReq::SignalLength, JBB, lsPtr, 1);
-    // triggers left to create
-    opPtr.p->m_triggerCounter = 3;
-    return;
-  }
-  if (indexPtr.p->isOrderedIndex()) {
-    req->addRequestFlag(RequestFlag::RF_NOTCTRIGGER);
-    req->setTriggerType(TriggerType::ORDERED_INDEX);
-    req->setTriggerActionTime(TriggerActionTime::TA_CUSTOM);
-    req->setMonitorReplicas(true);
-    req->setReportAllMonitoredAttributes(true);
-    // one trigger for 5 events (insert, update, delete, commit, abort)
-    if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL)
-      req->setTriggerId(indexPtr.p->customTriggerId);
-    req->setTriggerEvent(TriggerEvent::TE_CUSTOM);
-    sprintf(triggerName, "NDB$INDEX_%u_CUSTOM", opPtr.p->m_request.getIndexId());
-    w.reset();
-    w.add(CreateTrigReq::TriggerNameKey, triggerName);
-    lsPtr[0].p = buffer;
-    lsPtr[0].sz = w.getWordsUsed();
-    sendSignal(reference(), GSN_CREATE_TRIG_REQ, 
-        signal, CreateTrigReq::SignalLength, JBB, lsPtr, 1);
-    // triggers left to create
-    opPtr.p->m_triggerCounter = 1;
-    return;
-  }
-  ndbrequire(false);
-}
-#endif
-
-#if wl3600_todo
-void
-Dbdict::alterIndex_fromCreateTrigger(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  ndbrequire(opPtr.p->m_triggerCounter != 0);
-  if (--opPtr.p->m_triggerCounter != 0) {
-    jam();
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = AlterIndxReq::RT_DICT_ABORT;
-    alterIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if(opPtr.p->m_requestType != AlterIndxReq::RT_SYSTEMRESTART){
-    // send build request
-    alterIndex_toBuildIndex(signal, opPtr);
-    return;
-  }
-  
-  /**
-   * During system restart, 
-   *   leave index in activated but not build state.
-   *
-   * Build a bit later when REDO has been run
-   */
-  alterIndex_sendReply(signal, opPtr, true);
-}
-#endif
-
-#if wl3600_todo
-void
-Dbdict::alterIndex_toDropTrigger(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  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
-
-#if wl3600_todo
-void
-Dbdict::alterIndex_fromDropTrigger(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  ndbrequire(opPtr.p->m_triggerCounter != 0);
-  if (--opPtr.p->m_triggerCounter != 0) {
-    jam();
-    return;
-  }
-  // finally drop index in each TC
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  const bool isHashIndex = indexPtr.p->isHashIndex();
-  const bool isOrderedIndex = indexPtr.p->isOrderedIndex();
-  ndbrequire(isHashIndex != isOrderedIndex);    // xor
-  if (isHashIndex)
-    opPtr.p->m_requestType = AlterIndxReq::RT_DICT_TC;
-  if (isOrderedIndex)
-    opPtr.p->m_requestType = AlterIndxReq::RT_DICT_COMMIT;
-  alterIndex_sendSlaveReq(signal, opPtr);
-}
-#endif
-
-void
-Dbdict::alterIndex_slaveCommit(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  // get index record
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  indexPtr.p->indexState = TableRecord::IS_ONLINE;
-#endif
-}
-
-void
-Dbdict::alterIndex_slaveAbort(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  // find index record
-  const Uint32 indexId = opPtr.p->m_request.getIndexId();
-  if (indexId >= c_tableRecordPool.getSize())
-    return;
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, indexId);
-  if (! indexPtr.p->isIndex())
-    return;
-  // mark broken
-  indexPtr.p->indexState = TableRecord::IS_BROKEN;
-#endif
-}
-
-void
-Dbdict::alterIndex_sendSlaveReq(Signal* signal, AlterIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  AlterIndxReq* const req = (AlterIndxReq*)signal->getDataPtrSend();
-  *req = opPtr.p->m_request;
-  req->setUserRef(opPtr.p->m_coordinatorRef);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  NdbNodeBitmask receiverNodes = c_aliveNodes;
-  if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL) {
-    receiverNodes.clear();
-    receiverNodes.set(getOwnNodeId());
-  }
-  opPtr.p->m_signalCounter = receiverNodes;
-  NodeReceiverGroup rg(DBDICT, receiverNodes);
-  sendSignal(rg, GSN_ALTER_INDX_REQ,
-      signal, AlterIndxReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::alterIndex_sendReply(Signal* signal, AlterIndexDataPtr opPtr,
-    bool toUser)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  AlterIndxRef* rep = (AlterIndxRef*)signal->getDataPtrSend();
-  Uint32 gsn = GSN_ALTER_INDX_CONF;
-  Uint32 length = AlterIndxConf::InternalLength;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == AlterIndxReq::RT_DICT_ABORT)
-      sendRef = false;
-  } else {
-    sendRef = opPtr.p->hasError();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = AlterIndxConf::SignalLength;
-  }
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setIndexId(opPtr.p->m_request.getIndexId());
-  if (sendRef) {
-    if (opPtr.p->m_errorNode == 0)
-      opPtr.p->m_errorNode = getOwnNodeId();
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->setErrorLine(opPtr.p->m_errorLine);
-    rep->setErrorNode(opPtr.p->m_errorNode);
-    gsn = GSN_ALTER_INDX_REF;
-    length = AlterIndxRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
-}
-
 /**
  * MODULE: Build index
  *
- * Build index or all indexes on a table.  Request type:
- *
- * RT_USER - normal user request, not yet used
- * RT_ALTER_INDEX - from alter index
- * RT_SYSTEM_RESTART - 
- * RT_DICT_PREPARE - prepare participants
- * RT_DICT_TRIX - to participant on way to local TRIX
- * RT_DICT_COMMIT - commit in each participant
- * RT_DICT_ABORT - abort
- * RT_TRIX - to local TRIX
+ * Build index on a table.
  */
 
-// MODULE: BuildIndex
-
 const Dbdict::OpInfo
 Dbdict::BuildIndexData::g_opInfo = {
   GSN_BUILD_INDX_IMPL_REQ,
@@ -15833,105 +14120,6 @@
 
   sendSignal(req->clientRef, GSN_BUILDINDXREF, signal,
              BuildIndxRef::SignalLength, JBB);
-
-#if wl3600_todo
-  jamEntry();
-  BuildIndxReq* const req = (BuildIndxReq*)signal->getDataPtrSend();
-  BuildIndexDataPtr opPtr;
-  const Uint32 senderRef = signal->senderBlockRef();
-  const BuildIndxReq::RequestType requestType = req->getRequestType();
-  if (requestType == BuildIndxReq::RT_USER ||
-      requestType == BuildIndxReq::RT_ALTER_INDEX ||
-      requestType == BuildIndxReq::RT_SYSTEMRESTART) {
-    jam();
-
-    const bool isLocal = req->getRequestFlag() & RequestFlag::RF_LOCAL;
-    NdbNodeBitmask receiverNodes = c_aliveNodes;
-    if (isLocal) {
-      receiverNodes.clear();
-      receiverNodes.set(getOwnNodeId());
-    }
-    
-    if (signal->getLength() == BuildIndxReq::SignalLength) {
-      jam();
-      
-      if (!isLocal && getOwnNodeId() != c_masterNodeId) {
-        jam();
-	
-	releaseSections(signal);
-	BuildIndexData opBad;
-	opPtr.p = &opBad;
-	opPtr.p->save(req);
-	opPtr.p->m_errorCode = BuildIndxRef::NotMaster;
-	opPtr.p->m_errorLine = __LINE__;
-	opPtr.p->m_errorNode = c_masterNodeId;
-	buildIndex_sendReply(signal, opPtr, true);
-        return;
-      }
-      // forward initial request plus operation key to all
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, receiverNodes);
-      sendSignal(rg, GSN_BUILDINDXREQ,
-		 signal, BuildIndxReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == BuildIndxReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    BuildIndexData opBusy;
-    if (! c_opBuildIndex.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = BuildIndxReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = BuildIndxRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      buildIndex_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opBuildIndex.add(opPtr);
-    // master expects to hear from all
-    opPtr.p->m_signalCounter = receiverNodes;
-    buildIndex_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opBuildIndex.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == BuildIndxReq::RT_DICT_TRIX) {
-      jam();
-      buildIndex_buildTrix(signal, opPtr);
-      return;
-    }
-    if (requestType == BuildIndxReq::RT_DICT_TC ||
-        requestType == BuildIndxReq::RT_DICT_TUX) {
-      jam();
-      buildIndex_toOnline(signal, opPtr);
-      return;
-    }
-    if (requestType == BuildIndxReq::RT_DICT_COMMIT ||
-        requestType == BuildIndxReq::RT_DICT_ABORT) {
-      jam();
-      buildIndex_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-        c_opBuildIndex.release(opPtr);
-      return;
-    }
-  }
-  jam();
-  // return to sender
-  BuildIndexData opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = BuildIndxRef::BadRequestType;
-  opPtr.p->m_errorLine = __LINE__;
-  buildIndex_sendReply(signal, opPtr, true);
-#endif
 }
 
 void
@@ -15972,19 +14160,255 @@
   }
   c_tableRecordPool.getPtr(tablePtr, impl_req->tableId);
 
-  // get attribute lists
+  // set attribute lists
   getIndexAttrList(indexPtr, buildIndexPtr.p->m_indexKeyList);
   getTableKeyList(tablePtr, buildIndexPtr.p->m_tableKeyList);
+
+  // set build constraint info and attribute mask
+  switch (indexPtr.p->tableType) {
+  case DictTabInfo::UniqueHashIndex:
+    jam();
+    {
+      buildIndexPtr.p->m_triggerTmpl = g_buildIndexConstraintTmpl;
+      buildIndexPtr.p->m_triggerOpCount = 2;
+      buildIndexPtr.p->m_triggerOpIndex = 0;
+
+      // mask is NDB$PK (last attribute)
+      Uint32 attrId = indexPtr.p->noOfAttributes - 1;
+      buildIndexPtr.p->m_attrMask.clear();
+      buildIndexPtr.p->m_attrMask.set(attrId);
+    }
+    break;
+  default:
+    jam();
+    {
+      buildIndexPtr.p->m_triggerTmpl = 0;
+      buildIndexPtr.p->m_triggerOpCount = 0;
+    }
+    break;
+  }
 }
 
 bool
 Dbdict::buildIndex_subOps(Signal* signal, SchemaOpPtr op_ptr)
 {
   D("buildIndex_subOps" << V(op_ptr.i) << *op_ptr.p);
+
+  BuildIndexDataPtr buildIndexPtr;
+  getOpData(op_ptr, buildIndexPtr);
+  const BuildIndxImplReq* impl_req = &buildIndexPtr.p->m_request;
+
+  // wl3600_todo not yet usable, added at cleanup of old code
+  // wl3600_todo 1) connect trigger/index 2) op re-ordering
+  return false;
+
+  if (buildIndexPtr.p->m_triggerOpIndex < buildIndexPtr.p->m_triggerOpCount) {
+    jam();
+    switch (buildIndexPtr.p->m_triggerOpIndex) {
+    case 0:
+      jam();
+      {
+        Callback c = {
+          safe_cast(&Dbdict::buildIndex_fromCreateConstraint),
+          op_ptr.p->op_key
+        };
+        op_ptr.p->m_callback = c;
+        buildIndex_toCreateConstraint(signal, op_ptr);
+        return true;
+      }
+      break;
+    case 1:
+      jam();
+      {
+        Callback c = {
+          safe_cast(&Dbdict::buildIndex_fromDropConstraint),
+          op_ptr.p->op_key
+        };
+        op_ptr.p->m_callback = c;
+        buildIndex_toDropConstraint(signal, op_ptr);
+        return true;
+      }
+      break;
+    default:
+      ndbrequire(false);
+      break;
+    }
+  }
+
   return false;
 }
 
 void
+Dbdict::buildIndex_toCreateConstraint(Signal* signal, SchemaOpPtr op_ptr)
+{
+  D("buildIndex_toCreateConstraint");
+
+  SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
+  BuildIndexDataPtr buildIndexPtr;
+  getOpData(op_ptr, buildIndexPtr);
+  const BuildIndxImplReq* impl_req = &buildIndexPtr.p->m_request;
+
+  const Uint32 triggerNo = 0;
+  const TriggerTmpl& triggerTmpl = buildIndexPtr.p->m_triggerTmpl[triggerNo];
+
+  CreateTrigReq* req = (CreateTrigReq*)signal->getDataPtrSend();
+
+  Uint32 requestInfo = 0;
+  DictSignal::setRequestType(requestInfo, CreateTrigReq::CreateTriggerOnline);
+  DictSignal::copyGlobalFlags(requestInfo, op_ptr.p->m_requestInfo);
+
+  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->requestInfo = requestInfo;
+  req->tableId = impl_req->tableId;
+  req->tableVersion = 0; // impl_req->tableVersion;
+  req->indexId = impl_req->indexId;
+  req->indexVersion = 0; // impl_req->indexVersion;
+  req->triggerNo = triggerNo;
+
+  TriggerInfo::setTriggerInfo(req->triggerInfo, triggerTmpl.triggerStruct);
+
+  req->receiverRef = 0;
+  req->attributeMask = buildIndexPtr.p->m_attrMask;
+
+  char triggerName[MAX_TAB_NAME_SIZE];
+  sprintf(triggerName, triggerTmpl.nameFormat, impl_req->indexId);
+
+  // name section
+  Uint32 buffer[2 + ((MAX_TAB_NAME_SIZE + 3) >> 2)];    // SP string
+  LinearWriter w(buffer, sizeof(buffer) >> 2);
+  w.reset();
+  w.add(DictTabInfo::TableName, triggerName);
+  LinearSectionPtr ls_ptr[3];
+  ls_ptr[0].p = buffer;
+  ls_ptr[0].sz = w.getWordsUsed();
+
+  sendSignal(reference(), GSN_CREATE_TRIG_REQ, signal,
+             CreateTrigReq::SignalLength, JBB, ls_ptr, 1);
+}
+
+void
+Dbdict::buildIndex_fromCreateConstraint(Signal* signal, Uint32 op_key, Uint32 ret)
+{
+  jam();
+
+  SchemaOpPtr op_ptr;
+  BuildIndexDataPtr buildIndexPtr;
+
+  findSchemaOp(op_ptr, buildIndexPtr, op_key);
+  ndbrequire(!op_ptr.isNull());
+  SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
+  const BuildIndxImplReq* impl_req = &buildIndexPtr.p->m_request;
+
+  D("buildIndex_fromCreateConstraint" << hex << V(op_key) << dec << V(ret));
+
+  if (ret == 0) {
+    jam();
+    const CreateTrigConf* conf =
+      (const CreateTrigConf*)signal->getDataPtr();
+
+    ndbrequire(conf->transId == trans_ptr.p->m_transId);
+    ndbrequire(buildIndexPtr.p->m_triggerOpIndex <
+               buildIndexPtr.p->m_triggerOpCount);
+    buildIndexPtr.p->m_triggerOpIndex += 1;
+    createSubOps(signal, op_ptr);
+  } else {
+    const CreateTrigRef* ref =
+      (const CreateTrigRef*)signal->getDataPtr();
+    ErrorInfo error;
+    setError(error, ref);
+    abortSubOps(signal, op_ptr, error);
+  }
+}
+
+void
+Dbdict::buildIndex_toDropConstraint(Signal* signal, SchemaOpPtr op_ptr)
+{
+  D("buildIndex_toDropConstraint");
+
+  SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
+  BuildIndexDataPtr buildIndexPtr;
+  getOpData(op_ptr, buildIndexPtr);
+  const BuildIndxImplReq* impl_req = &buildIndexPtr.p->m_request;
+
+  TableRecordPtr indexPtr;
+  c_tableRecordPool.getPtr(indexPtr, impl_req->indexId);
+
+  const Uint32 triggerNo = 0;
+  const TriggerTmpl& triggerTmpl = buildIndexPtr.p->m_triggerTmpl[triggerNo];
+
+  DropTrigReq* req = (DropTrigReq*)signal->getDataPtrSend();
+
+  Uint32 requestInfo = 0;
+  DictSignal::setRequestType(requestInfo, 0);
+
+  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->requestInfo = requestInfo;
+  req->tableId = impl_req->tableId;
+  req->tableVersion = 0; // impl_req->tableVersion;
+  req->indexId = impl_req->indexId;
+  req->indexVersion = 0; // impl_req->indexVersion;
+  req->triggerNo = triggerNo;
+  req->triggerId = RNIL;
+
+  // wl3600_todo use name now, connect by tree walk later
+
+  char triggerName[MAX_TAB_NAME_SIZE];
+  sprintf(triggerName, triggerTmpl.nameFormat, impl_req->indexId);
+
+  // name section
+  Uint32 buffer[2 + ((MAX_TAB_NAME_SIZE + 3) >> 2)];    // SP string
+  LinearWriter w(buffer, sizeof(buffer) >> 2);
+  w.reset();
+  w.add(DictTabInfo::TableName, triggerName);
+  LinearSectionPtr ls_ptr[3];
+  ls_ptr[0].p = buffer;
+  ls_ptr[0].sz = w.getWordsUsed();
+
+  sendSignal(reference(), GSN_DROP_TRIG_REQ, signal,
+             DropTrigReq::SignalLength, JBB, ls_ptr, 1);
+}
+
+void
+Dbdict::buildIndex_fromDropConstraint(Signal* signal, Uint32 op_key, Uint32 ret)
+{
+  jam();
+
+  SchemaOpPtr op_ptr;
+  BuildIndexDataPtr buildIndexPtr;
+
+  findSchemaOp(op_ptr, buildIndexPtr, op_key);
+  ndbrequire(!op_ptr.isNull());
+  SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
+  const BuildIndxImplReq* impl_req = &buildIndexPtr.p->m_request;
+
+  D("buildIndex_fromDropConstraint" << hex << V(op_key) << dec << V(ret));
+
+  if (ret == 0) {
+    const DropTrigConf* conf =
+      (const DropTrigConf*)signal->getDataPtr();
+
+    ndbrequire(conf->transId == trans_ptr.p->m_transId);
+    ndbrequire(buildIndexPtr.p->m_triggerOpIndex <
+               buildIndexPtr.p->m_triggerOpCount);
+    buildIndexPtr.p->m_triggerOpIndex += 1;
+    createSubOps(signal, op_ptr);
+  } else {
+    jam();
+    const DropTrigRef* ref =
+      (const DropTrigRef*)signal->getDataPtr();
+    ErrorInfo error;
+    setError(error, ref);
+    abortSubOps(signal, op_ptr, error);
+  }
+}
+
+void
 Dbdict::buildIndex_reply(Signal* signal, SchemaOpPtr op_ptr, ErrorInfo error)
 {
   jam();
@@ -16175,22 +14599,6 @@
 }
 
 void
-Dbdict::buildIndex_abortParse(Signal* signal, SchemaOpPtr op_ptr)
-{
-  D("buildIndex_abortParse" << *op_ptr.p);
-  // wl3600_todo
-  schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr);
-}
-
-void
-Dbdict::buildIndex_abortPrepare(Signal* signal, SchemaOpPtr op_ptr)
-{
-  D("buildIndex_abortPrepare" << *op_ptr.p);
-  ndbrequire(false);
-  schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr);
-}
-
-void
 Dbdict::buildIndex_toLocalOnline(Signal* signal, SchemaOpPtr op_ptr)
 {
   BuildIndexDataPtr buildIndexPtr;
@@ -16270,6 +14678,22 @@
 }
 
 void
+Dbdict::buildIndex_abortParse(Signal* signal, SchemaOpPtr op_ptr)
+{
+  D("buildIndex_abortParse" << *op_ptr.p);
+  // wl3600_todo
+  schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr);
+}
+
+void
+Dbdict::buildIndex_abortPrepare(Signal* signal, SchemaOpPtr op_ptr)
+{
+  D("buildIndex_abortPrepare" << *op_ptr.p);
+  ndbrequire(false);
+  schemaTrans_sendConf(signal, op_ptr.p->m_trans_ptr);
+}
+
+void
 Dbdict::execBUILD_INDX_IMPL_CONF(Signal* signal)
 {
   jamEntry();
@@ -16340,405 +14764,13 @@
   execute(signal, callback, ref->errorCode);
 }
 
-void
-Dbdict::buildIndex_recvReply(Signal* signal, const BuildIndxConf* conf,
-    const BuildIndxRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const BuildIndxReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == BuildIndxReq::RT_ALTER_INDEX) {
-    jam();
-    // part of alter index operation
-    AlterIndexDataPtr opPtr;
-    c_opAlterIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterIndex_fromBuildIndex(signal, opPtr);
-    return;
-  }
-
-  if (requestType == BuildIndxReq::RT_SYSTEMRESTART) {
-    jam();
-    if (ref == 0) {
-      infoEvent("DICT: index %u rebuild done", (unsigned)key);
-    } else {
-      warningEvent("DICT: index %u rebuild failed: code=%d line=%d node=%d",
-		   (unsigned)key, ref->getErrorCode());
-    }
-    rebuildIndexes(signal, key + 1);
-    return;
-  }
-
-  BuildIndexDataPtr opPtr;
-  c_opBuildIndex.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  opPtr.p->setError(ref);
-  if (requestType == BuildIndxReq::RT_TRIX) {
-    jam();
-    // forward to master
-    opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TRIX;
-    buildIndex_sendReply(signal, opPtr, false);
-    return;
-  }
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == BuildIndxReq::RT_DICT_COMMIT ||
-      requestType == BuildIndxReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    buildIndex_sendReply(signal, opPtr, true);
-    c_opBuildIndex.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = BuildIndxReq::RT_DICT_ABORT;
-    buildIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  if (indexPtr.p->isHashIndex()) {
-    if (requestType == BuildIndxReq::RT_DICT_PREPARE) {
-      jam();
-      if (! (opPtr.p->m_requestFlag & RequestFlag::RF_NOBUILD)) {
-        buildIndex_toCreateConstr(signal, opPtr);
-      } else {
-        opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TC;
-        buildIndex_sendSlaveReq(signal, opPtr);
-      }
-      return;
-    }
-    if (requestType == BuildIndxReq::RT_DICT_TRIX) {
-      jam();
-      ndbrequire(! (opPtr.p->m_requestFlag & RequestFlag::RF_NOBUILD));
-      buildIndex_toDropConstr(signal, opPtr);
-      return;
-    }
-    if (requestType == BuildIndxReq::RT_DICT_TC) {
-      jam();
-      opPtr.p->m_requestType = BuildIndxReq::RT_DICT_COMMIT;
-      buildIndex_sendSlaveReq(signal, opPtr);
-      return;
-    }
-  }
-  if (indexPtr.p->isOrderedIndex()) {
-    if (requestType == BuildIndxReq::RT_DICT_PREPARE) {
-      jam();
-      if (! (opPtr.p->m_requestFlag & RequestFlag::RF_NOBUILD)) {
-        opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TRIX;
-        buildIndex_sendSlaveReq(signal, opPtr);
-      } else {
-        opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TUX;
-        buildIndex_sendSlaveReq(signal, opPtr);
-      }
-      return;
-    }
-    if (requestType == BuildIndxReq::RT_DICT_TRIX) {
-      jam();
-      ndbrequire(! (opPtr.p->m_requestFlag & RequestFlag::RF_NOBUILD));
-      opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TUX;
-      buildIndex_sendSlaveReq(signal, opPtr);
-      return;
-    }
-    if (requestType == BuildIndxReq::RT_DICT_TUX) {
-      jam();
-      opPtr.p->m_requestType = BuildIndxReq::RT_DICT_COMMIT;
-      buildIndex_sendSlaveReq(signal, opPtr);
-      return;
-    }
-  }
-  ndbrequire(false);
-#endif
-} 
-
-void
-Dbdict::buildIndex_toCreateConstr(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  // request to create constraint trigger
-  CreateTrigReq* req = (CreateTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(CreateTrigReq::RT_BUILD_INDEX);
-  req->addRequestFlag(0);       // none
-  req->setTableId(indexPtr.i);
-  req->setIndexId(RNIL);
-  req->setTriggerId(RNIL);
-  req->setTriggerType(TriggerType::READ_ONLY_CONSTRAINT);
-  req->setTriggerActionTime(TriggerActionTime::TA_AFTER);
-  req->setTriggerEvent(TriggerEvent::TE_UPDATE);
-  req->setMonitorReplicas(false);
-  req->setMonitorAllAttributes(false);
-  req->setReportAllMonitoredAttributes(true);
-  req->setOnline(true);         // alter online after create
-  req->setReceiverRef(0);       // no receiver, REF-ed by TUP
-  req->getAttributeMask().clear();
-  // NDB$PK is last attribute
-  req->getAttributeMask().set(indexPtr.p->noOfAttributes - 1);
-  // name section
-  char triggerName[MAX_TAB_NAME_SIZE];
-  Uint32 buffer[2 + ((MAX_TAB_NAME_SIZE + 3) >> 2)];    // SP string
-  LinearWriter w(buffer, sizeof(buffer) >> 2);
-  LinearSectionPtr lsPtr[3];
-  sprintf(triggerName, "NDB$INDEX_%u_BUILD", indexPtr.i);
-  w.reset();
-  w.add(CreateTrigReq::TriggerNameKey, triggerName);
-  lsPtr[0].p = buffer;
-  lsPtr[0].sz = w.getWordsUsed();
-  sendSignal(reference(), GSN_CREATE_TRIG_REQ,
-      signal, CreateTrigReq::SignalLength, JBB, lsPtr, 1);
-#endif
-}
-
-void
-Dbdict::buildIndex_fromCreateConstr(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = BuildIndxReq::RT_DICT_ABORT;
-    buildIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TRIX;
-  buildIndex_sendSlaveReq(signal, opPtr);
-#endif
-}
-
-void
-Dbdict::buildIndex_buildTrix(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  TableRecordPtr tablePtr;
-  c_tableRecordPool.getPtr(tablePtr, indexPtr.p->primaryTableId);
-  // build request
-  BuildIndxReq* const req = (BuildIndxReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(BuildIndxReq::RT_TRIX);
-  req->setBuildId(0);   // not yet..
-  req->setBuildKey(0);  // ..in use
-  req->setIndexType(indexPtr.p->tableType);
-  req->setIndexId(indexPtr.i);
-  req->setTableId(indexPtr.p->primaryTableId);
-  req->setParallelism(16);
-  if (indexPtr.p->isHashIndex()) {
-    jam();
-    getIndexAttrList(indexPtr, opPtr.p->m_attrList);
-    getTableKeyList(tablePtr, opPtr.p->m_tableKeyList);
-    // send
-    LinearSectionPtr lsPtr[3];
-    lsPtr[0].sz = opPtr.p->m_attrList.sz;
-    lsPtr[0].p = opPtr.p->m_attrList.id;
-    lsPtr[1].sz = opPtr.p->m_tableKeyList.sz;
-    lsPtr[1].p = opPtr.p->m_tableKeyList.id;
-    sendSignal(calcTrixBlockRef(getOwnNodeId()), GSN_BUILDINDXREQ,
-        signal, BuildIndxReq::SignalLength, JBB, lsPtr, 2);
-    return;
-  }
-  if (indexPtr.p->isOrderedIndex()) {
-    jam();
-    sendSignal(calcTupBlockRef(getOwnNodeId()), GSN_BUILDINDXREQ,
-        signal, BuildIndxReq::SignalLength, JBB);
-    return;
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::buildIndex_toDropConstr(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  // request to drop constraint trigger
-  DropTrigReq* req = (DropTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(DropTrigReq::RT_BUILD_INDEX);
-  req->addRequestFlag(0);       // none
-  req->setTableId(indexPtr.i);
-  req->setIndexId(RNIL);
-  req->setTriggerId(opPtr.p->m_constrTriggerId);
-  req->setTriggerInfo(0);       // not used
-  sendSignal(reference(), GSN_DROP_TRIG_REQ,
-      signal, DropTrigReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::buildIndex_fromDropConstr(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = BuildIndxReq::RT_DICT_ABORT;
-    buildIndex_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  opPtr.p->m_requestType = BuildIndxReq::RT_DICT_TC;
-  buildIndex_sendSlaveReq(signal, opPtr);
-#endif
-}
-
-void
-Dbdict::buildIndex_toOnline(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TableRecordPtr indexPtr;
-  c_tableRecordPool.getPtr(indexPtr, opPtr.p->m_request.getIndexId());
-  TableRecordPtr tablePtr;
-  c_tableRecordPool.getPtr(tablePtr, indexPtr.p->primaryTableId);
-  // request to set index online in TC or TUX
-  AlterIndxReq* const req = (AlterIndxReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  if (opPtr.p->m_requestType == BuildIndxReq::RT_DICT_TC) {
-    jam();
-    req->setRequestType(AlterIndxReq::RT_TC);
-  } else if (opPtr.p->m_requestType == BuildIndxReq::RT_DICT_TUX) {
-    jam();
-    req->setRequestType(AlterIndxReq::RT_TUX);
-  } else {
-    ndbrequire(false);
-  }
-  req->setTableId(tablePtr.i);
-  req->setIndexId(indexPtr.i);
-  req->setIndexVersion(indexPtr.p->tableVersion);
-  req->setOnline(true);
-  BlockReference blockRef = 0;
-  if (opPtr.p->m_requestType == BuildIndxReq::RT_DICT_TC) {
-    jam();
-    blockRef = calcTcBlockRef(getOwnNodeId());
-  } else if (opPtr.p->m_requestType == BuildIndxReq::RT_DICT_TUX) {
-    jam();
-    blockRef = calcTuxBlockRef(getOwnNodeId());
-  } else {
-    ndbrequire(false);
-  }
-  // send
-  sendSignal(blockRef, GSN_ALTER_INDX_REQ,
-      signal, BuildIndxReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::buildIndex_fromOnline(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  jam();
-  // forward to master
-  buildIndex_sendReply(signal, opPtr, false);
-}
-
-void
-Dbdict::buildIndex_sendSlaveReq(Signal* signal, BuildIndexDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  BuildIndxReq* const req = (BuildIndxReq*)signal->getDataPtrSend();
-  *req = opPtr.p->m_request;
-  req->setUserRef(opPtr.p->m_coordinatorRef);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  if(opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL) {
-    jam();
-    opPtr.p->m_signalCounter.clearWaitingFor();
-    opPtr.p->m_signalCounter.setWaitingFor(getOwnNodeId());
-    sendSignal(reference(), GSN_BUILDINDXREQ,
-	       signal, BuildIndxReq::SignalLength, JBB);
-  } else {
-    jam();
-    opPtr.p->m_signalCounter = c_aliveNodes;
-    NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-    sendSignal(rg, GSN_BUILDINDXREQ,
-	       signal, BuildIndxReq::SignalLength, JBB);
-  }
-#endif
-}
-
-void
-Dbdict::buildIndex_sendReply(Signal* signal, BuildIndexDataPtr opPtr,
-    bool toUser)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  BuildIndxRef* rep = (BuildIndxRef*)signal->getDataPtrSend();
-  Uint32 gsn = GSN_BUILDINDXCONF;
-  Uint32 length = BuildIndxConf::InternalLength;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == BuildIndxReq::RT_DICT_ABORT)
-      sendRef = false;
-  } else {
-    sendRef = opPtr.p->hasError();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = BuildIndxConf::SignalLength;
-  }
-  rep->setIndexType(opPtr.p->m_request.getIndexType());
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setIndexId(opPtr.p->m_request.getIndexId());
-  if (sendRef) {
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->masterNodeId = opPtr.p->m_errorNode;
-    gsn = GSN_BUILDINDXREF;
-    length = BuildIndxRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
-}
-
 /**
  * MODULE: Create trigger
  *
  * Create trigger in all DICT blocks.  Optionally start alter trigger
  * operation to set the trigger online.
- *
- * Request type received in REQ and returned in CONF/REF:
- *
- * RT_USER - normal user e.g. BACKUP
- * RT_ALTER_INDEX - from alter index online
- * RT_DICT_PREPARE - seize operation in each DICT
- * RT_DICT_COMMIT - commit create in each DICT
- * RT_TC - sending to TC (operation alter trigger)
- * RT_LQH - sending to LQH (operation alter trigger)
  */
 
-// MODULE: CreateTrigger
-
 const Dbdict::OpInfo
 Dbdict::CreateTriggerData::g_opInfo = {
   GSN_CREATE_TRIG_IMPL_REQ,
@@ -16835,136 +14867,6 @@
 
   sendSignal(req->clientRef, GSN_CREATE_TRIG_REF, signal,
              CreateTrigRef::SignalLength, JBB);
-
-#if wl3600_todo //parts to createTrigger_parseCommon
-  jamEntry();
-  CreateTrigReq* const req = (CreateTrigReq*)signal->getDataPtrSend();
-  CreateTriggerDataPtr opPtr;
-  const Uint32 senderRef = signal->senderBlockRef();
-  const CreateTrigReq::RequestType requestType = req->getRequestType();
-  if (requestType == CreateTrigReq::RT_USER ||
-      requestType == CreateTrigReq::RT_ALTER_INDEX ||
-      requestType == CreateTrigReq::RT_BUILD_INDEX) {
-    jam();
-    if (! assembleFragments(signal)) {
-      jam();
-      return;
-    }
-    const bool isLocal = req->getRequestFlag() & RequestFlag::RF_LOCAL;
-    NdbNodeBitmask receiverNodes = c_aliveNodes;
-    if (isLocal) {
-      receiverNodes.clear();
-      receiverNodes.set(getOwnNodeId());
-    }
-    if (signal->getLength() == CreateTrigReq::SignalLength) {
-      jam();
-      if (! isLocal && getOwnNodeId() != c_masterNodeId) {
-        jam();
-
-	releaseSections(signal);
-	CreateTriggerData opBad;
-	opPtr.p = &opBad;
-	opPtr.p->save(req);
-	opPtr.p->m_errorCode = CreateTrigRef::NotMaster;
-	opPtr.p->m_errorLine = __LINE__;
-	opPtr.p->m_errorNode = c_masterNodeId;
-	createTrigger_sendReply(signal,  opPtr, true);
-        return;
-      }
-      // forward initial request plus operation key to all
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, receiverNodes);
-      sendSignal(rg, GSN_CREATE_TRIG_REQ,
-          signal, CreateTrigReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == CreateTrigReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    CreateTriggerData opBusy;
-    if (! c_opCreateTrigger.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = CreateTrigReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = CreateTrigRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      releaseSections(signal);
-      createTrigger_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opCreateTrigger.add(opPtr);
-    {
-      // save name
-      SegmentedSectionPtr ssPtr;
-      signal->getSection(ssPtr, CreateTrigReq::TRIGGER_NAME_SECTION);
-      SimplePropertiesSectionReader ssReader(ssPtr, getSectionSegmentPool());
-      if (ssReader.getKey() != CreateTrigReq::TriggerNameKey ||
-	  ! ssReader.getString(opPtr.p->m_triggerName)) {
-	jam();
-	opPtr.p->m_errorCode = CreateTrigRef::InvalidName;
-	opPtr.p->m_errorLine = __LINE__;
-	releaseSections(signal);
-	createTrigger_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-	return;
-      }
-    }
-    releaseSections(signal);
-    if(get_object(opPtr.p->m_triggerName) != 0){
-      jam();
-      opPtr.p->m_errorCode = CreateTrigRef::TriggerExists;
-      opPtr.p->m_errorLine = __LINE__;
-      createTrigger_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    
-    // master expects to hear from all
-    if (opPtr.p->m_isMaster)
-      opPtr.p->m_signalCounter = receiverNodes;
-    // check request in all participants
-    createTrigger_slavePrepare(signal, opPtr);
-    createTrigger_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opCreateTrigger.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == CreateTrigReq::RT_DICT_CREATE) {
-      jam();
-      // master has set trigger id
-      opPtr.p->m_request.setTriggerId(req->getTriggerId());
-      createTrigger_slaveCreate(signal, opPtr);
-      createTrigger_sendReply(signal, opPtr, false);
-      return;
-    }
-    if (requestType == CreateTrigReq::RT_DICT_COMMIT ||
-        requestType == CreateTrigReq::RT_DICT_ABORT) {
-      jam();
-      if (requestType == CreateTrigReq::RT_DICT_COMMIT)
-        createTrigger_slaveCommit(signal, opPtr);
-      else
-        createTrigger_slaveAbort(signal, opPtr);
-      createTrigger_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-        c_opCreateTrigger.release(opPtr);
-      return;
-    }
-  }
-  jam();
-  // return to sender
-  releaseSections(signal);
-  CreateTriggerData opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = CreateTrigRef::BadRequestType;
-  opPtr.p->m_errorLine = __LINE__;
-  createTrigger_sendReply(signal,  opPtr, true);
-#endif
 }
 
 void
@@ -17006,6 +14908,7 @@
     }
     const Uint32 bytesize = sizeof(createTriggerPtr.p->m_triggerName);
     memcpy(createTriggerPtr.p->m_triggerName, tableDesc.TableName, bytesize);
+    D("parsed trigger name: " << createTriggerPtr.p->m_triggerName);
   }
 
   // check name is unique
@@ -17079,7 +14982,7 @@
   triggerPtr.p->triggerInfo = impl_req->triggerInfo;
   triggerPtr.p->receiverRef = impl_req->receiverRef;
   triggerPtr.p->attributeMask = impl_req->attributeMask;
-  triggerPtr.p->triggerState = TriggerRecord::TS_OFFLINE;
+  triggerPtr.p->triggerState = TriggerRecord::TS_OFFLINE;//TS_DEFINING?
   {
     Rope name(c_rope_pool, triggerPtr.p->triggerName);
     if (!name.assign(createTriggerPtr.p->m_triggerName)) {
@@ -17108,30 +15011,6 @@
       (this->*(e->m_method))(signal, op_ptr);
     }
   }
-
-#if wl3600_todo //out
-  // wl3600_todo XXX this is the worst solution (sub-op fix for parent)
-  Uint32 triggerType = TriggerInfo::getTriggerType(impl_req->triggerInfo);
-  Uint32 triggerEvent = TriggerInfo::getTriggerEvent(impl_req->triggerInfo);
-  if (triggerType == TriggerType::SECONDARY_INDEX) {
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, impl_req->indexId);
-    if (triggerEvent == TriggerEvent::TE_INSERT)
-      indexPtr.p->indexTriggerId[0] = triggerPtr.p->triggerId;
-    if (triggerEvent == TriggerEvent::TE_DELETE)
-      indexPtr.p->indexTriggerId[1] = triggerPtr.p->triggerId;
-    if (triggerEvent == TriggerEvent::TE_UPDATE)
-      indexPtr.p->indexTriggerId[2] = triggerPtr.p->triggerId;
-    triggerPtr.p->indexId = impl_req->indexId;
-  }
-  if (triggerType == TriggerType::ORDERED_INDEX) {
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, impl_req->indexId);
-    if (triggerEvent == TriggerEvent::TE_CUSTOM)
-      indexPtr.p->indexTriggerId[0] = triggerPtr.p->triggerId;
-    triggerPtr.p->indexId = impl_req->indexId;
-  }
-#endif
 }
 
 bool
@@ -17183,21 +15062,6 @@
 
   sendSignal(reference(), GSN_ALTER_TRIG_REQ, signal,
              AlterTrigReq::SignalLength, JBB);
-
-#if wl3600_todo
-  jam();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(AlterTrigReq::RT_CREATE_TRIGGER);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  req->setTableId(opPtr.p->m_request.getTableId());
-  req->setTriggerId(opPtr.p->m_request.getTriggerId());
-  req->setTriggerInfo(0);       // not used
-  req->setOnline(true);
-  req->setReceiverRef(opPtr.p->m_request.getReceiverRef());
-  sendSignal(reference(), GSN_ALTER_TRIG_REQ,
-      signal, AlterTrigReq::SignalLength, JBB);
-#endif
 }
 
 void
@@ -17228,18 +15092,6 @@
     setError(error, ref);
     abortSubOps(signal, op_ptr, error);
   }
-
-#if wl3600_todo
-  jam();
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = CreateTrigReq::RT_DICT_ABORT;
-    createTrigger_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  opPtr.p->m_requestType = CreateTrigReq::RT_DICT_COMMIT;
-  createTrigger_sendSlaveReq(signal, opPtr);
-#endif
 }
 
 void
@@ -17401,349 +15253,10 @@
   execute(signal, op_ptr.p->m_callback, ref->errorCode);
 }
 
-void
-Dbdict::createTrigger_recvReply(Signal* signal, const CreateTrigConf* conf,
-    const CreateTrigRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const CreateTrigReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == CreateTrigReq::RT_ALTER_INDEX) {
-    jam();
-    // part of alter index operation
-    AlterIndexDataPtr opPtr;
-    c_opAlterIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterIndex_fromCreateTrigger(signal, opPtr);
-    return;
-  }
-  if (requestType == CreateTrigReq::RT_BUILD_INDEX) {
-    jam();
-    // part of build index operation
-    BuildIndexDataPtr opPtr;
-    c_opBuildIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    // fill in trigger id
-    opPtr.p->m_constrTriggerId = conf->getTriggerId();
-    buildIndex_fromCreateConstr(signal, opPtr);
-    return;
-  }
-  if (requestType == CreateTrigReq::RT_TC ||
-      requestType == CreateTrigReq::RT_LQH) {
-    jam();
-    // part of alter trigger operation
-    OpAlterTriggerPtr opPtr;
-    c_opAlterTrigger.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterTrigger_fromCreateLocal(signal, opPtr);
-    return;
-  }
-  CreateTriggerDataPtr opPtr;
-  c_opCreateTrigger.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  opPtr.p->setError(ref);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == CreateTrigReq::RT_DICT_COMMIT ||
-      requestType == CreateTrigReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    createTrigger_sendReply(signal, opPtr, true);
-    c_opCreateTrigger.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = CreateTrigReq::RT_DICT_ABORT;
-    createTrigger_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (requestType == CreateTrigReq::RT_DICT_PREPARE) {
-    jam();
-    // seize trigger id in master
-    createTrigger_masterSeize(signal, opPtr);
-    if (opPtr.p->hasError()) {
-      jam();
-      opPtr.p->m_requestType = CreateTrigReq::RT_DICT_ABORT;
-      createTrigger_sendSlaveReq(signal, opPtr);
-      return;
-    }
-    opPtr.p->m_requestType = CreateTrigReq::RT_DICT_CREATE;
-    createTrigger_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (requestType == CreateTrigReq::RT_DICT_CREATE) {
-    jam();
-    if (opPtr.p->m_request.getOnline()) {
-      jam();
-      // start alter online
-      createTrigger_toAlterTrigger(signal, opPtr);
-      return;
-    }
-    opPtr.p->m_requestType = CreateTrigReq::RT_DICT_COMMIT;
-    createTrigger_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::createTrigger_slavePrepare(Signal* signal, CreateTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const CreateTrigReq* const req = &opPtr.p->m_request;
-  // check trigger type
-  if (req->getRequestType() == CreateTrigReq::RT_USER &&
-      req->getTriggerType() == TriggerType::SUBSCRIPTION ||
-      req->getRequestType() == CreateTrigReq::RT_ALTER_INDEX &&
-      req->getTriggerType() == TriggerType::SECONDARY_INDEX ||
-      req->getRequestType() == CreateTrigReq::RT_ALTER_INDEX &&
-      req->getTriggerType() == TriggerType::ORDERED_INDEX ||
-      req->getRequestType() == CreateTrigReq::RT_BUILD_INDEX &&
-      req->getTriggerType() == TriggerType::READ_ONLY_CONSTRAINT) {
-    ;
-  } else {
-    jam();
-    opPtr.p->m_errorCode = CreateTrigRef::UnsupportedTriggerType;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  // check the table
-  const Uint32 tableId = req->getTableId();
-  if (! (tableId < c_tableRecordPool.getSize())) {
-    jam();
-    opPtr.p->m_errorCode = CreateTrigRef::InvalidTable;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  TableRecordPtr tablePtr;
-  c_tableRecordPool.getPtr(tablePtr, tableId);
-  if (tablePtr.p->tabState != TableRecord::DEFINED &&
-      tablePtr.p->tabState != TableRecord::BACKUP_ONGOING) {
-    jam();
-    opPtr.p->m_errorCode = CreateTrigRef::InvalidTable;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-#endif
-}
-
-void
-Dbdict::createTrigger_masterSeize(Signal* signal, CreateTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  TriggerRecordPtr triggerPtr;
-  if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL) {
-    triggerPtr.i = opPtr.p->m_request.getTriggerId();
-  } else {
-    triggerPtr.i = getFreeTriggerRecord();
-    if (triggerPtr.i == RNIL) {
-      jam();
-      opPtr.p->m_errorCode = CreateTrigRef::TooManyTriggers;
-      opPtr.p->m_errorLine = __LINE__;
-      return;
-    }
-  }
-  c_triggerRecordPool.getPtr(triggerPtr);
-  initialiseTriggerRecord(triggerPtr);
-  triggerPtr.p->triggerState = TriggerRecord::TS_DEFINING;
-  opPtr.p->m_request.setTriggerId(triggerPtr.i);
-#endif
-}
-
-void
-Dbdict::createTrigger_slaveCreate(Signal* signal, CreateTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const CreateTrigReq* const req = &opPtr.p->m_request;
-  // get the trigger record
-  const Uint32 triggerId = req->getTriggerId();
-  TriggerRecordPtr triggerPtr;
-  c_triggerRecordPool.getPtr(triggerPtr, triggerId);
-  initialiseTriggerRecord(triggerPtr);
-  // fill in trigger data
-  {
-    Rope name(c_rope_pool, triggerPtr.p->triggerName);
-    if(!name.assign(opPtr.p->m_triggerName))
-    {
-      opPtr.p->m_errorCode = (CreateTrigRef::ErrorCode)CreateTableRef::OutOfStringBuffer;
-      return;
-    }
-  }
-  triggerPtr.p->triggerId = triggerId;
-  triggerPtr.p->tableId = req->getTableId();
-  triggerPtr.p->indexId = RNIL;
-  triggerPtr.p->triggerType = req->getTriggerType();
-  triggerPtr.p->triggerActionTime = req->getTriggerActionTime();
-  triggerPtr.p->triggerEvent = req->getTriggerEvent();
-  triggerPtr.p->monitorReplicas = req->getMonitorReplicas();
-  triggerPtr.p->monitorAllAttributes = req->getMonitorAllAttributes();
-  triggerPtr.p->reportAllMonitoredAttributes = req->getReportAllMonitoredAttributes();
-  triggerPtr.p->attributeMask = req->getAttributeMask();
-  triggerPtr.p->triggerState = TriggerRecord::TS_OFFLINE;
-  // add to hash table
-  //  ndbout_c("++++++++++++ Adding trigger id %u, %s", triggerPtr.p->triggerId, triggerPtr.p->triggerName);
-  {
-    Ptr<DictObject> obj_ptr;
-    ndbrequire(c_obj_hash.seize(obj_ptr));
-    obj_ptr.p->m_name = triggerPtr.p->triggerName;
-    obj_ptr.p->m_id = triggerId;
-    obj_ptr.p->m_type = triggerPtr.p->triggerType;
-    obj_ptr.p->m_ref_count = 0;
-    c_obj_hash.add(obj_ptr);
-    triggerPtr.p->m_obj_ptr_i = obj_ptr.i;
-  }
-  if (triggerPtr.p->triggerType == TriggerType::SECONDARY_INDEX ||
-      triggerPtr.p->triggerType == TriggerType::ORDERED_INDEX) {
-    jam();
-    // connect to index record  XXX should be done in caller instead
-    triggerPtr.p->indexId = req->getIndexId();
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, triggerPtr.p->indexId);
-    switch (triggerPtr.p->triggerEvent) {
-    case TriggerEvent::TE_INSERT:
-      indexPtr.p->insertTriggerId = triggerPtr.p->triggerId;
-      break;
-    case TriggerEvent::TE_UPDATE:
-      indexPtr.p->updateTriggerId = triggerPtr.p->triggerId;
-      break;
-    case TriggerEvent::TE_DELETE:
-      indexPtr.p->deleteTriggerId = triggerPtr.p->triggerId;
-      break;
-    case TriggerEvent::TE_CUSTOM:
-      indexPtr.p->customTriggerId = triggerPtr.p->triggerId;
-      break;
-    default:
-      ndbrequire(false);
-      break;
-    }
-  }
-  if (triggerPtr.p->triggerType == TriggerType::READ_ONLY_CONSTRAINT) {
-    jam();
-    // connect to index record  XXX should be done in caller instead
-    triggerPtr.p->indexId = req->getTableId();
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, triggerPtr.p->indexId);
-    indexPtr.p->buildTriggerId = triggerPtr.p->triggerId;
-  }
-#endif
-}
-
-void
-Dbdict::createTrigger_slaveCommit(Signal* signal, CreateTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const CreateTrigReq* const req = &opPtr.p->m_request;
-  // get the trigger record
-  const Uint32 triggerId = req->getTriggerId();
-  TriggerRecordPtr triggerPtr;
-  c_triggerRecordPool.getPtr(triggerPtr, triggerId);
-  if (! req->getOnline()) {
-    triggerPtr.p->triggerState = TriggerRecord::TS_OFFLINE;
-  } else {
-    ndbrequire(triggerPtr.p->triggerState == TriggerRecord::TS_ONLINE);
-  }
-#endif
-}
-
-void
-Dbdict::createTrigger_slaveAbort(Signal* signal, CreateTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-#endif
-}
-
-void
-Dbdict::createTrigger_sendSlaveReq(Signal* signal, CreateTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  CreateTrigReq* const req = (CreateTrigReq*)signal->getDataPtrSend();
-  *req = opPtr.p->m_request;
-  req->setUserRef(opPtr.p->m_coordinatorRef);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  NdbNodeBitmask receiverNodes = c_aliveNodes;
-  if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL) {
-    receiverNodes.clear();
-    receiverNodes.set(getOwnNodeId());
-  }
-  opPtr.p->m_signalCounter = receiverNodes;
-  NodeReceiverGroup rg(DBDICT, receiverNodes);
-  sendSignal(rg, GSN_CREATE_TRIG_REQ,
-      signal, CreateTrigReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::createTrigger_sendReply(Signal* signal, CreateTriggerDataPtr opPtr,
-    bool toUser)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  CreateTrigRef* rep = (CreateTrigRef*)signal->getDataPtrSend();
-  Uint32 gsn = GSN_CREATE_TRIG_CONF;
-  Uint32 length = CreateTrigConf::InternalLength;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == CreateTrigReq::RT_DICT_ABORT)
-      sendRef = false;
-  } else {
-    sendRef = opPtr.p->hasError();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = CreateTrigConf::SignalLength;
-  }
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setIndexId(opPtr.p->m_request.getIndexId());
-  rep->setTriggerId(opPtr.p->m_request.getTriggerId());
-  rep->setTriggerInfo(opPtr.p->m_request.getTriggerInfo());
-  if (sendRef) {
-    if (opPtr.p->m_errorNode == 0)
-      opPtr.p->m_errorNode = getOwnNodeId();
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->setErrorLine(opPtr.p->m_errorLine);
-    rep->setErrorNode(opPtr.p->m_errorNode);
-    gsn = GSN_CREATE_TRIG_REF;
-    length = CreateTrigRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
-}
-
 /**
  * MODULE: Drop trigger.
  */
 
-// MODULE: DropTrigger
-
 const Dbdict::OpInfo
 Dbdict::DropTriggerData::g_opInfo = {
   GSN_DROP_TRIG_IMPL_REQ,
@@ -17837,133 +15350,6 @@
 
   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();
-  const DropTrigReq::RequestType requestType = req->getRequestType();
-
-  if (signal->getNoOfSections() > 0) {
-    ndbrequire(signal->getNoOfSections() == 1);
-    jam();
-    char triggerName[MAX_TAB_NAME_SIZE];
-    OpDropTrigger opTmp;
-    opPtr.p=&opTmp;
-
-    SegmentedSectionPtr ssPtr;
-    signal->getSection(ssPtr, DropTrigReq::TRIGGER_NAME_SECTION);
-    SimplePropertiesSectionReader ssReader(ssPtr, getSectionSegmentPool());
-    if (ssReader.getKey() != DropTrigReq::TriggerNameKey ||
-	! ssReader.getString(triggerName)) {
-      jam();
-      opPtr.p->m_errorCode = DropTrigRef::InvalidName;
-      opPtr.p->m_errorLine = __LINE__;
-      releaseSections(signal);
-      dropTrigger_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    releaseSections(signal);
-
-    //ndbout_c("++++++++++++++ Looking for trigger %s", keyRecord.triggerName);
-    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);
-    }
-  }
-  if (requestType == DropTrigReq::RT_USER ||
-      requestType == DropTrigReq::RT_ALTER_INDEX ||
-      requestType == DropTrigReq::RT_BUILD_INDEX) {
-    jam();
-    if (signal->getLength() == DropTrigReq::SignalLength) {
-      if (getOwnNodeId() != c_masterNodeId) {
-	jam();
-	// forward to DICT master
-	sendSignal(calcDictBlockRef(c_masterNodeId), GSN_DROP_TRIG_REQ,
-		   signal, signal->getLength(), JBB);
-	return;
-      }
-      if (!c_triggerRecordPool.findId(req->getTriggerId())) {
-	jam();
-	// return to sender
-	OpDropTrigger opBad;
-	opPtr.p = &opBad;
-	opPtr.p->save(req);
-        if (! (req->getRequestFlag() & RequestFlag::RF_FORCE)) {
-          opPtr.p->m_errorCode = DropTrigRef::TriggerNotFound;
-          opPtr.p->m_errorLine = __LINE__;
-        }
-	dropTrigger_sendReply(signal,  opPtr, true);
-	return;
-      }
-      // forward initial request plus operation key to all
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-      sendSignal(rg, GSN_DROP_TRIG_REQ,
-		 signal, DropTrigReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == DropTrigReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    OpDropTrigger opBusy;
-    if (! c_opDropTrigger.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = DropTrigReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = DropTrigRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      dropTrigger_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opDropTrigger.add(opPtr);
-      // master expects to hear from all
-    if (opPtr.p->m_isMaster)
-	opPtr.p->m_signalCounter = c_aliveNodes;
-    dropTrigger_slavePrepare(signal, opPtr);
-    dropTrigger_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opDropTrigger.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == DropTrigReq::RT_DICT_COMMIT ||
-	requestType == DropTrigReq::RT_DICT_ABORT) {
-      jam();
-      if (requestType == DropTrigReq::RT_DICT_COMMIT)
-	dropTrigger_slaveCommit(signal, opPtr);
-      else
-	dropTrigger_slaveAbort(signal, opPtr);
-      dropTrigger_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-	c_opDropTrigger.release(opPtr);
-      return;
-    }
-  }
-  jam();
-  // return to sender
-  OpDropTrigger opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = DropTrigRef::BadRequestType;
-  opPtr.p->m_errorLine = __LINE__;
-  dropTrigger_sendReply(signal,  opPtr, true);
-#endif
 }
 
 void
@@ -18015,6 +15401,7 @@
     }
     const Uint32 bytesize = sizeof(dropTriggerPtr.p->m_triggerName);
     memcpy(dropTriggerPtr.p->m_triggerName, tableDesc.TableName, bytesize);
+    D("parsed trigger name: " << dropTriggerPtr.p->m_triggerName);
 
     // find object by name and link it to operation
     DictObjectPtr obj_ptr;
@@ -18036,7 +15423,7 @@
   // check trigger id from user or via name
   TriggerRecordPtr triggerPtr;
   {
-    if (! (impl_req->triggerId < c_triggerRecordPool.getSize())) {
+    if (!(impl_req->triggerId < c_triggerRecordPool.getSize())) {
       jam();
       setError(error, DropTrigImplRef::TriggerNotFound, __LINE__);
       return;
@@ -18052,7 +15439,7 @@
     if (!findDictObject(op_ptr, obj_ptr, triggerPtr.p->m_obj_ptr_i)) {
       jam();
       // broken trigger object wl3600_todo bad error code
-      setError(error, DropTrigImplRef::TriggerNotFound, __LINE__);
+      setError(error, DropTrigRef::TriggerNotFound, __LINE__);
       return;
     }
     ndbrequire(obj_ptr.p->m_id == triggerPtr.p->triggerId);
@@ -18062,8 +15449,23 @@
     name.copy(dropTriggerPtr.p->m_triggerName); //wl3600_todo length check
   }
 
-  // check the table wl3600_todo
-  // check the index if any wl3600_todo
+  // check the table (must match trigger record)
+  {
+    if (impl_req->tableId != triggerPtr.p->tableId) {
+      jam();
+      setError(error, DropTrigRef::InvalidTable, __LINE__);
+      return;
+    }
+  }
+
+  // check the index (must match trigger record, maybe both RNIL)
+  {
+    if (impl_req->indexId != triggerPtr.p->indexId) {
+      jam();  // wl3600_todo wrong error code
+      setError(error, DropTrigRef::InvalidTable, __LINE__);
+      return;
+    }
+  }
 
   // execute feedback method, if any
   {
@@ -18124,22 +15526,6 @@
 
   sendSignal(reference(), GSN_ALTER_TRIG_REQ, signal,
              AlterTrigReq::SignalLength, JBB);
-
-#if wl3600_todo
-  jam();
-  AlterTrigReq* req = (AlterTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(AlterTrigReq::RT_DROP_TRIGGER);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  req->setTableId(opPtr.p->m_request.getTableId());
-  req->setTriggerId(opPtr.p->m_request.getTriggerId());
-  req->setTriggerInfo(0);       // not used
-  req->setOnline(false);
-  req->setReceiverRef(0);
-  sendSignal(reference(), GSN_ALTER_TRIG_REQ,
-      signal, AlterTrigReq::SignalLength, JBB);
-#endif
 }
 
 void
@@ -18172,13 +15558,6 @@
     setError(error, ref);
     abortSubOps(signal, op_ptr, error);
   }
-
-#if wl3600_todo
-  jam();
-  // remove in all
-  opPtr.p->m_requestType = DropTrigReq::RT_DICT_COMMIT;
-  dropTrigger_sendSlaveReq(signal, opPtr);
-#endif
 }
 
 void
@@ -18303,229 +15682,14 @@
   execute(signal, op_ptr.p->m_callback, ref->errorCode);
 }
 
-void
-Dbdict::dropTrigger_recvReply(Signal* signal, const DropTrigConf* conf,
-    const DropTrigRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const DropTrigReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == DropTrigReq::RT_ALTER_INDEX) {
-    jam();
-    // part of alter index operation
-    AlterIndexDataPtr opPtr;
-    c_opAlterIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterIndex_fromDropTrigger(signal, opPtr);
-    return;
-  }
-  if (requestType == DropTrigReq::RT_BUILD_INDEX) {
-    jam();
-    // part of build index operation
-    BuildIndexDataPtr opPtr;
-    c_opBuildIndex.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    buildIndex_fromDropConstr(signal, opPtr);
-    return;
-  }
-  if (requestType == DropTrigReq::RT_TC ||
-      requestType == DropTrigReq::RT_LQH) {
-    jam();
-    // part of alter trigger operation
-    OpAlterTriggerPtr opPtr;
-    c_opAlterTrigger.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    alterTrigger_fromDropLocal(signal, opPtr);
-    return;
-  }
-  OpDropTriggerPtr opPtr;
-  c_opDropTrigger.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  opPtr.p->setError(ref);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == DropTrigReq::RT_DICT_COMMIT ||
-      requestType == DropTrigReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    dropTrigger_sendReply(signal, opPtr, true);
-    c_opDropTrigger.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = DropTrigReq::RT_DICT_ABORT;
-    dropTrigger_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (requestType == DropTrigReq::RT_DICT_PREPARE) {
-    jam();
-    // start alter offline
-    dropTrigger_toAlterTrigger(signal, opPtr);
-    return;
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::dropTrigger_slavePrepare(Signal* signal, DropTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-#endif
-}
-
-void
-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);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  opPtr.p->m_signalCounter = c_aliveNodes;
-  NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-  sendSignal(rg, GSN_DROP_TRIG_REQ,
-      signal, DropTrigReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::dropTrigger_slaveCommit(Signal* signal, DropTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const DropTrigReq* const req = &opPtr.p->m_request;
-  // get trigger record
-  const Uint32 triggerId = req->getTriggerId();
-  TriggerRecordPtr triggerPtr;
-  c_triggerRecordPool.getPtr(triggerPtr, triggerId);
-  if (triggerPtr.p->triggerType == TriggerType::SECONDARY_INDEX ||
-      triggerPtr.p->triggerType == TriggerType::ORDERED_INDEX) {
-    jam();
-    // disconnect from index if index trigger  XXX move to drop index
-    triggerPtr.p->indexId = req->getIndexId();
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, triggerPtr.p->indexId);
-    ndbrequire(! indexPtr.isNull());
-    switch (triggerPtr.p->triggerEvent) {
-    case TriggerEvent::TE_INSERT:
-      indexPtr.p->insertTriggerId = RNIL;
-      break;
-    case TriggerEvent::TE_UPDATE:
-      indexPtr.p->updateTriggerId = RNIL;
-      break;
-    case TriggerEvent::TE_DELETE:
-      indexPtr.p->deleteTriggerId = RNIL;
-      break;
-    case TriggerEvent::TE_CUSTOM:
-      indexPtr.p->customTriggerId = RNIL;
-      break;
-    default:
-      ndbrequire(false);
-      break;
-    }
-  }
-  if (triggerPtr.p->triggerType == TriggerType::READ_ONLY_CONSTRAINT) {
-    jam();
-    // disconnect from index record  XXX should be done in caller instead
-    triggerPtr.p->indexId = req->getTableId();
-    TableRecordPtr indexPtr;
-    c_tableRecordPool.getPtr(indexPtr, triggerPtr.p->indexId);
-    indexPtr.p->buildTriggerId = RNIL;
-  }
-  //remove trigger
-  //ndbout_c("++++++++++++ Removing trigger id %u, %s", triggerPtr.p->triggerId, triggerPtr.p->triggerName);
-  release_object(triggerPtr.p->m_obj_ptr_i);
-  triggerPtr.p->triggerState = TriggerRecord::TS_NOT_DEFINED;
-#endif
-}
-
-void
-Dbdict::dropTrigger_slaveAbort(Signal* signal, DropTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-#endif
-}
-
-void
-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;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == DropTrigReq::RT_DICT_ABORT)
-      sendRef = false;
-  } else {
-    sendRef = opPtr.p->hasError();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = DropTrigConf::SignalLength;
-  }
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setIndexId(opPtr.p->m_request.getIndexId());
-  rep->setTriggerId(opPtr.p->m_request.getTriggerId());
-  if (sendRef) {
-    if (opPtr.p->m_errorNode == 0)
-      opPtr.p->m_errorNode = getOwnNodeId();
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->setErrorLine(opPtr.p->m_errorLine);
-    rep->setErrorNode(opPtr.p->m_errorNode);
-    gsn = GSN_DROP_TRIG_REF;
-    length = CreateTrigRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
-}
-
 /**
  * MODULE: Alter trigger.
  *
  * Alter trigger state.  Alter online creates the trigger first in all
- * TC (if index trigger) and then in all LQH-TUP.
- *
- * Request type received in REQ and returned in CONF/REF:
- *
- * RT_USER - normal user e.g. BACKUP
- * RT_CREATE_TRIGGER - from create trigger
- * RT_DROP_TRIGGER - from drop trigger
- * RT_DICT_PREPARE - seize operations and check request
- * RT_DICT_TC - master to each DICT on way to TC
- * RT_DICT_LQH - master to each DICT on way to LQH-TUP
- * RT_DICT_COMMIT - commit state change in each DICT (no reply)
+ * TC (if index trigger) and then in all LQH-TUP.  Alter offline drops
+ * it in opposite order.
  */
 
-// MODULE: AlterTrigger
-
 const Dbdict::OpInfo
 Dbdict::AlterTriggerData::g_opInfo = {
   GSN_ALTER_TRIG_IMPL_REQ,
@@ -18613,103 +15777,6 @@
 
   sendSignal(req->clientRef, GSN_ALTER_TRIG_REF, signal,
              AlterTrigRef::SignalLength, JBB);
-
-#if wl3600_todo
-  jamEntry();
-  AlterTrigReq* const req = (AlterTrigReq*)signal->getDataPtrSend();
-  OpAlterTriggerPtr opPtr;
-  const Uint32 senderRef = signal->senderBlockRef();
-  const AlterTrigReq::RequestType requestType = req->getRequestType();
-  if (requestType == AlterTrigReq::RT_USER ||
-      requestType == AlterTrigReq::RT_CREATE_TRIGGER ||
-      requestType == AlterTrigReq::RT_DROP_TRIGGER) {
-    jam();
-    const bool isLocal = req->getRequestFlag() & RequestFlag::RF_LOCAL;
-    NdbNodeBitmask receiverNodes = c_aliveNodes;
-    if (isLocal) {
-      receiverNodes.clear();
-      receiverNodes.set(getOwnNodeId());
-    }
-    if (signal->getLength() == AlterTrigReq::SignalLength) {
-      jam();
-      if (! isLocal && getOwnNodeId() != c_masterNodeId) {
-        jam();
-        // forward to DICT master
-        sendSignal(calcDictBlockRef(c_masterNodeId), GSN_ALTER_TRIG_REQ,
-            signal, AlterTrigReq::SignalLength, JBB);
-        return;
-      }
-      // forward initial request plus operation key to all
-      req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, receiverNodes);
-      sendSignal(rg, GSN_ALTER_TRIG_REQ,
-          signal, AlterTrigReq::SignalLength + 1, JBB);
-      return;
-    }
-    // seize operation record
-    ndbrequire(signal->getLength() == AlterTrigReq::SignalLength + 1);
-    const Uint32 opKey = req->getOpKey();
-    OpAlterTrigger opBusy;
-    if (! c_opAlterTrigger.seize(opPtr))
-      opPtr.p = &opBusy;
-    opPtr.p->save(req);
-    opPtr.p->m_coordinatorRef = senderRef;
-    opPtr.p->m_isMaster = (senderRef == reference());
-    opPtr.p->key = opKey;
-    opPtr.p->m_requestType = AlterTrigReq::RT_DICT_PREPARE;
-    if (opPtr.p == &opBusy) {
-      jam();
-      opPtr.p->m_errorCode = AlterTrigRef::Busy;
-      opPtr.p->m_errorLine = __LINE__;
-      alterTrigger_sendReply(signal, opPtr, opPtr.p->m_isMaster);
-      return;
-    }
-    c_opAlterTrigger.add(opPtr);
-    // master expects to hear from all
-    if (opPtr.p->m_isMaster) {
-      opPtr.p->m_nodes = receiverNodes;
-      opPtr.p->m_signalCounter = receiverNodes;
-    }
-    alterTrigger_slavePrepare(signal, opPtr);
-    alterTrigger_sendReply(signal, opPtr, false);
-    return;
-  }
-  c_opAlterTrigger.find(opPtr, req->getConnectionPtr());
-  if (! opPtr.isNull()) {
-    opPtr.p->m_requestType = requestType;
-    if (requestType == AlterTrigReq::RT_DICT_TC ||
-        requestType == AlterTrigReq::RT_DICT_LQH) {
-      jam();
-      if (req->getOnline())
-        alterTrigger_toCreateLocal(signal, opPtr);
-      else
-        alterTrigger_toDropLocal(signal, opPtr);
-      return;
-    }
-    if (requestType == AlterTrigReq::RT_DICT_COMMIT ||
-        requestType == AlterTrigReq::RT_DICT_ABORT) {
-      jam();
-      if (requestType == AlterTrigReq::RT_DICT_COMMIT)
-        alterTrigger_slaveCommit(signal, opPtr);
-      else
-        alterTrigger_slaveAbort(signal, opPtr);
-      alterTrigger_sendReply(signal, opPtr, false);
-      // done in slave
-      if (! opPtr.p->m_isMaster)
-        c_opAlterTrigger.release(opPtr);
-      return;
-    }
-  }
-  jam();
-  // return to sender
-  OpAlterTrigger opBad;
-  opPtr.p = &opBad;
-  opPtr.p->save(req);
-  opPtr.p->m_errorCode = AlterTrigRef::BadRequestType;
-  opPtr.p->m_errorLine = __LINE__;
-  alterTrigger_sendReply(signal, opPtr, true);
-  return;
-#endif
 }
 
 void
@@ -18743,11 +15810,17 @@
     const Uint32 triggerId = impl_req->triggerId;
     if (! (impl_req->triggerId < c_triggerRecordPool.getSize())) {
       jam();
-      setError(error, AlterTrigImplRef::TriggerNotFound, __LINE__);
+      setError(error, AlterTrigRef::TriggerNotFound, __LINE__);
       return;
     }
+
     c_triggerRecordPool.getPtr(triggerPtr, impl_req->triggerId);
-    // wl3600_todo state check
+
+    if (triggerPtr.p->triggerState == TriggerRecord::TS_NOT_DEFINED) {
+      jam();
+      setError(error, AlterTrigRef::TriggerNotFound, __LINE__);
+      return;
+    }
   }
 
   // set local triggers wl3600_todo maybe use requestType
@@ -18875,6 +15948,7 @@
   req->tableVersion = 0; // not used
   req->indexId = triggerPtr.p->indexId;
   req->indexVersion = 0; // not used
+  req->triggerNo = triggerNo; // not used
   req->triggerId = triggerPtr.p->triggerId;
   req->triggerInfo = triggerPtr.p->triggerInfo;
   req->receiverRef = triggerPtr.p->receiverRef;
@@ -18917,6 +15991,7 @@
   req->tableVersion = 0; // not used
   req->indexId = triggerPtr.p->indexId;
   req->indexVersion = 0; // not used
+  req->triggerNo = triggerNo; // not used
   req->triggerId = triggerPtr.p->triggerId;
   req->triggerInfo = triggerPtr.p->triggerInfo;
 
@@ -19106,12 +16181,6 @@
   SchemaOpPtr op_ptr;
   findSchemaOp(op_ptr, conf->clientData);
   execute(signal, op_ptr.p->m_callback, 0);
-
-#if wl3600_todo
-  jamEntry();
-  AlterTrigConf* conf = (AlterTrigConf*)signal->getDataPtrSend();
-  alterTrigger_recvReply(signal, conf, 0);
-#endif
 }
 
 void
@@ -19124,426 +16193,12 @@
     (const AlterTrigRef*)signal->getDataPtr();
 
   D("execALTER_TRIG_REF" << hex << V(ref->clientData)
-                          << dec << V(ref->errorCode));
+                         << 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);
-
-#if wl3600_todo
-  jamEntry();
-  AlterTrigRef* ref = (AlterTrigRef*)signal->getDataPtrSend();
-  alterTrigger_recvReply(signal, ref->getConf(), ref);
-#endif
-}
-
-void
-Dbdict::alterTrigger_recvReply(Signal* signal, const AlterTrigConf* conf,
-    const AlterTrigRef* ref)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const Uint32 senderRef = signal->senderBlockRef();
-  const AlterTrigReq::RequestType requestType = conf->getRequestType();
-  const Uint32 key = conf->getConnectionPtr();
-  if (requestType == AlterTrigReq::RT_CREATE_TRIGGER) {
-    jam();
-    // part of create trigger operation
-    CreateTriggerDataPtr opPtr;
-    c_opCreateTrigger.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    createTrigger_fromAlterTrigger(signal, opPtr);
-    return;
-  }
-  if (requestType == AlterTrigReq::RT_DROP_TRIGGER) {
-    jam();
-    // part of drop trigger operation
-    OpDropTriggerPtr opPtr;
-    c_opDropTrigger.find(opPtr, key);
-    ndbrequire(! opPtr.isNull());
-    opPtr.p->setError(ref);
-    dropTrigger_fromAlterTrigger(signal, opPtr);
-    return;
-  }
-  OpAlterTriggerPtr opPtr;
-  c_opAlterTrigger.find(opPtr, key);
-  ndbrequire(! opPtr.isNull());
-  ndbrequire(opPtr.p->m_isMaster);
-  ndbrequire(opPtr.p->m_requestType == requestType);
-  /* 
-   * If refuse on drop trig, because of non-existent trigger,
-   * comes from anyone but the master node - ignore it and
-   * remove the node from forter ALTER_TRIG communication
-   * This will happen if a new node has started since the
-   * trigger whas created.
-   */
-  if (ref &&
-      refToNode(senderRef) != refToNode(reference()) &&
-      opPtr.p->m_request.getRequestType() == AlterTrigReq::RT_DROP_TRIGGER &&
-      ref->getErrorCode() == AlterTrigRef::TriggerNotFound) {
-    jam();
-    ref = 0;                                      // ignore this error
-    opPtr.p->m_nodes.clear(refToNode(senderRef)); // remove this from group
-  }
-  opPtr.p->setError(ref);
-  opPtr.p->m_signalCounter.clearWaitingFor(refToNode(senderRef));
-  if (! opPtr.p->m_signalCounter.done()) {
-    jam();
-    return;
-  }
-  if (requestType == AlterTrigReq::RT_DICT_COMMIT ||
-      requestType == AlterTrigReq::RT_DICT_ABORT) {
-    jam();
-    // send reply to user
-    alterTrigger_sendReply(signal, opPtr, true);
-    c_opAlterTrigger.release(opPtr);
-    return;
-  }
-  if (opPtr.p->hasError()) {
-    jam();
-    opPtr.p->m_requestType = AlterTrigReq::RT_DICT_ABORT;
-    alterTrigger_sendSlaveReq(signal, opPtr);
-    return;
-  }
-  if (! (opPtr.p->m_request.getRequestFlag() & RequestFlag::RF_NOTCTRIGGER)) {
-    if (requestType == AlterTrigReq::RT_DICT_PREPARE) {
-      jam();
-      if (opPtr.p->m_request.getOnline()) {
-        jam();
-        opPtr.p->m_requestType = AlterTrigReq::RT_DICT_TC;
-      } else {
-        jam();
-        opPtr.p->m_requestType = AlterTrigReq::RT_DICT_LQH;
-      }
-      alterTrigger_sendSlaveReq(signal, opPtr);
-      return;
-    }
-    if (requestType == AlterTrigReq::RT_DICT_TC) {
-      jam();
-      if (opPtr.p->m_request.getOnline()) {
-        jam();
-        opPtr.p->m_requestType = AlterTrigReq::RT_DICT_LQH;
-      } else {
-        jam();
-        opPtr.p->m_requestType = AlterTrigReq::RT_DICT_COMMIT;
-      }
-      alterTrigger_sendSlaveReq(signal, opPtr);
-      return;
-    }
-    if (requestType == AlterTrigReq::RT_DICT_LQH) {
-      jam();
-      if (opPtr.p->m_request.getOnline()) {
-        jam();
-        opPtr.p->m_requestType = AlterTrigReq::RT_DICT_COMMIT;
-      } else {
-        jam();
-        opPtr.p->m_requestType = AlterTrigReq::RT_DICT_TC;
-      }
-      alterTrigger_sendSlaveReq(signal, opPtr);
-      return;
-    }
-  } else {
-    if (requestType == AlterTrigReq::RT_DICT_PREPARE) {
-      jam();
-      opPtr.p->m_requestType = AlterTrigReq::RT_DICT_LQH;
-      alterTrigger_sendSlaveReq(signal, opPtr);
-      return;
-    }
-    if (requestType == AlterTrigReq::RT_DICT_LQH) {
-      jam();
-      opPtr.p->m_requestType = AlterTrigReq::RT_DICT_COMMIT;
-      alterTrigger_sendSlaveReq(signal, opPtr);
-      return;
-    }
-  }
-  ndbrequire(false);
-#endif
-}
-
-void
-Dbdict::alterTrigger_slavePrepare(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  const AlterTrigReq* const req = &opPtr.p->m_request;
-  const Uint32 triggerId = req->getTriggerId();
-  TriggerRecordPtr triggerPtr;
-  if (! (triggerId < c_triggerRecordPool.getSize())) {
-    jam();
-    opPtr.p->m_errorCode = AlterTrigRef::TriggerNotFound;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-  c_triggerRecordPool.getPtr(triggerPtr, triggerId);
-  if (triggerPtr.p->triggerState == TriggerRecord::TS_NOT_DEFINED) {
-    jam();
-    opPtr.p->m_errorCode = AlterTrigRef::TriggerNotFound;
-    opPtr.p->m_errorLine = __LINE__;
-    return;
-  }
-
-  if (triggerPtr.p->triggerType == TriggerType::SUBSCRIPTION)
-  {
-    opPtr.p->m_request.addRequestFlag(RequestFlag::RF_NOTCTRIGGER);
-  }
-#endif
-}
-
-#if wl3600_todo
-void
-Dbdict::alterTrigger_toCreateLocal(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  // find trigger record
-  const Uint32 triggerId = opPtr.p->m_request.getTriggerId();
-  TriggerRecordPtr triggerPtr;
-  c_triggerRecordPool.getPtr(triggerPtr, triggerId);
-  CreateTrigReq* const req = (CreateTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_TC) {
-    jam();
-    req->setRequestType(CreateTrigReq::RT_TC);
-  } else if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_LQH) {
-    jam();
-    req->setRequestType(CreateTrigReq::RT_LQH);
-  } else {
-    ndbassert(false);
-  }
-  req->setTableId(triggerPtr.p->tableId);
-  req->setIndexId(triggerPtr.p->indexId);
-  req->setTriggerId(triggerPtr.i);
-  req->setTriggerType(triggerPtr.p->triggerType);
-  req->setTriggerActionTime(triggerPtr.p->triggerActionTime);
-  req->setTriggerEvent(triggerPtr.p->triggerEvent);
-  req->setMonitorReplicas(triggerPtr.p->monitorReplicas);
-  req->setMonitorAllAttributes(triggerPtr.p->monitorAllAttributes);
-  req->setReportAllMonitoredAttributes(triggerPtr.p->reportAllMonitoredAttributes);
-  req->setOnline(true);
-  req->setReceiverRef(opPtr.p->m_request.getReceiverRef());
-  BlockReference blockRef = 0;
-  if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_TC) {
-    jam();
-    blockRef = calcTcBlockRef(getOwnNodeId());
-  } else if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_LQH) {
-    jam();
-    blockRef = calcLqhBlockRef(getOwnNodeId());
-  } else {
-    ndbassert(false);
-  }
-  req->setAttributeMask(triggerPtr.p->attributeMask);
-  sendSignal(blockRef, GSN_CREATE_TRIG_REQ,
-      signal, CreateTrigReq::SignalLength, JBB);
-}
-#endif
-
-#if wl3600_todo
-void
-Dbdict::alterTrigger_fromCreateLocal(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  if (! opPtr.p->hasLastError()) {
-    // mark created locally
-    TriggerRecordPtr triggerPtr;
-    c_triggerRecordPool.getPtr(triggerPtr, opPtr.p->m_request.getTriggerId());
-    if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_TC) {
-      jam();
-      triggerPtr.p->triggerLocal |= TriggerRecord::TL_CREATED_TC;
-    } else if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_LQH) {
-      jam();
-      triggerPtr.p->triggerLocal |= TriggerRecord::TL_CREATED_LQH;
-    } else {
-      ndbrequire(false);
-    }
-  }
-  // forward CONF or REF to master
-  alterTrigger_sendReply(signal, opPtr, false);
-}
-#endif
-
-#if wl3600_todo
-void
-Dbdict::alterTrigger_toDropLocal(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  TriggerRecordPtr triggerPtr;
-  c_triggerRecordPool.getPtr(triggerPtr, opPtr.p->m_request.getTriggerId());
-  DropTrigReq* const req = (DropTrigReq*)signal->getDataPtrSend();
-  req->setUserRef(reference());
-  req->setConnectionPtr(opPtr.p->key);
-  if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_TC) {
-    jam();
-    // broken trigger allowed if force
-    if (! (triggerPtr.p->triggerLocal & TriggerRecord::TL_CREATED_TC)) {
-      jam();
-      ndbassert(opPtr.p->m_requestFlag & RequestFlag::RF_FORCE);
-      alterTrigger_sendReply(signal, opPtr, false);
-      return;
-    }
-    req->setRequestType(DropTrigReq::RT_TC);
-  } else if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_LQH) {
-    jam();
-    // broken trigger allowed if force
-    if (! (triggerPtr.p->triggerLocal & TriggerRecord::TL_CREATED_LQH)) {
-      jam();
-      ndbassert(opPtr.p->m_requestFlag & RequestFlag::RF_FORCE);
-      alterTrigger_sendReply(signal, opPtr, false);
-      return;
-    }
-    req->setRequestType(DropTrigReq::RT_LQH);
-  } else {
-    ndbassert(false);
-  }
-  req->setTableId(triggerPtr.p->tableId);
-  req->setIndexId(triggerPtr.p->indexId);
-  req->setTriggerId(triggerPtr.i);
-  req->setTriggerType(triggerPtr.p->triggerType);
-  req->setTriggerActionTime(triggerPtr.p->triggerActionTime);
-  req->setTriggerEvent(triggerPtr.p->triggerEvent);
-  req->setMonitorReplicas(triggerPtr.p->monitorReplicas);
-  req->setMonitorAllAttributes(triggerPtr.p->monitorAllAttributes);
-  BlockReference blockRef = 0;
-  if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_TC) {
-    jam();
-    blockRef = calcTcBlockRef(getOwnNodeId());
-  } else if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_LQH) {
-    jam();
-    blockRef = calcLqhBlockRef(getOwnNodeId());
-  } else {
-    ndbassert(false);
-  }
-  sendSignal(blockRef, GSN_DROP_TRIG_REQ,
-      signal, DropTrigReq::SignalLength, JBB);
-}
-#endif
-
-#if wl3600_todo
-void
-Dbdict::alterTrigger_fromDropLocal(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-  jam();
-  if (! opPtr.p->hasLastError()) {
-    // mark dropped locally
-    TriggerRecordPtr triggerPtr;
-    c_triggerRecordPool.getPtr(triggerPtr, opPtr.p->m_request.getTriggerId());
-    if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_TC) {
-      jam();
-      triggerPtr.p->triggerLocal &= ~TriggerRecord::TL_CREATED_TC;
-    } else if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_LQH) {
-      jam();
-      triggerPtr.p->triggerLocal &= ~TriggerRecord::TL_CREATED_LQH;
-    } else {
-      ndbrequire(false);
-    }
-  }
-  // forward CONF or REF to master
-  alterTrigger_sendReply(signal, opPtr, false);
-}
-#endif
-
-void
-Dbdict::alterTrigger_slaveCommit(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  TriggerRecordPtr triggerPtr;
-  c_triggerRecordPool.getPtr(triggerPtr, opPtr.p->m_request.getTriggerId());
-  // set state
-  triggerPtr.p->triggerState = TriggerRecord::TS_ONLINE;
-#endif
-}
-
-void
-Dbdict::alterTrigger_slaveAbort(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-#endif
-}
-
-void
-Dbdict::alterTrigger_sendSlaveReq(Signal* signal, AlterTriggerDataPtr opPtr)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  AlterTrigReq* const req = (AlterTrigReq*)signal->getDataPtrSend();
-  *req = opPtr.p->m_request;
-  req->setUserRef(opPtr.p->m_coordinatorRef);
-  req->setConnectionPtr(opPtr.p->key);
-  req->setRequestType(opPtr.p->m_requestType);
-  req->addRequestFlag(opPtr.p->m_requestFlag);
-  NdbNodeBitmask receiverNodes = c_aliveNodes;
-  if (opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL) {
-    receiverNodes.clear();
-    receiverNodes.set(getOwnNodeId());
-  } else {
-    opPtr.p->m_nodes.bitAND(receiverNodes);
-    receiverNodes = opPtr.p->m_nodes;
-  }
-  opPtr.p->m_signalCounter = receiverNodes;
-  NodeReceiverGroup rg(DBDICT, receiverNodes);
-  sendSignal(rg, GSN_ALTER_TRIG_REQ,
-      signal, AlterTrigReq::SignalLength, JBB);
-#endif
-}
-
-void
-Dbdict::alterTrigger_sendReply(Signal* signal, AlterTriggerDataPtr opPtr,
-    bool toUser)
-{
-  ndbrequire(false);
-#if wl3600_todo
-  jam();
-  AlterTrigRef* rep = (AlterTrigRef*)signal->getDataPtrSend();
-  Uint32 gsn = GSN_ALTER_TRIG_CONF;
-  Uint32 length = AlterTrigConf::InternalLength;
-  bool sendRef;
-  if (! toUser) {
-    sendRef = opPtr.p->hasLastError();
-    rep->setUserRef(opPtr.p->m_coordinatorRef);
-    rep->setConnectionPtr(opPtr.p->key);
-    rep->setRequestType(opPtr.p->m_requestType);
-    if (opPtr.p->m_requestType == AlterTrigReq::RT_DICT_ABORT) {
-      jam();
-      sendRef = false;
-    } else {
-      jam();
-    }
-  } else {
-    sendRef = opPtr.p->hasError();
-    jam();
-    rep->setUserRef(opPtr.p->m_request.getUserRef());
-    rep->setConnectionPtr(opPtr.p->m_request.getConnectionPtr());
-    rep->setRequestType(opPtr.p->m_request.getRequestType());
-    length = AlterTrigConf::SignalLength;
-  }
-  rep->setTableId(opPtr.p->m_request.getTableId());
-  rep->setTriggerId(opPtr.p->m_request.getTriggerId());
-  if (sendRef) {
-    if (opPtr.p->m_errorNode == 0) {
-      jam();
-      opPtr.p->m_errorNode = getOwnNodeId();
-    } else {
-      jam();
-    }
-    rep->setErrorCode(opPtr.p->m_errorCode);
-    rep->setErrorLine(opPtr.p->m_errorLine);
-    rep->setErrorNode(opPtr.p->m_errorNode);
-    gsn = GSN_ALTER_TRIG_REF;
-    length = AlterTrigRef::SignalLength;
-  }
-  sendSignal(rep->getUserRef(), gsn, signal, length, JBB);
-#endif
 }
 
 /**

--- 1.77/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2007-03-05 09:52:19 +02:00
+++ 1.78/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2007-03-07 17:57:21 +02:00
@@ -430,6 +430,7 @@
     };
     TriggerState triggerState;
 
+    // wl3600_todo remove, handle by new abort code
     /** Trigger state in other blocks on this node */
     enum IndexLocal {
       TL_CREATED_TC = 1 << 0,   // created in TC
@@ -754,8 +755,6 @@
 
   // Index signals
   void execCREATE_INDX_REQ(Signal* signal);
-  void execCREATE_INDX_CONF(Signal* signal);
-  void execCREATE_INDX_REF(Signal* signal);
 
   void execALTER_INDX_REQ(Signal* signal);
   void execALTER_INDX_CONF(Signal* signal);
@@ -768,8 +767,6 @@
   void execCREATE_TABLE_REF(Signal* signal);
 
   void execDROP_INDX_REQ(Signal* signal);
-  void execDROP_INDX_CONF(Signal* signal);
-  void execDROP_INDX_REF(Signal* signal);
 
   void execDROP_TABLE_CONF(Signal* signal);
   void execDROP_TABLE_REF(Signal* signal);
@@ -2101,7 +2098,7 @@
     void print(NdbOut&) const;
 #endif
 
-#ifdef wl3600_todo
+#if wl3600_todo
     Uint32 m_changeMask;
     Uint32 m_senderRef;
     Uint32 m_senderData;
@@ -2291,99 +2288,6 @@
 #ifdef VM_TRACE
     void print(NdbOut&) const;
 #endif
-
-    // original request (index id will be added)
-    //CreateIndxReq m_request;
-    bool m_loggedIndex;
-    bool m_temporaryIndex;
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    CreateIndxReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    // error info
-    CreateIndxRef::ErrorCode m_lastError;
-    CreateIndxRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    // ctor
-#if wl3600_todo //out from here to end
-    OpCreateIndex() {
-      memset(&m_request, 0, sizeof(m_request));
-      m_coordinatorRef = 0;
-      m_requestType = CreateIndxReq::RT_UNDEFINED;
-      m_requestFlag = 0;
-      m_lastError = CreateIndxRef::NoError;
-      m_errorCode = CreateIndxRef::NoError;
-      m_errorLine = 0;
-      m_errorNode = 0;
-    }
-#endif
-    void save(const CreateIndxReq* req) {
-#if wl3600_todo
-      m_request = *req;
-      m_requestType = req->getRequestType();
-      m_requestFlag = req->getRequestFlag();
-#endif
-    }
-    bool hasLastError() {
-#if wl3600_todo
-      return m_lastError != CreateIndxRef::NoError;
-#endif
-    }
-    bool hasError() {
-#if wl3600_todo
-      return m_errorCode != CreateIndxRef::NoError;
-#endif
-    }
-    void setError(const CreateIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = CreateIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const CreateTableRef* ref) {
-#if wl3600_todo
-      m_lastError = CreateIndxRef::NoError;
-      if (ref != 0) {
-        switch (ref->getErrorCode()) {
-        case CreateTableRef::TableAlreadyExist:
-          m_lastError = CreateIndxRef::IndexExists;
-          break;
-        default:
-          m_lastError = (CreateIndxRef::ErrorCode)ref->getErrorCode();
-          break;
-        }
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-        }
-      }
-#endif
-    }
-    void setError(const AlterIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = CreateIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (CreateIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
   };
 
   typedef Ptr<CreateIndexData> CreateIndexDataPtr;
@@ -2436,107 +2340,6 @@
 #ifdef VM_TRACE
     void print(NdbOut&) const;
 #endif
-
-#if wl3600_todo //out
-    // original request
-    //DropIndxReq m_request;
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    DropIndxReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    // error info
-    DropIndxRef::ErrorCode m_lastError;
-    DropIndxRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    // ctor
-    OpDropIndex() {
-      memset(&m_request, 0, sizeof(m_request));
-      m_coordinatorRef = 0;
-      m_requestType = DropIndxReq::RT_UNDEFINED;
-      m_requestFlag = 0;
-      m_lastError = DropIndxRef::NoError;
-      m_errorCode = DropIndxRef::NoError;
-      m_errorLine = 0;
-      m_errorNode = 0;
-    }
-#endif
-    void save(const DropIndxReq* req) {
-#if wl3600_todo
-      m_request = *req;
-      m_requestType = req->getRequestType();
-      m_requestFlag = req->getRequestFlag();
-#endif
-    }
-    bool hasLastError() {
-#if wl3600_todo
-      return m_lastError != DropIndxRef::NoError;
-#endif
-    }
-    bool hasError() {
-#if wl3600_todo
-      return m_errorCode != DropIndxRef::NoError;
-#endif
-    }
-    void setError(const DropIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = DropIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = ref->getErrorCode();
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const AlterIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = DropIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (DropIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const DropTableRef* ref) {
-#if wl3600_todo
-      m_lastError = DropIndxRef::NoError;
-      if (ref != 0) {
-	switch (ref->errorCode) {
-	case DropTableRef::Busy:
-	  m_lastError = DropIndxRef::Busy;
-	  break;
-	case DropTableRef::NoSuchTable:
-	  m_lastError = DropIndxRef::IndexNotFound;
-	  break;
-	case DropTableRef::DropInProgress:
-	  m_lastError = DropIndxRef::Busy;
-	  break;
-	case DropTableRef::NoDropTableRecordAvailable:
-	  m_lastError = DropIndxRef::Busy;
-	  break;
-	default:
-	  m_lastError = (DropIndxRef::ErrorCode)ref->errorCode;
-	  break;
-	}
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = 0;
-          m_errorNode = 0;
-        }
-      }
-#endif
-    }
   };
 
   typedef Ptr<DropIndexData> DropIndexDataPtr;
@@ -2572,6 +2375,7 @@
 
   static const TriggerTmpl g_hashIndexTriggerTmpl[3];
   static const TriggerTmpl g_orderedIndexTriggerTmpl[1];
+  static const TriggerTmpl g_buildIndexConstraintTmpl[1];
 
   struct AlterIndexData : public OpData {
     AlterIndxImplReq m_request;
@@ -2608,134 +2412,6 @@
 #ifdef VM_TRACE
     void print(NdbOut&) const;
 #endif
-
-    // original request plus buffer for attribute lists
-    //AlterIndxReq m_request;
-    //AttributeList m_attrList;
-    AttributeList m_tableKeyList;
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    AlterIndxReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    // error info
-    AlterIndxRef::ErrorCode m_lastError;
-    AlterIndxRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    Uint32 m_triggerCounter;
-    // ctor
-#if wl3600_todo //out
-    OpAlterIndex() {
-      memset(&m_request, 0, sizeof(m_request));
-      m_coordinatorRef = 0;
-      m_requestType = AlterIndxReq::RT_UNDEFINED;
-      m_requestFlag = 0;
-      m_lastError = AlterIndxRef::NoError;
-      m_errorCode = AlterIndxRef::NoError;
-      m_errorLine = 0;
-      m_errorNode = 0;
-      m_triggerCounter = 0;
-    }
-#endif
-    void save(const AlterIndxReq* req) {
-#if wl3600_todo
-      m_request = *req;
-      m_requestType = req->getRequestType();
-      m_requestFlag = req->getRequestFlag();
-#endif
-    }
-    bool hasLastError() {
-#if wl3600_todo
-      return m_lastError != AlterIndxRef::NoError;
-#endif
-    }
-    bool hasError() {
-#if wl3600_todo
-      return m_errorCode != AlterIndxRef::NoError;
-#endif
-    }
-    void setError(const AlterIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const CreateIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const DropIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const BuildIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = 0;
-          m_errorNode = 0;
-        }
-      }
-#endif
-    }
-    void setError(const CreateTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const DropTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
   };
 
   typedef Ptr<AlterIndexData> AlterIndexDataPtr;
@@ -2780,6 +2456,7 @@
     BuildIndxImplReq m_request;
     AttributeList m_indexKeyList;
     FragAttributeList m_tableKeyList;
+    AttributeMask m_attrMask;
 
     // reflection
     static const OpInfo g_opInfo;
@@ -2789,96 +2466,23 @@
       return dict->c_buildIndexDataPool;
     }
 
+    // sub-operation counters
+    const TriggerTmpl* m_triggerTmpl;
+    // first op create, second op drop
+    Uint32 m_triggerOpCount;    // 2 or 0
+    Uint32 m_triggerOpIndex;
+    Uint32 m_triggerId;
+
     BuildIndexData() :
       OpData(g_opInfo, (Uint32*)&m_request) {
       memset(&m_request, 0, sizeof(m_request));
       m_indexKeyList.clear();
       m_tableKeyList.clear();
-    }
-
-    // wl3600_todo rest out
-
-    // original request plus buffer for attribute lists
-    //BuildIndxReq m_request;
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    //BuildIndxReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    Uint32 m_constrTriggerId;
-    // error info
-    BuildIndxRef::ErrorCode m_lastError;
-    BuildIndxRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    // ctor
-    void save(const BuildIndxReq* req) {
-#if wl3600_todo
-      m_request = *req;
-      m_requestType = req->getRequestType();
-      m_requestFlag = req->getRequestFlag();
-#endif
-    }
-    bool hasLastError() {
-      return m_lastError != BuildIndxRef::NoError;
-    }
-    bool hasError() {
-      return m_errorCode != BuildIndxRef::NoError;
-    }
-    void setError(const BuildIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = BuildIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = 0;
-          m_errorNode = 0;
-        }
-      }
-#endif
-    }
-    void setError(const AlterIndxRef* ref) {
-#if wl3600_todo
-      m_lastError = BuildIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (BuildIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const CreateTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = BuildIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (BuildIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const DropTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = BuildIndxRef::NoError;
-      if (ref != 0) {
-        m_lastError = (BuildIndxRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
+      m_attrMask.clear();
+      m_triggerTmpl = 0;
+      m_triggerOpCount = 0;
+      m_triggerOpIndex = 0;
+      m_triggerId = RNIL;
     }
   };
 
@@ -2900,6 +2504,12 @@
   void buildIndex_abortParse(Signal*, SchemaOpPtr);
   void buildIndex_abortPrepare(Signal*, SchemaOpPtr);
 
+  // parse phase
+  void buildIndex_toCreateConstraint(Signal*, SchemaOpPtr);
+  void buildIndex_fromCreateConstraint(Signal*, Uint32 op_key, Uint32 ret);
+  void buildIndex_toDropConstraint(Signal*, SchemaOpPtr);
+  void buildIndex_fromDropConstraint(Signal*, Uint32 op_key, Uint32 ret);
+
   // prepare phase
   void buildIndex_toLocalBuild(Signal*, SchemaOpPtr);
   void buildIndex_fromLocalBuild(Signal*, Uint32 op_key, Uint32 ret);
@@ -3042,74 +2652,6 @@
       memset(m_triggerName, 0, sizeof(m_triggerName));
       m_sub_alter_trigger = false;
     }
-
-    //wl3600_todo rest out
-
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    CreateTrigReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    // error info
-    CreateTrigRef::ErrorCode m_lastError;
-    CreateTrigRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    // ctor
-#if wl3600_todo
-    OpCreateTrigger() {
-      memset(&m_request, 0, sizeof(m_request));
-      m_coordinatorRef = 0;
-      m_requestType = CreateTrigReq::RT_UNDEFINED;
-      m_requestFlag = 0;
-      m_lastError = CreateTrigRef::NoError;
-      m_errorCode = CreateTrigRef::NoError;
-      m_errorLine = 0;
-      m_errorNode = 0;
-    }
-#endif
-    void save(const CreateTrigReq* req) {
-#if wl3600_todo
-      m_request = *req;
-      m_requestType = req->getRequestType();
-      m_requestFlag = req->getRequestFlag();
-#endif
-    }
-    bool hasLastError() {
-      return m_lastError != CreateTrigRef::NoError;
-    }
-    bool hasError() {
-      return m_errorCode != CreateTrigRef::NoError;
-    }
-    void setError(const CreateTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = CreateTrigRef::NoError;
-      if (ref != 0) {
-        m_lastError = ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const AlterTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = CreateTrigRef::NoError;
-      if (ref != 0) {
-        m_lastError = (CreateTrigRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
   };
 
   typedef Ptr<CreateTriggerData> CreateTriggerDataPtr;
@@ -3157,74 +2699,6 @@
       memset(m_triggerName, 0, sizeof(m_triggerName));
       m_sub_alter_trigger = false;
     }
-
-    //wl3600_todo rest out
-
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    DropTrigReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    // error info
-    DropTrigRef::ErrorCode m_lastError;
-    DropTrigRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    // ctor
-#if wl3600_todo
-    OpDropTrigger() {
-      memset(&m_request, 0, sizeof(m_request));
-      m_coordinatorRef = 0;
-      m_requestType = DropTrigReq::RT_UNDEFINED;
-      m_requestFlag = 0;
-      m_lastError = DropTrigRef::NoError;
-      m_errorCode = DropTrigRef::NoError;
-      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;
-    }
-    bool hasError() {
-      return m_errorCode != DropTrigRef::NoError;
-    }
-    void setError(const DropTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = DropTrigRef::NoError;
-      if (ref != 0) {
-        m_lastError = ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          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();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
   };
 
   typedef Ptr<DropTriggerData> DropTriggerDataPtr;
@@ -3276,89 +2750,6 @@
       m_triggerBlock[0] = 0;
       m_triggerBlock[1] = 0;
     }
-
-    //wl3600_todo rest out
-
-    // nodes participating in operation
-    NdbNodeBitmask m_nodes;
-    // coordinator DICT
-    Uint32 m_coordinatorRef;
-    bool m_isMaster;
-    // state info
-    AlterTrigReq::RequestType m_requestType;
-    Uint32 m_requestFlag;
-    // error info
-    AlterTrigRef::ErrorCode m_lastError;
-    AlterTrigRef::ErrorCode m_errorCode;
-    Uint32 m_errorLine;
-    Uint32 m_errorNode;
-    // counters
-    SignalCounter m_signalCounter;
-    // ctor
-#if wl3600_todo
-    OpAlterTrigger() {
-      memset(&m_request, 0, sizeof(m_request));
-      m_coordinatorRef = 0;
-      m_requestType = AlterTrigReq::RT_UNDEFINED;
-      m_requestFlag = 0;
-      m_lastError = AlterTrigRef::NoError;
-      m_errorCode = AlterTrigRef::NoError;
-      m_errorLine = 0;
-      m_errorNode = 0;
-    }
-#endif
-    void save(const AlterTrigReq* req) {
-#if wl3600_todo
-      m_request = *req;
-      m_requestType = req->getRequestType();
-      m_requestFlag = req->getRequestFlag();
-#endif
-    }
-    bool hasLastError() {
-      return m_lastError != AlterTrigRef::NoError;
-    }
-    bool hasError() {
-      return m_errorCode != AlterTrigRef::NoError;
-    }
-    void setError(const AlterTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterTrigRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterTrigRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const CreateTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterTrigRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterTrigRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
-    void setError(const DropTrigRef* ref) {
-#if wl3600_todo
-      m_lastError = AlterTrigRef::NoError;
-      if (ref != 0) {
-        m_lastError = (AlterTrigRef::ErrorCode)ref->getErrorCode();
-        if (! hasError()) {
-          m_errorCode = m_lastError;
-          m_errorLine = ref->getErrorLine();
-          m_errorNode = ref->getErrorNode();
-        }
-      }
-#endif
-    }
   };
 
   typedef Ptr<AlterTriggerData> AlterTriggerDataPtr;
@@ -3696,45 +3087,9 @@
   void rebuildIndex_fromEndTrans(Signal*, Uint32 tx_key, Uint32 ret);
 
   // create index
-  void createIndex_recvReply(Signal* signal, const CreateIndxConf* conf,
-      const CreateIndxRef* ref);
-  void createIndex_slavePrepare(Signal* signal, CreateIndexDataPtr opPtr);
-  void createIndex_slaveCommit(Signal* signal, CreateIndexDataPtr opPtr);
-  void createIndex_slaveAbort(Signal* signal, CreateIndexDataPtr opPtr);
-  void createIndex_sendSlaveReq(Signal* signal, CreateIndexDataPtr opPtr);
-  void createIndex_sendReply(Signal* signal, CreateIndexDataPtr opPtr, bool);
   // drop index
-  void dropIndex_recvReply(Signal* signal, const DropIndxConf* conf,
-      const DropIndxRef* ref);
-  void dropIndex_slavePrepare(Signal* signal, DropIndexDataPtr opPtr);
-  void dropIndex_slaveCommit(Signal* signal, DropIndexDataPtr opPtr);
-  void dropIndex_slaveAbort(Signal* signal, DropIndexDataPtr opPtr);
-  void dropIndex_sendSlaveReq(Signal* signal, DropIndexDataPtr opPtr);
-  void dropIndex_sendReply(Signal* signal, DropIndexDataPtr opPtr, bool);
   // alter index
-  void alterIndex_recvReply(Signal* signal, const AlterIndxConf* conf,
-      const AlterIndxRef* ref);
-  void alterIndex_slavePrepare(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_toCreateTc(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_fromCreateTc(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_toDropTc(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_fromDropTc(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_slaveCommit(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_slaveAbort(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_sendSlaveReq(Signal* signal, AlterIndexDataPtr opPtr);
-  void alterIndex_sendReply(Signal* signal, AlterIndexDataPtr opPtr, bool);
   // build index
-  void buildIndex_recvReply(Signal* signal, const BuildIndxConf* conf,
-      const BuildIndxRef* ref);
-  void buildIndex_toCreateConstr(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_fromCreateConstr(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_buildTrix(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_toDropConstr(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_fromDropConstr(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_toOnline(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_fromOnline(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_sendSlaveReq(Signal* signal, BuildIndexDataPtr opPtr);
-  void buildIndex_sendReply(Signal* signal, BuildIndexDataPtr opPtr, bool);
 
   // Events
   void 
@@ -3832,31 +3187,8 @@
   void parseReadEventSys(Signal *signal, sysTab_NDBEVENTS_0& m_eventRec);
 
   // create trigger
-  void createTrigger_recvReply(Signal* signal, const CreateTrigConf* conf,
-      const CreateTrigRef* ref);
-  void createTrigger_slavePrepare(Signal* signal, CreateTriggerDataPtr opPtr);
-  void createTrigger_masterSeize(Signal* signal, CreateTriggerDataPtr opPtr);
-  void createTrigger_slaveCreate(Signal* signal, CreateTriggerDataPtr opPtr);
-  void createTrigger_slaveCommit(Signal* signal, CreateTriggerDataPtr opPtr);
-  void createTrigger_slaveAbort(Signal* signal, CreateTriggerDataPtr opPtr);
-  void createTrigger_sendSlaveReq(Signal* signal, CreateTriggerDataPtr opPtr);
-  void createTrigger_sendReply(Signal* signal, CreateTriggerDataPtr opPtr, bool);
   // drop trigger
-  void dropTrigger_recvReply(Signal* signal, const DropTrigConf* conf,
-      const DropTrigRef* ref);
-  void dropTrigger_slavePrepare(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);
-  void alterTrigger_slavePrepare(Signal* signal, AlterTriggerDataPtr opPtr);
-  void alterTrigger_slaveCommit(Signal* signal, AlterTriggerDataPtr opPtr);
-  void alterTrigger_slaveAbort(Signal* signal, AlterTriggerDataPtr opPtr);
-  void alterTrigger_sendSlaveReq(Signal* signal, AlterTriggerDataPtr opPtr);
-  void alterTrigger_sendReply(Signal* signal, AlterTriggerDataPtr opPtr, bool);
   // support
   void getTableKeyList(TableRecordPtr, FragAttributeList& list);
   void getIndexAttr(TableRecordPtr indexPtr, Uint32 itAttr, Uint32* id);

--- 1.3/storage/ndb/include/kernel/signaldata/BuildIndxImpl.hpp	2007-02-19 19:09:29 +02:00
+++ 1.4/storage/ndb/include/kernel/signaldata/BuildIndxImpl.hpp	2007-03-07 17:57:20 +02:00
@@ -22,19 +22,6 @@
 struct BuildIndxImplReq {
   friend bool printBUILD_INDX_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
-  enum xxxRequestType { //wl3600_todo out
-    RT_UNDEFINED = 0,
-    RT_USER = 1,
-    RT_ALTER_INDEX = 2,
-    RT_SYSTEMRESTART = 3,
-    RT_DICT_PREPARE = 1 << 4,
-    RT_DICT_TC = 5 << 4,
-    RT_DICT_TRIX = 7 << 4,
-    RT_DICT_TUX = 8 << 4,
-    RT_DICT_COMMIT = 0xC << 4,
-    RT_DICT_ABORT = 0xF << 4,
-    RT_TRIX = 7 << 8
-  };
   STATIC_CONST( SignalLength = 9 );
   STATIC_CONST( INDEX_COLUMNS = 0 );
   STATIC_CONST( KEY_COLUMNS = 1 );

--- 1.4/storage/ndb/include/kernel/signaldata/CreateTrigImpl.hpp	2007-02-19 19:09:30 +02:00
+++ 1.5/storage/ndb/include/kernel/signaldata/CreateTrigImpl.hpp	2007-03-07 17:57:20 +02:00
@@ -32,9 +32,6 @@
   STATIC_CONST( SignalLength = 11 + MAXNROFATTRIBUTESINWORDS);
   SECTION( TRIGGER_NAME_SECTION = 0 );
   SECTION( ATTRIBUTE_MASK_SECTION = 1 );        // not yet in use
-  enum xxxKeyValues {//wl3600_todo use DictTabInfo
-    TriggerNameKey = 0xa1
-  };
 
   // tableVersion, indexVersion, name section used only within DICT
 

--- 1.4/storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp	2007-02-19 19:09:30 +02:00
+++ 1.5/storage/ndb/include/kernel/signaldata/DropTrigImpl.hpp	2007-03-07 17:57:21 +02:00
@@ -24,9 +24,6 @@
 
   STATIC_CONST( SignalLength = 10 );
   SECTION( TRIGGER_NAME_SECTION = 0 ); // optional
-  enum xxxKeyValues {//wl3600_todo use DictTabInfo
-    TriggerNameKey = 0xa1
-  };
 
   Uint32 senderRef;
   Uint32 senderData;
Thread
bk commit into 5.1 tree (pekka:1.2411)pekka7 Mar