diff options
Diffstat (limited to 'storage/ndb/src/common/debugger/signaldata')
69 files changed, 5351 insertions, 0 deletions
diff --git a/storage/ndb/src/common/debugger/signaldata/AccLock.cpp b/storage/ndb/src/common/debugger/signaldata/AccLock.cpp new file mode 100644 index 00000000000..affed431957 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/AccLock.cpp @@ -0,0 +1,75 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/AccLock.hpp> +#include <SignalLoggerManager.hpp> + +bool +printACC_LOCKREQ(FILE* output, const Uint32* theData, Uint32 len, Uint16 rbn) +{ + const AccLockReq* const sig = (const AccLockReq*)theData; + Uint32 reqtype = sig->requestInfo & 0xFF; + switch (sig->returnCode) { + case RNIL: + fprintf(output, " returnCode=RNIL"); + break; + case AccLockReq::Success: + fprintf(output, " returnCode=Success"); + break; + case AccLockReq::IsBlocked: + fprintf(output, " returnCode=IsBlocked"); + break; + case AccLockReq::WouldBlock: + fprintf(output, " returnCode=WouldBlock"); + break; + case AccLockReq::Refused: + fprintf(output, " returnCode=Refused"); + break; + case AccLockReq::NoFreeOp: + fprintf(output, " returnCode=NoFreeOp"); + break; + default: + fprintf(output, " returnCode=%u?", sig->returnCode); + break; + } + switch (reqtype) { + case AccLockReq::LockShared: + fprintf(output, " req=LockShared\n"); + break; + case AccLockReq::LockExclusive: + fprintf(output, " req=LockExclusive\n"); + break; + case AccLockReq::Unlock: + fprintf(output, " req=Unlock\n"); + break; + case AccLockReq::Abort: + fprintf(output, " req=Abort\n"); + break; + default: + fprintf(output, " req=%u\n", reqtype); + break; + } + fprintf(output, " accOpPtr: 0x%x\n", sig->accOpPtr); + if (reqtype == AccLockReq::LockShared || + reqtype == AccLockReq::LockExclusive) { + fprintf(output, " userPtr: 0x%x userRef: 0x%x\n", sig->userPtr, sig->userRef); + fprintf(output, " table: id=%u", sig->tableId); + fprintf(output, " fragment: id=%u ptr=0x%x\n", sig->fragId, sig->fragPtrI); + fprintf(output, " tuple: addr=0x%x hashValue=%x\n", sig->tupAddr, sig->hashValue); + fprintf(output, " transid: %08x %08x\n", sig->transId1, sig->transId2); + } + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp b/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp new file mode 100644 index 00000000000..e1865136fc3 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp @@ -0,0 +1,35 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/AlterIndx.hpp> + +bool printALTER_INDX_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterIndxReq * const sig = (AlterIndxReq *) theData; + return false; +} + +bool printALTER_INDX_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterIndxConf * const sig = (AlterIndxConf *) theData; + return false; +} + +bool printALTER_INDX_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterIndxRef * const sig = (AlterIndxRef *) theData; + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp b/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp new file mode 100644 index 00000000000..f9521984095 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/AlterTab.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/AlterTab.hpp> + +bool printALTER_TAB_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterTabReq * const sig = (AlterTabReq *) theData; + + return false; +} + +bool printALTER_TAB_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterTabConf * const sig = (AlterTabConf *) theData; + + return false; +} + +bool printALTER_TAB_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterTabRef * const sig = (AlterTabRef *) theData; + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp b/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp new file mode 100644 index 00000000000..59909c8e490 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/AlterTable.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/AlterTable.hpp> + +bool printALTER_TABLE_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterTableReq * const sig = (AlterTableReq *) theData; + + return false; +} + +bool printALTER_TABLE_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterTableConf * const sig = (AlterTableConf *) theData; + + return false; +} + +bool printALTER_TABLE_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const AlterTableRef * const sig = (AlterTableRef *) theData; + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp b/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp new file mode 100644 index 00000000000..d488fd6e348 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp @@ -0,0 +1,51 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/AlterTrig.hpp> + +bool printALTER_TRIG_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const AlterTrigReq * const sig = (AlterTrigReq *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "\n"); + + return false; +} + +bool printALTER_TRIG_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const AlterTrigConf * const sig = (AlterTrigConf *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "\n"); + + return false; +} + +bool printALTER_TRIG_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const AlterTrigRef * const sig = (AlterTrigRef *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Error code: %u, ", sig->getErrorCode()); + fprintf(output, "\n"); + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp b/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp new file mode 100644 index 00000000000..bdc34d614cf --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp @@ -0,0 +1,142 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <trigger_definitions.h> +#include <signaldata/BackupImpl.hpp> + +bool +printDEFINE_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){ + DefineBackupReq* sig = (DefineBackupReq*)data; + fprintf(out, " backupPtr: %d backupId: %d clientRef: %d clientData: %d\n", + sig->backupPtr, sig->backupId, sig->clientRef, sig->clientData); + fprintf(out, " backupKey: [ %08x%08x ] DataLength: %d\n", + sig->backupKey[0], sig->backupKey[1], sig->backupDataLen); + char buf[_NDB_NODE_BITMASK_SIZE * 8 + 1]; + fprintf(out, " Nodes: %s\n", sig->nodes.getText(buf)); + return true; +} + +bool +printDEFINE_BACKUP_REF(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){ + DefineBackupRef* sig = (DefineBackupRef*)data; + fprintf(out, " backupPtr: %d backupId: %d errorCode: %d\n", + sig->backupPtr, sig->backupId, sig->errorCode); + return true; +} + +bool +printDEFINE_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + DefineBackupConf* sig = (DefineBackupConf*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; +} + +bool +printSTART_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + StartBackupReq* sig = (StartBackupReq*)data; + fprintf(out, " backupPtr: %d backupId: %d signalNo: %d of %d\n", + sig->backupPtr, sig->backupId, + sig->signalNo + 1, sig->noOfSignals); + for(Uint32 i = 0; i<sig->noOfTableTriggers; i++) + fprintf(out, + " Table: %d Triggers = [ insert: %d update: %d delete: %d ]\n", + sig->tableTriggers[i].tableId, + sig->tableTriggers[i].triggerIds[TriggerEvent::TE_INSERT], + sig->tableTriggers[i].triggerIds[TriggerEvent::TE_UPDATE], + sig->tableTriggers[i].triggerIds[TriggerEvent::TE_DELETE]); + return true; +} + +bool +printSTART_BACKUP_REF(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){ + StartBackupRef* sig = (StartBackupRef*)data; + fprintf(out, " backupPtr: %d backupId: %d errorCode: %d\n", + sig->backupPtr, sig->backupId, sig->errorCode); + return true; +} + +bool +printSTART_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + StartBackupConf* sig = (StartBackupConf*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; +} + +bool +printBACKUP_FRAGMENT_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + BackupFragmentReq* sig = (BackupFragmentReq*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + fprintf(out, " tableId: %d fragmentNo: %d (count = %d)\n", + sig->tableId, sig->fragmentNo, sig->count); + return true; +} + +bool +printBACKUP_FRAGMENT_REF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + BackupFragmentRef* sig = (BackupFragmentRef*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + fprintf(out, " tableId: %d fragmentNo: %d errorCode: %d\n", + sig->tableId, sig->fragmentNo, sig->errorCode); + return true; +} + +bool +printBACKUP_FRAGMENT_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + BackupFragmentConf* sig = (BackupFragmentConf*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + fprintf(out, " tableId: %d fragmentNo: %d records: %d bytes: %d\n", + sig->tableId, sig->fragmentNo, sig->noOfRecords, sig->noOfBytes); + return true; +} + +bool +printSTOP_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + StopBackupReq* sig = (StopBackupReq*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; +} + +bool +printSTOP_BACKUP_REF(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){ + StopBackupRef* sig = (StopBackupRef*)data; + fprintf(out, " backupPtr: %d backupId: %d errorCode: %d\n", + sig->backupPtr, sig->backupId, sig->errorCode); + return true; +} + +bool +printSTOP_BACKUP_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 bno){ + StopBackupConf* sig = (StopBackupConf*)data; + fprintf(out, " backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; +} + +bool +printBACKUP_STATUS_REQ(FILE *, const Uint32 *, Uint32, Uint16){ + return false; +} + +bool +printBACKUP_STATUS_CONF(FILE *, const Uint32 *, Uint32, Uint16){ + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp b/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp new file mode 100644 index 00000000000..4b0a0e07b66 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp @@ -0,0 +1,129 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/BackupSignalData.hpp> + +bool +printBACKUP_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 bno){ + BackupReq* sig = (BackupReq*)theData; + fprintf(output, " senderData: %d DataLength: %d\n", + sig->senderData, + sig->backupDataLen); + return true; +} + +bool +printBACKUP_DATA(FILE * output, const Uint32 * theData, Uint32 len, Uint16 bno){ + BackupData * sig = (BackupData*)theData; + if(sig->requestType == BackupData::ClientToMaster){ + fprintf(output, " ClientToMaster: senderData: %d backupId: %d\n", + sig->senderData, sig->backupId); + } else if(sig->requestType == BackupData::MasterToSlave){ + fprintf(output, " MasterToSlave: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + } + return false; +} + +bool +printBACKUP_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 bno){ + + BackupRef* sig = (BackupRef*)theData; + fprintf(output, " senderData: %d errorCode: %d masterRef: %d\n", + sig->senderData, + sig->errorCode, + sig->masterRef); + return true; +} + +bool +printBACKUP_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 bno){ + BackupConf* sig = (BackupConf*)theData; + fprintf(output, " senderData: %d backupId: %d\n", + sig->senderData, + sig->backupId); + return true; +} + +bool +printBACKUP_ABORT_REP(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){ + BackupAbortRep* sig = (BackupAbortRep*)data; + fprintf(out, " senderData: %d backupId: %d reason: %d\n", + sig->senderData, + sig->backupId, + sig->reason); + return true; +} + +bool +printBACKUP_COMPLETE_REP(FILE * out, const Uint32 * data, Uint32 len, Uint16 b){ + BackupCompleteRep* sig = (BackupCompleteRep*)data; + fprintf(out, " senderData: %d backupId: %d records: %d bytes: %d\n", + sig->senderData, + sig->backupId, + sig->noOfRecords, + sig->noOfBytes); + return true; +} + +bool +printBACKUP_NF_COMPLETE_REP(FILE*, const Uint32*, Uint32, Uint16){ + return false; +} + +bool +printABORT_BACKUP_ORD(FILE * out, const Uint32 * data, Uint32 len, Uint16 b){ + AbortBackupOrd* sig = (AbortBackupOrd*)data; + + AbortBackupOrd::RequestType rt =(AbortBackupOrd::RequestType)sig->requestType; + switch(rt){ + case AbortBackupOrd::ClientAbort: + fprintf(out, " ClientAbort: senderData: %d backupId: %d\n", + sig->senderData, sig->backupId); + return true; + break; + case AbortBackupOrd::BackupComplete: + fprintf(out, " BackupComplete: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; + case AbortBackupOrd::BackupFailure: + fprintf(out, " BackupFailure: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; + case AbortBackupOrd::LogBufferFull: + fprintf(out, " LogBufferFull: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; + break; + case AbortBackupOrd::FileOrScanError: + fprintf(out, " FileOrScanError: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; + break; + case AbortBackupOrd::BackupFailureDueToNodeFail: + fprintf(out, " BackupFailureDueToNodeFail: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; + break; + case AbortBackupOrd::OkToClean: + fprintf(out, " OkToClean: backupPtr: %d backupId: %d\n", + sig->backupPtr, sig->backupId); + return true; + break; + } + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp b/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp new file mode 100644 index 00000000000..84410a2b2db --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp @@ -0,0 +1,52 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <kernel_types.h> +#include <BlockNumbers.h> +#include <signaldata/CloseComReqConf.hpp> + +bool +printCLOSECOMREQCONF(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 receiverBlockNo){ + + CloseComReqConf * cc = (CloseComReqConf*)theData; + + fprintf(output, " xxxBlockRef = (%d, %d) failNo = %d noOfNodes = %d\n", + refToBlock(cc->xxxBlockRef), refToNode(cc->xxxBlockRef), + cc->failNo, cc->noOfNodes); + + int hits = 0; + fprintf(output, " Nodes: "); + for(int i = 0; i<MAX_NODES; i++){ + if(NodeBitmask::get(cc->theNodes, i)){ + hits++; + fprintf(output, " %d", i); + } + if(hits == 16){ + fprintf(output, "\n Nodes: "); + hits = 0; + } + } + if(hits != 0) + fprintf(output, "\n"); + + return true; +} + + diff --git a/storage/ndb/src/common/debugger/signaldata/CntrStart.cpp b/storage/ndb/src/common/debugger/signaldata/CntrStart.cpp new file mode 100644 index 00000000000..154013f40b0 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CntrStart.cpp @@ -0,0 +1,37 @@ +#include <signaldata/CntrStart.hpp> + +bool +printCNTR_START_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const CntrStartReq * const sig = (CntrStartReq *)theData; + fprintf(output, " nodeId: %x\n", sig->nodeId); + fprintf(output, " startType: %x\n", sig->startType); + fprintf(output, " lastGci: %x\n", sig->lastGci); + return true; +} + +bool +printCNTR_START_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const CntrStartRef * const sig = (CntrStartRef *)theData; + fprintf(output, " errorCode: %x\n", sig->errorCode); + fprintf(output, " masterNodeId: %x\n", sig->masterNodeId); + return true; +} + +bool +printCNTR_START_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const CntrStartConf * const sig = (CntrStartConf *)theData; + fprintf(output, " startType: %x\n", sig->startType); + fprintf(output, " startGci: %x\n", sig->startGci); + fprintf(output, " masterNodeId: %x\n", sig->masterNodeId); + fprintf(output, " noStartNodes: %x\n", sig->noStartNodes); + + char buf[32*NdbNodeBitmask::Size+1]; + fprintf(output, " startedNodes: %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->startedNodes, buf)); + fprintf(output, " startingNodes: %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->startingNodes, buf)); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp b/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp new file mode 100644 index 00000000000..c295041bc01 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/ContinueB.cpp @@ -0,0 +1,35 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <kernel_types.h> +#include <BlockNumbers.h> +#include <signaldata/DihContinueB.hpp> +#include <signaldata/NdbfsContinueB.hpp> + +bool +printCONTINUEB(FILE * output, const Uint32 * theData, Uint32 len, + Uint16 receiverBlockNo){ + if(receiverBlockNo == DBDIH){ + return printCONTINUEB_DBDIH(output, theData, len, 0); + } else if(receiverBlockNo == NDBFS) { + return printCONTINUEB_NDBFS(output, theData, len, 0); + } + + return false; +} + + diff --git a/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp b/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp new file mode 100644 index 00000000000..173b3f6708f --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp @@ -0,0 +1,58 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/CopyGCIReq.hpp> + +static +void +print(char * buf, size_t buf_len, CopyGCIReq::CopyReason r){ + switch(r){ + case CopyGCIReq::IDLE: + BaseString::snprintf(buf, buf_len, "IDLE"); + break; + case CopyGCIReq::LOCAL_CHECKPOINT: + BaseString::snprintf(buf, buf_len, "LOCAL_CHECKPOINT"); + break; + case CopyGCIReq::RESTART: + BaseString::snprintf(buf, buf_len, "RESTART"); + break; + case CopyGCIReq::GLOBAL_CHECKPOINT: + BaseString::snprintf(buf, buf_len, "GLOBAL_CHECKPOINT"); + break; + case CopyGCIReq::INITIAL_START_COMPLETED: + BaseString::snprintf(buf, buf_len, "INITIAL_START_COMPLETED"); + break; + default: + BaseString::snprintf(buf, buf_len, "<Unknown>"); + } +} + +bool +printCOPY_GCI_REQ(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + CopyGCIReq * sig = (CopyGCIReq*)theData; + + static char buf[255]; + print(buf, sizeof(buf), (CopyGCIReq::CopyReason)sig->copyReason); + + fprintf(output, " SenderData: %d CopyReason: %s StartWord: %d\n", + sig->anyData, + buf, + sig->startWord); + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp b/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp new file mode 100644 index 00000000000..7b497d6a974 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/CreateEvnt.hpp> + +bool printCREATE_EVNT_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const CreateEvntReq * const sig = (CreateEvntReq *) theData; + + return false; +} + +bool printCREATE_EVNT_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const CreateEvntConf * const sig = (CreateEvntConf *) theData; + + return false; +} + +bool printCREATE_EVNT_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const CreateEvntRef * const sig = (CreateEvntRef *) theData; + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp b/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp new file mode 100644 index 00000000000..027f743b5ea --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp @@ -0,0 +1,56 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/CreateFragmentation.hpp> + +bool +printCREATE_FRAGMENTATION_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const CreateFragmentationReq * const sig = (CreateFragmentationReq *)theData; + fprintf(output, " senderRef: %x\n", sig->senderRef); + fprintf(output, " senderData: %x\n", sig->senderData); + fprintf(output, " fragmentationType: %x\n", sig->fragmentationType); + fprintf(output, " noOfFragments: %x\n", sig->noOfFragments); + fprintf(output, " fragmentNode: %x\n", sig->fragmentNode); + if (sig->primaryTableId == RNIL) + fprintf(output, " primaryTableId: none\n"); + else + fprintf(output, " primaryTableId: %x\n", sig->primaryTableId); + return true; +} + +bool +printCREATE_FRAGMENTATION_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const CreateFragmentationRef * const sig = (CreateFragmentationRef *)theData; + fprintf(output, " senderRef: %x\n", sig->senderRef); + fprintf(output, " senderData: %x\n", sig->senderData); + fprintf(output, " errorCode: %x\n", sig->errorCode); + return true; +} + +bool +printCREATE_FRAGMENTATION_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const CreateFragmentationConf * const sig = + (CreateFragmentationConf *)theData; + fprintf(output, " senderRef: %x\n", sig->senderRef); + fprintf(output, " senderData: %x\n", sig->senderData); + fprintf(output, " noOfReplicas: %x\n", sig->noOfReplicas); + fprintf(output, " noOfFragments: %x\n", sig->noOfFragments); + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp b/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp new file mode 100644 index 00000000000..8fcbb9279ed --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/CreateIndx.hpp> + +bool printCREATE_INDX_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const CreateIndxReq * const sig = (CreateIndxReq *) theData; + + return false; +} + +bool printCREATE_INDX_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const CreateIndxConf * const sig = (CreateIndxConf *) theData; + + return false; +} + +bool printCREATE_INDX_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const CreateIndxRef * const sig = (CreateIndxRef *) theData; + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp b/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp new file mode 100644 index 00000000000..db5344cfbe7 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp @@ -0,0 +1,120 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/CreateTrig.hpp> + +bool printCREATE_TRIG_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const CreateTrigReq * const sig = (CreateTrigReq *) theData; + + //char triggerName[MAX_TAB_NAME_SIZE]; + char triggerType[32]; + char triggerActionTime[32]; + char triggerEvent[32]; + + //sig->getTriggerName((char *) &triggerName); + switch (sig->getTriggerType()) { + case(TriggerType::SECONDARY_INDEX): + BaseString::snprintf(triggerType, sizeof(triggerType), "SECONDARY_INDEX"); + break; + case(TriggerType::SUBSCRIPTION): + BaseString::snprintf(triggerType, sizeof(triggerType), "SUBSCRIPTION"); + break; + case(TriggerType::ORDERED_INDEX): + BaseString::snprintf(triggerType, sizeof(triggerType), "ORDERED_INDEX"); + break; + default: + BaseString::snprintf(triggerType, sizeof(triggerType), "UNKNOWN [%d]", (int)sig->getTriggerType()); + break; + } + switch (sig->getTriggerActionTime()) { + case (TriggerActionTime::TA_BEFORE): + BaseString::snprintf(triggerActionTime, sizeof(triggerActionTime), "BEFORE"); + break; + case(TriggerActionTime::TA_AFTER): + BaseString::snprintf(triggerActionTime, sizeof(triggerActionTime), "AFTER"); + break; + case (TriggerActionTime::TA_DEFERRED): + BaseString::snprintf(triggerActionTime, sizeof(triggerActionTime), "DEFERRED"); + break; + case (TriggerActionTime::TA_DETACHED): + BaseString::snprintf(triggerActionTime, sizeof(triggerActionTime), "DETACHED"); + break; + default: + BaseString::snprintf(triggerActionTime, sizeof(triggerActionTime), + "UNKNOWN [%d]", (int)sig->getTriggerActionTime()); + break; + } + switch (sig->getTriggerEvent()) { + case (TriggerEvent::TE_INSERT): + BaseString::snprintf(triggerEvent, sizeof(triggerEvent), "INSERT"); + break; + case(TriggerEvent::TE_DELETE): + BaseString::snprintf(triggerEvent, sizeof(triggerEvent), "DELETE"); + break; + case(TriggerEvent::TE_UPDATE): + BaseString::snprintf(triggerEvent, sizeof(triggerEvent), "UPDATE"); + break; + case(TriggerEvent::TE_CUSTOM): + BaseString::snprintf(triggerEvent, sizeof(triggerEvent), "CUSTOM"); + break; + default: + BaseString::snprintf(triggerEvent, sizeof(triggerEvent), "UNKNOWN [%d]", (int)sig->getTriggerEvent()); + break; + } + + fprintf(output, "User: %u, ", sig->getUserRef()); + //fprintf(output, "Trigger name: \"%s\"\n", triggerName); + fprintf(output, "Type: %s, ", triggerType); + fprintf(output, "Action: %s, ", triggerActionTime); + fprintf(output, "Event: %s, ", triggerEvent); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Table id: %u, ", sig->getTableId()); + fprintf(output, "Monitor replicas: %s ", (sig->getMonitorReplicas())?"true":"false"); + fprintf(output, "Monitor all attributes: %s ", (sig->getMonitorAllAttributes())?"true":"false"); + const AttributeMask& attributeMask = sig->getAttributeMask(); + + char buf[MAXNROFATTRIBUTESINWORDS * 8 + 1]; + fprintf(output, "Attribute mask: %s", attributeMask.getText(buf)); + fprintf(output, "\n"); + + return false; +} + +bool printCREATE_TRIG_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const CreateTrigConf * const sig = (CreateTrigConf *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Table id: %u, ", sig->getTableId()); + fprintf(output, "\n"); + + return false; +} + +bool printCREATE_TRIG_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const CreateTrigRef * const sig = (CreateTrigRef *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Table id: %u, ", sig->getTableId()); + fprintf(output, "Error code: %u, ", sig->getErrorCode()); + fprintf(output, "\n"); + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp new file mode 100644 index 00000000000..43c129347c0 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp @@ -0,0 +1,145 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/DictTabInfo.hpp> +#include <ndb_limits.h> + +//static +const +SimpleProperties::SP2StructMapping +DictTabInfo::TableMapping[] = { + DTIMAPS(Table, TableName, TableName, 0, MAX_TAB_NAME_SIZE), + DTIMAP(Table, TableId, TableId), + DTIMAPS(Table, PrimaryTable, PrimaryTable, 0, MAX_TAB_NAME_SIZE), + DTIMAP(Table, PrimaryTableId, PrimaryTableId), + DTIMAP2(Table, TableLoggedFlag, TableLoggedFlag, 0, 1), + DTIMAP2(Table, TableKValue, TableKValue, 6, 6), + DTIMAP2(Table, MinLoadFactor, MinLoadFactor, 0, 90), + DTIMAP2(Table, MaxLoadFactor, MaxLoadFactor, 25, 110), + DTIMAP2(Table, FragmentTypeVal, FragmentType, 0, 3), + DTIMAP2(Table, TableStorageVal, TableStorage, 0, 0), + DTIMAP2(Table, TableTypeVal, TableType, 1, 3), + DTIMAP(Table, NoOfKeyAttr, NoOfKeyAttr), + DTIMAP2(Table, NoOfAttributes, NoOfAttributes, 1, MAX_ATTRIBUTES_IN_TABLE), + DTIMAP(Table, NoOfNullable, NoOfNullable), + DTIMAP2(Table, NoOfVariable, NoOfVariable, 0, 0), + DTIMAP(Table, KeyLength, KeyLength), + DTIMAP(Table, TableVersion, TableVersion), + DTIMAP(Table, IndexState, IndexState), + DTIMAP(Table, InsertTriggerId, InsertTriggerId), + DTIMAP(Table, UpdateTriggerId, UpdateTriggerId), + DTIMAP(Table, DeleteTriggerId, DeleteTriggerId), + DTIMAP(Table, CustomTriggerId, CustomTriggerId), + DTIMAP2(Table, FrmLen, FrmLen, 0, MAX_FRM_DATA_SIZE), + DTIMAPB(Table, FrmData, FrmData, 0, MAX_FRM_DATA_SIZE, FrmLen), + DTIMAP(Table, FragmentCount, FragmentCount), + DTIMAP2(Table, FragmentDataLen, FragmentDataLen, 0, MAX_FRAGMENT_DATA_BYTES), + DTIMAPB(Table, FragmentData, FragmentData, 0, MAX_FRAGMENT_DATA_BYTES, FragmentDataLen), + DTIBREAK(AttributeName) +}; + +//static +const Uint32 DictTabInfo::TableMappingSize = +sizeof(DictTabInfo::TableMapping) / sizeof(SimpleProperties::SP2StructMapping); + +//static +const +SimpleProperties::SP2StructMapping +DictTabInfo::AttributeMapping[] = { + DTIMAPS(Attribute, AttributeName, AttributeName, 0, MAX_ATTR_NAME_SIZE), + DTIMAP(Attribute, AttributeId, AttributeId), + DTIMAP(Attribute, AttributeType, AttributeType), + DTIMAP2(Attribute, AttributeSize, AttributeSize, 3, 7), + DTIMAP2(Attribute, AttributeArraySize, AttributeArraySize, 0, 65535), + DTIMAP2(Attribute, AttributeKeyFlag, AttributeKeyFlag, 0, 1), + DTIMAP2(Attribute, AttributeNullableFlag, AttributeNullableFlag, 0, 1), + DTIMAP2(Attribute, AttributeDKey, AttributeDKey, 0, 1), + DTIMAP(Attribute, AttributeExtType, AttributeExtType), + DTIMAP(Attribute, AttributeExtPrecision, AttributeExtPrecision), + DTIMAP(Attribute, AttributeExtScale, AttributeExtScale), + DTIMAP(Attribute, AttributeExtLength, AttributeExtLength), + DTIMAP2(Attribute, AttributeAutoIncrement, AttributeAutoIncrement, 0, 1), + DTIMAPS(Attribute, AttributeDefaultValue, AttributeDefaultValue, + 0, MAX_ATTR_DEFAULT_VALUE_SIZE), + DTIBREAK(AttributeEnd) +}; + +//static +const Uint32 DictTabInfo::AttributeMappingSize = +sizeof(DictTabInfo::AttributeMapping) / +sizeof(SimpleProperties::SP2StructMapping); + +bool printDICTTABINFO(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ +// const DictTabInfo * const sig = (DictTabInfo *) theData; + + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + return true; +} + +void +DictTabInfo::Table::init(){ + memset(TableName, 0, sizeof(TableName));//TableName[0] = 0; + TableId = ~0; + memset(PrimaryTable, 0, sizeof(PrimaryTable));//PrimaryTable[0] = 0; // Only used when "index" + PrimaryTableId = RNIL; + TableLoggedFlag = 1; + NoOfKeyAttr = 0; + NoOfAttributes = 0; + NoOfNullable = 0; + NoOfVariable = 0; + TableKValue = 6; + MinLoadFactor = 78; + MaxLoadFactor = 80; + KeyLength = 0; + FragmentType = DictTabInfo::AllNodesSmallTable; + TableStorage = 0; + TableType = DictTabInfo::UndefTableType; + TableVersion = 0; + IndexState = ~0; + InsertTriggerId = RNIL; + UpdateTriggerId = RNIL; + DeleteTriggerId = RNIL; + CustomTriggerId = RNIL; + FrmLen = 0; + memset(FrmData, 0, sizeof(FrmData)); + FragmentCount = 0; + FragmentDataLen = 0; + memset(FragmentData, 0, sizeof(FragmentData)); +} + +void +DictTabInfo::Attribute::init(){ + memset(AttributeName, 0, sizeof(AttributeName));//AttributeName[0] = 0; + AttributeId = 0; + AttributeType = ~0, // deprecated + AttributeSize = DictTabInfo::a32Bit; + AttributeArraySize = 1; + AttributeKeyFlag = 0; + AttributeNullableFlag = 0; + AttributeDKey = 0; + AttributeExtType = DictTabInfo::ExtUnsigned, + AttributeExtPrecision = 0, + AttributeExtScale = 0, + AttributeExtLength = 0, + AttributeAutoIncrement = false; + memset(AttributeDefaultValue, 0, sizeof(AttributeDefaultValue));//AttributeDefaultValue[0] = 0; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp b/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp new file mode 100644 index 00000000000..9fece17315c --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp @@ -0,0 +1,220 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/DihContinueB.hpp> + +bool +printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 not_used){ + + (void)not_used; + + switch (theData[0]) { + case DihContinueB::ZPACK_TABLE_INTO_PAGES: + fprintf(output, " Pack Table Into Pages: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZPACK_FRAG_INTO_PAGES: + fprintf(output, " Pack Frag Into Pages: Table: %d Fragment: %d PageIndex: %d WordIndex: %d\n", + theData[1], theData[2], theData[3], theData[4]); + return true; + break; + case DihContinueB::ZREAD_PAGES_INTO_TABLE: + fprintf(output, " Read Pages Into Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZREAD_PAGES_INTO_FRAG: + fprintf(output, " Read Pages Into Frag: Table: %d Fragment: %d PageIndex: %d WordIndex: %d\n", + theData[1], theData[2], theData[3], theData[4]); + return true; + break; +#if 0 + case DihContinueB::ZREAD_TAB_DESCRIPTION: + fprintf(output, " Read Table description: %d\n", theData[1]); + return true; + break; +#endif + case DihContinueB::ZCOPY_TABLE: + fprintf(output, " Copy Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZCOPY_TABLE_NODE: + fprintf(output, " Copy table node: TableId: %d NodeId: %d\n", + theData[1], theData[2]); + fprintf(output, "PageIndex: %d WordIndex: %d NoOfWords: %d\n", + theData[3], theData[4], theData[5]); + return true; + break; + case DihContinueB::ZSTART_FRAGMENT: + fprintf(output, " Start fragment: Table: %d Fragment: %d\n", + theData[1], theData[2]); + return true; + break; + case DihContinueB::ZCOMPLETE_RESTART: + fprintf(output, "Complete Restart\n"); + return true; + break; + case DihContinueB::ZREAD_TABLE_FROM_PAGES: + fprintf(output, " Read Table From Pages: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZSR_PHASE2_READ_TABLE: + fprintf(output, " Phase 2 Read Table: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZCHECK_TC_COUNTER: + fprintf(output, " Check Tc Counter from place %d\n", theData[1]); + return true; + break; + case DihContinueB::ZCALCULATE_KEEP_GCI: + fprintf(output, " Calc Keep GCI: Table: %d Fragment: %d\n", + theData[1], theData[2]); + return true; + break; + case DihContinueB::ZSTORE_NEW_LCP_ID: + fprintf(output, " Store New LCP Id\n"); + return true; + break; + case DihContinueB::ZTABLE_UPDATE: + fprintf(output, " Table Update: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZCHECK_LCP_COMPLETED: + fprintf(output, " Check LCP Completed: TableId %d\n", theData[1]); + return true; + break; + case DihContinueB::ZINIT_LCP: + fprintf(output, " Init LCP: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZADD_TABLE_MASTER_PAGES: + fprintf(output, " Add Table Master Pages: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZDIH_ADD_TABLE_MASTER: + fprintf(output, " Dih Add Table Master: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZADD_TABLE_SLAVE_PAGES: + fprintf(output, " Add Table Slave Pages: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZDIH_ADD_TABLE_SLAVE: + fprintf(output, " Add Table Slave: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZSTART_GCP: + fprintf(output, " Start GCP\n"); + return true; + break; + case DihContinueB::ZCOPY_GCI: + fprintf(output, " Copy GCI\n"); + return true; + break; + case DihContinueB::ZEMPTY_VERIFY_QUEUE: + fprintf(output, " Empty Verify Queue\n"); + return true; + break; + case DihContinueB::ZCHECK_GCP_STOP: + fprintf(output, " Check GCP Stop\n"); + if (len == 6){ + fprintf(output, "coldGcpStatus = %d\n", theData[1]); + fprintf(output, "cgcpStatus = %d\n", theData[2]); + fprintf(output, "coldGcpId = %d\n", theData[3]); + fprintf(output, "cnewgcp = %d\n", theData[4]); + fprintf(output, "cgcpSameCounter = %d\n", theData[5]); + } + return true; + break; + case DihContinueB::ZREMOVE_NODE_FROM_TABLE: + fprintf(output, " Remove Node From Table: Node: %d Table: %d\n", + theData[1], theData[2]); + return true; + break; + case DihContinueB::ZCOPY_NODE: + fprintf(output, " Copy Node: Table: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZSTART_TAKE_OVER: + fprintf(output, " Start Take Over: TakeOverPtr: %d, startNode: %d, toNode: %d\n", + theData[1], theData[2], theData[3]); + return true; + break; + case DihContinueB::ZCHECK_START_TAKE_OVER: + fprintf(output, " Check Start Take Over\n"); + return true; + break; + case DihContinueB::ZTO_START_COPY_FRAG: + fprintf(output, " To Start Copy Frag: TakeOverPtr: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZINVALIDATE_NODE_LCP: + fprintf(output, " Invalide LCP: NodeId: %d TableId %d\n", + theData[1], theData[2]); + return true; + break; + case DihContinueB::ZINITIALISE_RECORDS: + fprintf(output, " Initialise Records: tdata0: %d\n", theData[1]); + return true; + break; + case DihContinueB::ZSTART_PERMREQ_AGAIN: + fprintf(output, " START_PERMREQ again for node: %d\n", theData[1]); + return true; + break; + case DihContinueB::SwitchReplica: + fprintf(output, " NodeId = %d TableId = %d FragNo = %d\n", + theData[1], theData[2], theData[3]); + return true; + break; + case DihContinueB::ZSEND_START_TO: + fprintf(output, " Send Start Take Over: TakeOverPtr: %d, startNode: %d, toNode: %d\n", + theData[1], theData[2], theData[3]); + return true; + break; + case DihContinueB::ZSEND_UPDATE_TO: + fprintf(output, " Send Update Take Over: TakeOverPtr: %d, startNode: %d, toNode: %d\n", + theData[1], theData[2], theData[3]); + return true; + break; + case DihContinueB::ZSEND_END_TO: + fprintf(output, " Send End Take Over: TakeOverPtr: %d, startNode: %d, toNode: %d\n", + theData[1], theData[2], theData[3]); + return true; + break; + case DihContinueB::ZSEND_ADD_FRAG: + fprintf(output, " Send Add Fragment: TakeOverPtr: %d, startNode: %d, toNode: %d\n", + theData[1], theData[2], theData[3]); + return true; + break; + case DihContinueB::ZSEND_CREATE_FRAG: + fprintf(output, " Send Create Fragment: TakeOverPtr: %d, storedType: %d, start Gci: %d, startNode: %d, toNode: %d\n", + theData[1], theData[2], theData[3], theData[4], theData[5]); + return true; + break; + case DihContinueB::WAIT_DROP_TAB_WRITING_TO_FILE: + fprintf(output, " Wait drop tab writing to file TableId: %d\n", theData[1]); + return true; + case DihContinueB::CHECK_WAIT_DROP_TAB_FAILED_LQH: + fprintf(output, " Wait drop tab FailedNodeId: %d TableId: %d\n", + theData[1], theData[2]); + return true; + default: + fprintf(output, " Default system error lab...\n"); + break; + }//switch + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp b/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp new file mode 100644 index 00000000000..2e4318f4033 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp @@ -0,0 +1,48 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/DihSwitchReplicaReq.hpp> + +bool +printDIH_SWITCH_REPLICA_REQ(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + + DihSwitchReplicaReq * req = (DihSwitchReplicaReq *)&theData[0]; + + const Uint32 requestInfo = req->requestInfo; + + switch(DihSwitchReplicaReq::getRequestType(requestInfo)){ + case DihSwitchReplicaReq::RemoveNodeAsPrimary:{ + fprintf(output, " RemoveNodeAsPrimary: Node=%d", req->nodeId); + if(DihSwitchReplicaReq::getAllTables(requestInfo)) + fprintf(output, " All Tables"); + else + fprintf(output, " TableId=%d", req->tableId); + + if(DihSwitchReplicaReq::getDistribute(requestInfo)) + fprintf(output, " Distribute"); + fprintf(output, "\n"); + return true; + } + break; + default: + fprintf(output, " Unknown request type:\n"); + } + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp b/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp new file mode 100644 index 00000000000..3a73747a978 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp @@ -0,0 +1,30 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/DisconnectRep.hpp> + +bool +printDISCONNECT_REP(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const DisconnectRep * const sig = (DisconnectRep *) theData; + + fprintf(output, " NodeId: %d, ErrorCode: %d\n", + sig->nodeId, sig->err); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp b/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp new file mode 100644 index 00000000000..0d59a981a18 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DropIndx.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/DropIndx.hpp> + +bool printDROP_INDX_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const DropIndxReq * const sig = (DropIndxReq *) theData; + + return false; +} + +bool printDROP_INDX_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const DropIndxConf * const sig = (DropIndxConf *) theData; + + return false; +} + +bool printDROP_INDX_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ +// const DropIndxRef * const sig = (DropIndxRef *) theData; + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DropTab.cpp b/storage/ndb/src/common/debugger/signaldata/DropTab.cpp new file mode 100644 index 00000000000..83c95b0e344 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DropTab.cpp @@ -0,0 +1,50 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/DropTab.hpp> + +bool +printDROP_TAB_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const DropTabReq * const sig = (DropTabReq *) theData; + + fprintf(output, + " senderRef: %x senderData: %d TableId: %d requestType: %d\n", + sig->senderRef, sig->senderData, sig->tableId, sig->requestType); + return true; +} + +bool printDROP_TAB_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const DropTabConf * const sig = (DropTabConf *) theData; + + fprintf(output, + " senderRef: %x senderData: %d TableId: %d\n", + sig->senderRef, sig->senderData, sig->tableId); + + return true; +} + +bool printDROP_TAB_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const DropTabRef * const sig = (DropTabRef *) theData; + + fprintf(output, + " senderRef: %x senderData: %d TableId: %d errorCode: %d\n", + sig->senderRef, sig->senderData, sig->tableId, sig->errorCode); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp b/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp new file mode 100644 index 00000000000..54e8734439f --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/DropTrig.cpp @@ -0,0 +1,89 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/DropTrig.hpp> + +bool printDROP_TRIG_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const DropTrigReq * const sig = (DropTrigReq *) theData; + + //char triggerName[MAX_TAB_NAME_SIZE]; + //char triggerType[32]; + //char triggerActionTime[32]; + //char triggerEvent[32]; + + //sig->getTriggerName((char *) &triggerName); + //switch(sig->getTriggerType()) { + //case(TriggerType::SECONDARY_INDEX): + //strcpy(triggerType, "SECONDARY_INDEX"); + //break; + //case(TriggerType::SUBSCRIPTION): + //strcpy(triggerType, "SUBSCRIPTION"); + //break; + //default: + //strcpy(triggerType, "UNSUPPORTED"); + //} + //strcpy(triggerActionTime, + //(sig->getTriggerActionTime() == TriggerActionTime::BEFORE)? + //"BEFORE":"AFTER"); + //switch(sig->getTriggerEvent()) { + //case (TriggerEvent::TE_INSERT): + //strcpy(triggerEvent, "INSERT"); + //break; + //case(TriggerEvent::TE_DELETE): + //strcpy(triggerEvent, "DELETE"); + //break; + //case(TriggerEvent::TE_UPDATE): + //strcpy(triggerEvent, "UPDATE"); + //break; + //} + + fprintf(output, "User: %u, ", sig->getUserRef()); + //fprintf(output, "Trigger name: \"%s\"\n", triggerName); + //fprintf(output, "Type: %s, ", triggerType); + //fprintf(output, "Action: %s, ", triggerActionTime); + //fprintf(output, "Event: %s, ", triggerEvent); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Table id: %u, ", sig->getTableId()); + fprintf(output, "\n"); + + return false; +} + +bool printDROP_TRIG_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const DropTrigConf * const sig = (DropTrigConf *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Table id: %u, ", sig->getTableId()); + fprintf(output, "\n"); + + return false; +} + +bool printDROP_TRIG_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const DropTrigRef * const sig = (DropTrigRef *) theData; + + fprintf(output, "User: %u, ", sig->getUserRef()); + fprintf(output, "Trigger id: %u, ", sig->getTriggerId()); + fprintf(output, "Table id: %u, ", sig->getTableId()); + fprintf(output, "Error code: %u, ", sig->getErrorCode()); + fprintf(output, "\n"); + + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FailRep.cpp b/storage/ndb/src/common/debugger/signaldata/FailRep.cpp new file mode 100644 index 00000000000..d70912fe8c7 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FailRep.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FailRep.hpp> + +bool +printFAIL_REP(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const FailRep * const sig = (FailRep *) theData; + + fprintf(output, " FailedNode: %d, FailCause: %d\n", + sig->failNodeId, sig->failCause); + + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp b/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp new file mode 100644 index 00000000000..d86aa2e06de --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp @@ -0,0 +1,56 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/FireTrigOrd.hpp> +#include <RefConvert.hpp> + +static +const char * +trigEvent(Uint32 i){ + switch(i){ + case TriggerEvent::TE_INSERT: + return "insert"; + break; + case TriggerEvent::TE_UPDATE: + return "update"; + break; + case TriggerEvent::TE_DELETE: + return "delete"; + break; + } + return "UNKNOWN"; +} + +bool +printFIRE_TRIG_ORD(FILE * output, const Uint32 * theData, Uint32 len, + Uint16 receiverBlockNo) +{ + const FireTrigOrd * const sig = (FireTrigOrd *) theData; + + fprintf(output, " TriggerId: %d TriggerEvent: %s\n", + sig->getTriggerId(), + trigEvent(sig->getTriggerEvent())); + fprintf(output, " UserRef: (%d, %d) User data: %x\n", + refToNode(sig->getUserRef()), + refToBlock(sig->getUserRef()), + sig->getConnectionPtr()); + fprintf(output, " Signal: PK=%d BEFORE=%d AFTER=%d\n", + sig->getNoOfPrimaryKeyWords(), + sig->getNoOfBeforeValueWords(), + sig->getNoOfAfterValueWords()); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp new file mode 100644 index 00000000000..6e443ffe5fc --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FsAppendReq.hpp> + +bool +printFSAPPENDREQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + bool ret = true; + + const FsAppendReq * const sig = (FsAppendReq *) theData; + + fprintf(output, " FilePointer: %d\n", sig->filePointer); + fprintf(output, " UserReference: H\'%.8x, UserPointer: H\'%.8x\n", + sig->userReference, sig->userPointer); + + fprintf(output, " varIndex: %d offset: %d size: %d\n", + sig->varIndex, + sig->offset, + sig->size); + return ret; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp new file mode 100644 index 00000000000..df9f3cc9fbc --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp @@ -0,0 +1,40 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FsCloseReq.hpp> + +bool +printFSCLOSEREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const FsCloseReq * const sig = (FsCloseReq *) theData; + + fprintf(output, " UserPointer: %d\n", + sig->userPointer); + fprintf(output, " FilePointer: %d\n", + sig->filePointer); + fprintf(output, " UserReference: H\'%.8x\n", + sig->userReference); + + fprintf(output, " Flags: H\'%.8x, ", sig->fileFlag); + if (sig->getRemoveFileFlag(sig->fileFlag)) + fprintf(output, "Remove file"); + else + fprintf(output, "Don't remove file"); + fprintf(output, "\n"); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FsConf.cpp b/storage/ndb/src/common/debugger/signaldata/FsConf.cpp new file mode 100644 index 00000000000..f0ab57aadcf --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FsConf.cpp @@ -0,0 +1,33 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FsConf.hpp> + +bool +printFSCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const FsConf * const sig = (FsConf *) theData; + + fprintf(output, " UserPointer: %d\n", sig->userPointer); + + if (len > 1){ + // Only valid if this is a FSOPENCONF + fprintf(output, " FilePointer: %d\n", sig->filePointer); + } + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp new file mode 100644 index 00000000000..31d351a8a84 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp @@ -0,0 +1,59 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FsOpenReq.hpp> + +bool +printFSOPENREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const FsOpenReq * const sig = (FsOpenReq *) theData; + + + fprintf(output, " UserReference: H\'%.8x, userPointer: H\'%.8x\n", + sig->userReference, sig->userPointer); + fprintf(output, " FileNumber[1-4]: H\'%.8x H\'%.8x H\'%.8x H\'%.8x\n", + sig->fileNumber[0], sig->fileNumber[1], sig->fileNumber[2], sig->fileNumber[3]); + fprintf(output, " FileFlags: H\'%.8x ", + sig->fileFlags); + + // File open mode must be one of ReadOnly, WriteOnly or ReadWrite + const Uint32 flags = sig->fileFlags; + switch(flags & 3){ + case FsOpenReq::OM_READONLY: + fprintf(output, "Open read only"); + break; + case FsOpenReq::OM_WRITEONLY: + fprintf(output, "Open write only"); + break; + case FsOpenReq::OM_READWRITE: + fprintf(output, "Open read and write"); + break; + default: + fprintf(output, "Open mode unknown!"); + } + + if (flags & FsOpenReq::OM_CREATE) + fprintf(output, ", Create new file"); + if (flags & FsOpenReq::OM_TRUNCATE) + fprintf(output, ", Truncate existing file"); + if (flags & FsOpenReq::OM_APPEND) + fprintf(output, ", Append"); + + fprintf(output, "\n"); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp b/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp new file mode 100644 index 00000000000..a9f240d3cb4 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp @@ -0,0 +1,85 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FsReadWriteReq.hpp> + +bool +printFSREADWRITEREQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + bool ret = true; + + const FsReadWriteReq * const sig = (FsReadWriteReq *) theData; + + fprintf(output, " UserPointer: %d\n", sig->userPointer); + fprintf(output, " FilePointer: %d\n", sig->filePointer); + fprintf(output, " UserReference: H\'%.8x", sig->userReference); + + fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag); + if (sig->getSyncFlag(sig->operationFlag)) + fprintf(output, "Sync,"); + else + fprintf(output, "No sync,"); + + fprintf(output, " Format="); + switch(sig->getFormatFlag(sig->operationFlag)){ + case FsReadWriteReq::fsFormatListOfPairs: + fprintf(output, "List of pairs)\n"); + break; + case FsReadWriteReq::fsFormatArrayOfPages: + fprintf(output, "Array of pages)\n"); + break; + case FsReadWriteReq::fsFormatListOfMemPages: + fprintf(output, "List of mem pages)\n"); + break; + default: + fprintf(output, "fsFormatMax not handled\n"); + ret = false; + break; + } + + fprintf(output, " varIndex: %d\n", + sig->varIndex); + fprintf(output, " numberOfPages: %d\n", + sig->numberOfPages); + fprintf(output, " pageData: "); + + unsigned int i; + switch(sig->getFormatFlag(sig->operationFlag)){ + case FsReadWriteReq::fsFormatListOfPairs: + for (i= 0; i < sig->numberOfPages*2; i += 2){ + fprintf(output, " H\'%.8x, H\'%.8x\n", sig->data.pageData[i], + sig->data.pageData[i + 1]); + } + break; + case FsReadWriteReq::fsFormatArrayOfPages: + fprintf(output, " H\'%.8x, H\'%.8x\n", sig->data.pageData[0], + sig->data.pageData[1]); + break; + case FsReadWriteReq::fsFormatListOfMemPages: + for (i= 0; i < (sig->numberOfPages + 1); i++){ + fprintf(output, " H\'%.8x, ", sig->data.pageData[i]); + } + break; + default: + fprintf(output, "Impossible event\n"); + } + + fprintf(output, "\n"); + return ret; +} diff --git a/storage/ndb/src/common/debugger/signaldata/FsRef.cpp b/storage/ndb/src/common/debugger/signaldata/FsRef.cpp new file mode 100644 index 00000000000..ccf3d6da9c8 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/FsRef.cpp @@ -0,0 +1,75 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/FsRef.hpp> + +bool +printFSREF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + bool ret = true; + + const FsRef * const sig = (FsRef *) theData; + + fprintf(output, " UserPointer: %d\n", + sig->userPointer); + + fprintf(output, " ErrorCode: %d, ", sig->errorCode); + switch (sig->getErrorCode(sig->errorCode)){ + case FsRef::fsErrNone: + fprintf(output, "No error"); + break; + case FsRef::fsErrHardwareFailed: + fprintf(output, "Hardware failure!"); + break; + case FsRef::fsErrUserError: + fprintf(output, "User error!"); + break; + case FsRef::fsErrEnvironmentError: + fprintf(output, "Environment error!"); + break; + case FsRef::fsErrTemporaryNotAccessible: + fprintf(output, "Temporary not accesible!"); + break; + case FsRef::fsErrNoSpaceLeftOnDevice: + fprintf(output, "No space left on device!"); + break; + case FsRef::fsErrPermissionDenied: + fprintf(output, "Permission denied!"); + break; + case FsRef::fsErrInvalidParameters: + fprintf(output, "Invalid parameters!"); + break; + case FsRef::fsErrNoMoreResources: + fprintf(output, "No more resources!"); + break; + case FsRef::fsErrFileDoesNotExist: + fprintf(output, "File does not exist!"); + break; + + case FsRef::fsErrUnknown: + default: + fprintf(output, "Unknown!"); + ret = false; + break; + } + fprintf(output, "\n"); + fprintf(output, " OS ErrorCode: %d \n", sig->osErrorCode); + + return ret; +} diff --git a/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp b/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp new file mode 100644 index 00000000000..7566f004bfd --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/GCPSave.cpp @@ -0,0 +1,78 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/GCPSave.hpp> +#include <RefConvert.hpp> + +bool +printGCPSaveReq(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 receiverBlockNo){ + + GCPSaveReq * sr = (GCPSaveReq*)theData; + + fprintf(output, " dihBlockRef = (%d, %d) dihPtr = %d gci = %d\n", + refToBlock(sr->dihBlockRef), refToNode(sr->dihBlockRef), + sr->dihPtr, sr->gci); + + return true; +} + +bool +printGCPSaveRef(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 receiverBlockNo){ + + GCPSaveRef * sr = (GCPSaveRef*)theData; + + fprintf(output, " nodeId = %d dihPtr = %d gci = %d reason: ", + sr->nodeId, + sr->dihPtr, sr->gci); + + switch(sr->errorCode){ + case GCPSaveRef::NodeShutdownInProgress: + fprintf(output, "NodeShutdownInProgress\n"); + break; + case GCPSaveRef::FakedSignalDueToNodeFailure: + fprintf(output, "FakedSignalDueToNodeFailure\n"); + break; + default: + fprintf(output, "Unknown reason: %d\n", sr->errorCode); + return false; + } + + return true; +} + +bool +printGCPSaveConf(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 receiverBlockNo){ + + GCPSaveConf * sr = (GCPSaveConf*)theData; + + fprintf(output, " nodeId = %d dihPtr = %d gci = %d\n", + sr->nodeId, + sr->dihPtr, sr->gci); + + return true; +} + + diff --git a/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp b/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp new file mode 100755 index 00000000000..2ef5feaada7 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/IndxAttrInfo.hpp> + +bool +printINDXATTRINFO(FILE * output, const Uint32 * theData, Uint32 len, + Uint16 receiverBlockNo) +{ +// const IndxAttrInfo * const sig = (IndxAttrInfo *) theData; + + Uint32 i = 0; + while (i < len) + fprintf(output, " H\'%.8x", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp b/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp new file mode 100755 index 00000000000..6fe5567188d --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/IndxKeyInfo.hpp> + +bool +printINDXKEYINFO(FILE * output, const Uint32 * theData, Uint32 len, + Uint16 receiverBlockNo) +{ +// const IndxKeyInfo * const sig = (IndxKeyInfo *) theData; + + Uint32 i = 0; + while (i < len) + fprintf(output, " H\'%.8x", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/LCP.cpp b/storage/ndb/src/common/debugger/signaldata/LCP.cpp new file mode 100644 index 00000000000..6b4bb13e2cd --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/LCP.cpp @@ -0,0 +1,89 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <RefConvert.hpp> +#include <signaldata/LCP.hpp> +#include <DebuggerNames.hpp> + +bool +printSTART_LCP_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + const StartLcpReq * const sig = (StartLcpReq *) theData; + + char buf1[8*_NDB_NODE_BITMASK_SIZE+1]; + char buf2[8*_NDB_NODE_BITMASK_SIZE+1]; + fprintf(output, + " Sender: %d LcpId: %d\n" + " ParticipatingDIH = %s\n" + " ParticipatingLQH = %s\n", + refToNode(sig->senderRef), sig->lcpId, + sig->participatingDIH.getText(buf1), + sig->participatingLQH.getText(buf2)); + + return true; +} + +bool +printSTART_LCP_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + const StartLcpConf * const sig = (StartLcpConf *) theData; + + fprintf(output, " Sender: %d LcpId: %d\n", + refToNode(sig->senderRef), sig->lcpId); + + return true; +} + +bool +printLCP_FRAG_ORD(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + const LcpFragOrd * const sig = (LcpFragOrd *) theData; + + fprintf(output, " LcpId: %d LcpNo: %d Table: %d Fragment: %d\n", + sig->lcpId, sig->lcpNo, sig->tableId, sig->fragmentId); + + fprintf(output, " KeepGCI: %d LastFragmentFlag: %d\n", + sig->keepGci, sig->lastFragmentFlag); + return true; +} + +bool +printLCP_FRAG_REP(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + const LcpFragRep * const sig = (LcpFragRep *) theData; + + fprintf(output, " LcpId: %d LcpNo: %d NodeId: %d Table: %d Fragment: %d\n", + sig->lcpId, sig->lcpNo, sig->nodeId, sig->tableId, sig->fragId); + fprintf(output, " Max GCI Started: %d Max GCI Completed: %d\n", + sig->maxGciStarted, sig->maxGciCompleted); + return true; +} + +bool +printLCP_COMPLETE_REP(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo){ + + const LcpCompleteRep * const sig = (LcpCompleteRep *) theData; + + fprintf(output, " LcpId: %d NodeId: %d Block: %s\n", + sig->lcpId, sig->nodeId, getBlockName(sig->blockNo)); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp b/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp new file mode 100644 index 00000000000..6d727959a67 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp @@ -0,0 +1,61 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/LqhFrag.hpp> + +bool +printLQH_FRAG_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 recB){ + LqhFragReq* sig = (LqhFragReq*)theData; + + fprintf(output, " senderData: %d senderRef: %x", + sig->senderData, sig->senderRef); + fprintf(output, " tableId: %d fragmentId: %d tableType: %d", + sig->tableId, sig->fragmentId, sig->tableType); + if (sig->primaryTableId == RNIL) + fprintf(output, " primaryTableId: RNIL\n"); + else + fprintf(output, " primaryTableId: %d\n", sig->primaryTableId); + fprintf(output, " localKeyLength: %d maxLoadFactor: %d minLoadFactor: %d\n", + sig->localKeyLength, sig->maxLoadFactor, sig->minLoadFactor); + fprintf(output, " kValue: %d lh3DistrBits: %d lh3PageBits: %d\n", + sig->kValue, sig->lh3DistrBits, sig->lh3PageBits); + + fprintf(output, " noOfAttributes: %d noOfNullAttributes: %d keyLength: %d\n", + sig->noOfAttributes, sig->noOfNullAttributes, sig->keyLength); + + fprintf(output, " noOfPagesToPreAllocate: %d schemaVersion: %d nextLCP: %d\n", + sig->noOfPagesToPreAllocate, sig->schemaVersion, sig->nextLCP); + + return true; +} +bool +printLQH_FRAG_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 rec){ + LqhFragConf* sig = (LqhFragConf*)theData; + + fprintf(output, " senderData: %d lqhFragPtr: %d\n", + sig->senderData, sig->lqhFragPtr); + return true; +} + +bool +printLQH_FRAG_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 rec){ + LqhFragRef* sig = (LqhFragRef*)theData; + + fprintf(output, " senderData: %d errorCode: %d\n", + sig->senderData, sig->errorCode); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp b/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp new file mode 100644 index 00000000000..2796437fd8b --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/LqhKey.cpp @@ -0,0 +1,161 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/LqhKey.hpp> + +bool +printLQHKEYREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const LqhKeyReq * const sig = (LqhKeyReq *) theData; + + fprintf(output, + " ClientPtr = H\'%.8x hashValue = H\'%.8x tcBlockRef = H\'%.8x\n" + " transId1 = H\'%.8x transId2 = H\'%.8x savePointId = H\'%.8x\n", + sig->clientConnectPtr, // DATA 0 + sig->hashValue, // DATA 2 + sig->tcBlockref, // DATA 4 + sig->transId1, // DATA 7 + sig->transId2, // DATA 8 + sig->savePointId // DATA 9 + ); + + const Uint32 reqInfo = sig->requestInfo; + const Uint32 attrLen = sig->attrLen; + + fprintf(output, + " Op: %d Lock: %d Flags: ", + LqhKeyReq::getOperation(reqInfo), + LqhKeyReq::getLockType(reqInfo)); + if(LqhKeyReq::getSimpleFlag(reqInfo)) + fprintf(output, "Simple "); + if(LqhKeyReq::getDirtyFlag(reqInfo)) + fprintf(output, "Dirty "); + if(LqhKeyReq::getInterpretedFlag(reqInfo)) + fprintf(output, "Interpreted "); + if(LqhKeyReq::getScanTakeOverFlag(attrLen)) + fprintf(output, "ScanTakeOver "); + if(LqhKeyReq::getMarkerFlag(reqInfo)) + fprintf(output, "CommitAckMarker "); + + fprintf(output, "ScanInfo/noFiredTriggers: H\'%x\n", sig->scanInfo); + + fprintf(output, + " AttrLen: %d (%d in this) KeyLen: %d TableId: %d SchemaVer: %d\n", + LqhKeyReq::getAttrLen(attrLen), + LqhKeyReq::getAIInLqhKeyReq(reqInfo), + LqhKeyReq::getKeyLen(reqInfo), + LqhKeyReq::getTableId(sig->tableSchemaVersion), + LqhKeyReq::getSchemaVersion(sig->tableSchemaVersion)); + + fprintf(output, + " FragId: %d ReplicaNo: %d LastReplica: %d NextNodeId: %d\n", + LqhKeyReq::getFragmentId(sig->fragmentData), + LqhKeyReq::getSeqNoReplica(reqInfo), + LqhKeyReq::getLastReplicaNo(reqInfo), + LqhKeyReq::getNextReplicaNodeId(sig->fragmentData)); + + bool printed = false; + Uint32 nextPos = LqhKeyReq::getApplicationAddressFlag(reqInfo) << 1; + if(nextPos != 0){ + fprintf(output, + " ApiRef: H\'%.8x ApiOpRef: H\'%.8x", + sig->variableData[0], + sig->variableData[1]); + printed = true; + } + + if(LqhKeyReq::getSameClientAndTcFlag(reqInfo)){ + fprintf(output, " TcOpRec: H\'%.8x", sig->variableData[nextPos]); + nextPos++; + printed = true; + } + + Uint32 tmp = LqhKeyReq::getLastReplicaNo(reqInfo) - + LqhKeyReq::getSeqNoReplica(reqInfo); + if(tmp > 1){ + NodeId node2 = sig->variableData[nextPos] & 0xffff; + NodeId node3 = sig->variableData[nextPos] >> 16; + fprintf(output, " NextNodeId2: %d NextNodeId3: %d", + node2, node3); + nextPos ++; + printed = true; + } + if(printed) + fprintf(output, "\n"); + + printed = false; + if(LqhKeyReq::getStoredProcFlag(attrLen)){ + fprintf(output, " StoredProcId: %d", sig->variableData[nextPos]); + nextPos++; + printed = true; + } + + if(LqhKeyReq::getReturnedReadLenAIFlag(reqInfo)){ + fprintf(output, " ReturnedReadLenAI: %d", + sig->variableData[nextPos]); + nextPos++; + printed = true; + } + + const UintR keyLen = LqhKeyReq::getKeyLen(reqInfo); + if(keyLen > 0){ + fprintf(output, " KeyInfo: "); + for(UintR i = 0; i<keyLen && i<4; i++, nextPos++) + fprintf(output, "H\'%.8x ", sig->variableData[nextPos]); + fprintf(output, "\n"); + } + + if(!LqhKeyReq::getInterpretedFlag(reqInfo)){ + fprintf(output, " AttrInfo: "); + for(int i = 0; i<LqhKeyReq::getAIInLqhKeyReq(reqInfo); i++, nextPos++) + fprintf(output, "H\'%.8x ", sig->variableData[nextPos]); + fprintf(output, "\n"); + } else { + fprintf(output, " InitialReadSize: %d InterpretedSize: %d " + "FinalUpdateSize: %d FinalReadSize: %d SubroutineSize: %d\n", + sig->variableData[nextPos+0], sig->variableData[nextPos+1], + sig->variableData[nextPos+2], sig->variableData[nextPos+3], + sig->variableData[nextPos+4]); + nextPos += 5; + } + return true; +} + +bool +printLQHKEYCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ +// const LqhKeyConf * const sig = (LqhKeyConf *) theData; + + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} + +bool +printLQHKEYREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ +// const LqhKeyRef * const sig = (LqhKeyRef *) theData; + + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp b/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp new file mode 100644 index 00000000000..8282530cae6 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp @@ -0,0 +1,40 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/LqhTransConf.hpp> + +bool +printLQH_TRANSCONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const LqhTransConf * const sig = (LqhTransConf *)theData; + fprintf(output, " tcRef: %x\n", sig->tcRef); + fprintf(output, " lqhNodeId: %x\n", sig->lqhNodeId); + fprintf(output, " operationStatus: %x\n", sig->operationStatus); + fprintf(output, " transId1: %x\n", sig->transId1); + fprintf(output, " transId2: %x\n", sig->transId2); + fprintf(output, " apiRef: %x\n", sig->apiRef); + fprintf(output, " apiOpRec: %x\n", sig->apiOpRec); + fprintf(output, " lqhConnectPtr: %x\n", sig->lqhConnectPtr); + fprintf(output, " oldTcOpRec: %x\n", sig->oldTcOpRec); + fprintf(output, " requestInfo: %x\n", sig->requestInfo); + fprintf(output, " gci: %x\n", sig->gci); + fprintf(output, " nextNodeId1: %x\n", sig->nextNodeId1); + fprintf(output, " nextNodeId2: %x\n", sig->nextNodeId2); + fprintf(output, " nextNodeId3: %x\n", sig->nextNodeId3); + fprintf(output, " tableId: %x\n", sig->tableId); + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/Makefile.am b/storage/ndb/src/common/debugger/signaldata/Makefile.am new file mode 100644 index 00000000000..9146d552568 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/Makefile.am @@ -0,0 +1,47 @@ + +noinst_LTLIBRARIES = libsignaldataprint.la + +libsignaldataprint_la_SOURCES = \ + TcKeyReq.cpp TcKeyConf.cpp TcKeyRef.cpp \ + TcRollbackRep.cpp \ + TupKey.cpp TupCommit.cpp LqhKey.cpp \ + FsOpenReq.cpp FsCloseReq.cpp FsRef.cpp FsConf.cpp FsReadWriteReq.cpp\ + SignalDataPrint.cpp SignalNames.cpp \ + ContinueB.cpp DihContinueB.cpp NdbfsContinueB.cpp \ + CloseComReqConf.cpp PackedSignal.cpp PrepFailReqRef.cpp \ + GCPSave.cpp DictTabInfo.cpp \ + AlterTable.cpp AlterTab.cpp \ + CreateTrig.cpp AlterTrig.cpp DropTrig.cpp \ + FireTrigOrd.cpp TrigAttrInfo.cpp \ + CreateIndx.cpp AlterIndx.cpp DropIndx.cpp TcIndx.cpp \ + IndxKeyInfo.cpp IndxAttrInfo.cpp \ + FsAppendReq.cpp ScanTab.cpp \ + BackupImpl.cpp BackupSignalData.cpp \ + UtilSequence.cpp UtilPrepare.cpp UtilDelete.cpp UtilExecute.cpp \ + LqhFrag.cpp DropTab.cpp PrepDropTab.cpp LCP.cpp MasterLCP.cpp \ + CopyGCI.cpp SystemError.cpp StartRec.cpp NFCompleteRep.cpp \ + FailRep.cpp DisconnectRep.cpp SignalDroppedRep.cpp \ + SumaImpl.cpp NdbSttor.cpp CreateFragmentation.cpp \ + UtilLock.cpp TuxMaint.cpp AccLock.cpp \ + LqhTrans.cpp ReadNodesConf.cpp CntrStart.cpp \ + ScanFrag.cpp + +include $(top_srcdir)/ndb/config/common.mk.am +include $(top_srcdir)/ndb/config/type_ndbapi.mk.am + +# Don't update the files from bitkeeper +%::SCCS/s.% + +windoze-dsp: libsignaldataprint.dsp + +libsignaldataprint.dsp: Makefile \ + $(top_srcdir)/ndb/config/win-lib.am \ + $(top_srcdir)/ndb/config/win-name \ + $(top_srcdir)/ndb/config/win-includes \ + $(top_srcdir)/ndb/config/win-sources \ + $(top_srcdir)/ndb/config/win-libraries + cat $(top_srcdir)/ndb/config/win-lib.am > $@ + @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES) + @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES) + @$(top_srcdir)/ndb/config/win-sources $@ $(libsignaldataprint_la_SOURCES) + @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD) diff --git a/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp b/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp new file mode 100644 index 00000000000..078b92f6f2e --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp @@ -0,0 +1,87 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/MasterLCP.hpp> +#include <RefConvert.hpp> + +static +void +print(char *buf, size_t buf_len, MasterLCPConf::State s){ + switch(s){ + case MasterLCPConf::LCP_STATUS_IDLE: + BaseString::snprintf(buf, buf_len, "LCP_STATUS_IDLE"); + break; + case MasterLCPConf::LCP_STATUS_ACTIVE: + BaseString::snprintf(buf, buf_len, "LCP_STATUS_ACTIVE"); + break; + case MasterLCPConf::LCP_TAB_COMPLETED: + BaseString::snprintf(buf, buf_len, "LCP_TAB_COMPLETED"); + break; + case MasterLCPConf::LCP_TAB_SAVED: + BaseString::snprintf(buf, buf_len, "LCP_TAB_SAVED"); + break; + } +} + +NdbOut & +operator<<(NdbOut& out, const MasterLCPConf::State& s){ + static char buf[255]; + print(buf, sizeof(buf), s); + out << buf; + return out; +} + +bool +printMASTER_LCP_CONF(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + + MasterLCPConf * sig = (MasterLCPConf *)&theData[0]; + + static char buf[255]; + print(buf, sizeof(buf), (MasterLCPConf::State)sig->lcpState); + fprintf(output, " senderNode=%d failedNode=%d SenderState=%s\n", + sig->senderNodeId, sig->failedNodeId, buf); + return true; +} + +bool +printMASTER_LCP_REQ(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + + MasterLCPReq * sig = (MasterLCPReq *)&theData[0]; + + fprintf(output, " masterRef=(node=%d, block=%d), failedNode=%d\n", + refToNode(sig->masterRef), refToBlock(sig->masterRef), + sig->failedNodeId); + return true; +} + +bool +printMASTER_LCP_REF(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + + MasterLCPRef * sig = (MasterLCPRef *)&theData[0]; + fprintf(output, " senderNode=%d failedNode=%d\n", + sig->senderNodeId, sig->failedNodeId); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp b/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp new file mode 100644 index 00000000000..f2d6f2f104a --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp @@ -0,0 +1,44 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <DebuggerNames.hpp> +#include <signaldata/NFCompleteRep.hpp> + +bool +printNF_COMPLETE_REP(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + + NFCompleteRep * sig = (NFCompleteRep*)theData; + const char * who = getBlockName(sig->blockNo, 0); + + if(who == 0){ + fprintf(output, + " Node: %d has completed failure of node %d\n", + sig->nodeId, sig->failedNodeId); + } else { + fprintf(output, + " Node: %d block: %s has completed failure of node %d\n", + sig->nodeId, who, sig->failedNodeId); + } + + fprintf(output, "Sent from line: %d\n", + sig->from); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp b/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp new file mode 100644 index 00000000000..9fd081313be --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp @@ -0,0 +1,50 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/NdbSttor.hpp> + +bool +printNDB_STTOR(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const NdbSttor * const sig = (NdbSttor *)theData; + fprintf(output, " senderRef: %x\n", sig->senderRef); + fprintf(output, " nodeId: %x\n", sig->nodeId); + fprintf(output, " internalStartPhase: %x\n", sig->internalStartPhase); + fprintf(output, " typeOfStart: %x\n", sig->typeOfStart); + fprintf(output, " masterNodeId: %x\n", sig->masterNodeId); + + int left = len - NdbSttor::SignalLength; + if(left > 0){ + fprintf(output, " config: "); + for(int i = 0; i<left; i++){ + fprintf(output, "%x ", sig->config[i]); + if(((i + 1) % 7) == 0 && (i+1) < left){ + fprintf(output, "\n config: "); + } + } + fprintf(output, "\n"); + } + return true; +} + +bool +printNDB_STTORRY(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const NdbSttorry * const sig = (NdbSttorry *)theData; + fprintf(output, " senderRef: %x\n", sig->senderRef); + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp b/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp new file mode 100644 index 00000000000..9f55efae017 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp @@ -0,0 +1,41 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <signaldata/NdbfsContinueB.hpp> + +bool +printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 not_used){ + + (void)not_used; + + switch (theData[0]) { + case NdbfsContinueB::ZSCAN_MEMORYCHANNEL_10MS_DELAY: + fprintf(output, " Scanning the memory channel every 10ms\n"); + return true; + break; + case NdbfsContinueB::ZSCAN_MEMORYCHANNEL_NO_DELAY: + fprintf(output, " Scanning the memory channel again with no delay\n"); + return true; + break; + default: + fprintf(output, " Default system error lab...\n"); + return false; + break; + }//switch + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp b/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp new file mode 100644 index 00000000000..f0f7aee74e4 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp @@ -0,0 +1,104 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/PackedSignal.hpp> +#include <signaldata/LqhKey.hpp> +#include <debugger/DebuggerNames.hpp> + +bool +printPACKED_SIGNAL(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + fprintf(output, "--------- Begin Packed Signals --------\n"); + // Print each signal separately + for (i = 0; i < len;) { + switch (PackedSignal::getSignalType(theData[i])) { + case ZCOMMIT: { + Uint32 signalLength = 4; + fprintf(output, "--------------- Signal ----------------\n"); + fprintf(output, "r.bn: %u \"%s\", length: %u \"COMMIT\"\n", + receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength); + fprintf(output, "Signal data: "); + for(Uint32 j = 0; j < signalLength; j++) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + break; + } + case ZCOMPLETE: { + Uint32 signalLength = 3; + fprintf(output, "--------------- Signal ----------------\n"); + fprintf(output, "r.bn: %u \"%s\", length: %u \"COMPLETE\"\n", + receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength); + fprintf(output, "Signal data: "); + for(Uint32 j = 0; j < signalLength; j++) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + break; + } + case ZCOMMITTED: { + Uint32 signalLength = 3; + fprintf(output, "--------------- Signal ----------------\n"); + fprintf(output, "r.bn: %u \"%s\", length: %u \"COMMITTED\"\n", + receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength); + fprintf(output, "Signal data: "); + for(Uint32 j = 0; j < signalLength; j++) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + break; + } + case ZCOMPLETED: { + Uint32 signalLength = 3; + fprintf(output, "--------------- Signal ----------------\n"); + fprintf(output, "r.bn: %u \"%s\", length: %u \"COMPLETED\"\n", + receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength); + fprintf(output, "Signal data: "); + for(Uint32 j = 0; j < signalLength; j++) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + break; + } + case ZLQHKEYCONF: { + Uint32 signalLength = LqhKeyConf::SignalLength; + + fprintf(output, "--------------- Signal ----------------\n"); + fprintf(output, "r.bn: %u \"%s\", length: %u \"LQHKEYCONF\"\n", + receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength); + printLQHKEYCONF(output, theData + i, signalLength, receiverBlockNo); + i += signalLength; + break; + } + case ZREMOVE_MARKER: { + Uint32 signalLength = 2; + fprintf(output, "--------------- Signal ----------------\n"); + fprintf(output, "r.bn: %u \"%s\", length: %u \"REMOVE_MARKER\"\n", + receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength); + fprintf(output, "Signal data: "); + i++; // Skip first word! + for(Uint32 j = 0; j < signalLength; j++) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + break; + } + default: + fprintf(output, "Unknown signal type\n"); + } + }//for + fprintf(output, "--------- End Packed Signals ----------\n"); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp b/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp new file mode 100644 index 00000000000..59001bcd6f6 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp @@ -0,0 +1,50 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/PrepDropTab.hpp> + +bool +printPREP_DROP_TAB_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const PrepDropTabReq * const sig = (PrepDropTabReq *) theData; + + fprintf(output, + " senderRef: %x senderData: %d TableId: %d\n", + sig->senderRef, sig->senderData, sig->tableId); + return true; +} + +bool printPREP_DROP_TAB_CONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const PrepDropTabConf * const sig = (PrepDropTabConf *) theData; + + fprintf(output, + " senderRef: %x senderData: %d TableId: %d\n", + sig->senderRef, sig->senderData, sig->tableId); + + return true; +} + +bool printPREP_DROP_TAB_REF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo) +{ + const PrepDropTabRef * const sig = (PrepDropTabRef *) theData; + + fprintf(output, + " senderRef: %x senderData: %d TableId: %d errorCode: %d\n", + sig->senderRef, sig->senderData, sig->tableId, sig->errorCode); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp b/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp new file mode 100644 index 00000000000..2e900de8f70 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp @@ -0,0 +1,52 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <kernel_types.h> +#include <BlockNumbers.h> +#include <signaldata/PrepFailReqRef.hpp> + +bool +printPREPFAILREQREF(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 receiverBlockNo){ + + PrepFailReqRef * cc = (PrepFailReqRef*)theData; + + fprintf(output, " xxxBlockRef = (%d, %d) failNo = %d noOfNodes = %d\n", + refToBlock(cc->xxxBlockRef), refToNode(cc->xxxBlockRef), + cc->failNo, cc->noOfNodes); + + int hits = 0; + fprintf(output, " Nodes: "); + for(int i = 0; i<MAX_NODES; i++){ + if(NodeBitmask::get(cc->theNodes, i)){ + hits++; + fprintf(output, " %d", i); + } + if(hits == 16){ + fprintf(output, "\n Nodes: "); + hits = 0; + } + } + if(hits != 0) + fprintf(output, "\n"); + + return true; +} + + diff --git a/storage/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp b/storage/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp new file mode 100644 index 00000000000..103f4a884f1 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp @@ -0,0 +1,24 @@ +#include <signaldata/ReadNodesConf.hpp> + +bool +printREAD_NODES_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const ReadNodesConf * const sig = (ReadNodesConf *)theData; + fprintf(output, " noOfNodes: %x\n", sig->noOfNodes); + fprintf(output, " ndynamicId: %x\n", sig->ndynamicId); + fprintf(output, " masterNodeId: %x\n", sig->masterNodeId); + + char buf[32*NdbNodeBitmask::Size+1]; + fprintf(output, " allNodes(defined): %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->allNodes, buf)); + fprintf(output, " inactiveNodes: %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->inactiveNodes, buf)); + fprintf(output, " clusterNodes: %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->clusterNodes, buf)); + fprintf(output, " startedNodes: %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->startedNodes, buf)); + fprintf(output, " startingNodes: %s\n", + BitmaskImpl::getText(NdbNodeBitmask::Size, sig->startingNodes, buf)); + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp b/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp new file mode 100644 index 00000000000..4d19a325637 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp @@ -0,0 +1,42 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <BlockNumbers.h> +#include <signaldata/ScanTab.hpp> +#include <signaldata/ScanFrag.hpp> + +bool +printSCAN_FRAGREQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const ScanFragReq * const sig = (ScanFragReq *)theData; + fprintf(output, " senderData: %x\n", sig->senderData); + fprintf(output, " resultRef: %x\n", sig->resultRef); + fprintf(output, " savePointId: %x\n", sig->savePointId); + fprintf(output, " requestInfo: %x\n", sig->requestInfo); + fprintf(output, " tableId: %x\n", sig->tableId); + fprintf(output, " fragmentNo: %x\n", sig->fragmentNoKeyLen & 0xFFFF); + fprintf(output, " keyLen: %x\n", sig->fragmentNoKeyLen >> 16); + fprintf(output, " schemaVersion: %x\n", sig->schemaVersion); + fprintf(output, " transId1: %x\n", sig->transId1); + fprintf(output, " transId2: %x\n", sig->transId2); + fprintf(output, " clientOpPtr: %x\n", sig->clientOpPtr); + fprintf(output, " batch_size_rows: %x\n", sig->batch_size_rows); + fprintf(output, " batch_size_bytes: %x\n", sig->batch_size_bytes); + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp b/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp new file mode 100644 index 00000000000..e9c5ba6cc52 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp @@ -0,0 +1,156 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <BlockNumbers.h> +#include <signaldata/ScanTab.hpp> +#include <signaldata/ScanFrag.hpp> + +bool +printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const ScanTabReq * const sig = (ScanTabReq *) theData; + + const UintR requestInfo = sig->requestInfo; + + fprintf(output, " apiConnectPtr: H\'%.8x", + sig->apiConnectPtr); + fprintf(output, " requestInfo: H\'%.8x:\n", requestInfo); + fprintf(output, " Parallellism: %u, Batch: %u LockMode: %u Keyinfo: %u Holdlock: %u RangeScan: %u Descending: %u ReadCommitted: %u\n DistributionKeyFlag: %u", + sig->getParallelism(requestInfo), + sig->getScanBatch(requestInfo), + sig->getLockMode(requestInfo), + sig->getKeyinfoFlag(requestInfo), + sig->getHoldLockFlag(requestInfo), + sig->getRangeScanFlag(requestInfo), + sig->getDescendingFlag(requestInfo), + sig->getReadCommittedFlag(requestInfo), + sig->getDistributionKeyFlag(requestInfo)); + + if(sig->getDistributionKeyFlag(requestInfo)) + fprintf(output, " DKey: %x", sig->distributionKey); + + Uint32 keyLen = (sig->attrLenKeyLen >> 16); + Uint32 attrLen = (sig->attrLenKeyLen & 0xFFFF); + fprintf(output, " attrLen: %d, keyLen: %d tableId: %d, tableSchemaVer: %d\n", + attrLen, keyLen, sig->tableId, sig->tableSchemaVersion); + + fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x) storedProcId: H\'%.8x\n", + sig->transId1, sig->transId2, sig->storedProcId); + fprintf(output, " batch_byte_size: %d, first_batch_size: %d\n", + sig->batch_byte_size, sig->first_batch_size); + return false; +} + +bool +printSCANTABCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const ScanTabConf * const sig = (ScanTabConf *) theData; + + const UintR requestInfo = sig->requestInfo; + + fprintf(output, " apiConnectPtr: H\'%.8x\n", + sig->apiConnectPtr); + fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n", + sig->transId1, sig->transId2); + + fprintf(output, " requestInfo: Eod: %d OpCount: %d\n", + (requestInfo & ScanTabConf::EndOfData == ScanTabConf::EndOfData), + (requestInfo & (~ScanTabConf::EndOfData))); + size_t op_count= requestInfo & (~ScanTabConf::EndOfData); + if(op_count){ + fprintf(output, " Operation(s) [api tc rows len]:\n"); + ScanTabConf::OpData * op = (ScanTabConf::OpData*) + (theData + ScanTabConf::SignalLength); + for(size_t i = 0; i<op_count; i++){ + if(op->info != ScanTabConf::EndOfData) + fprintf(output, " [0x%x 0x%x %d %d]", + op->apiPtrI, op->tcPtrI, + ScanTabConf::getRows(op->info), + ScanTabConf::getLength(op->info)); + else + fprintf(output, " [0x%x 0x%x eod]", + op->apiPtrI, op->tcPtrI); + + op++; + } + fprintf(output, "\n"); + } + return false; +} + +bool +printSCANTABREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const ScanTabRef * const sig = (ScanTabRef *) theData; + + fprintf(output, " apiConnectPtr: H\'%.8x\n", + sig->apiConnectPtr); + + fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n", + sig->transId1, sig->transId2); + + fprintf(output, " Errorcode: %u\n", sig->errorCode); + + fprintf(output, " closeNeeded: %u\n", sig->closeNeeded); + return false; +} + + +bool +printSCANFRAGNEXTREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + const ScanFragNextReq * const sig = (ScanFragNextReq *) theData; + + fprintf(output, " senderData: H\'%.8x\n", + sig->senderData); + + fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n", + sig->transId1, sig->transId2); + + fprintf(output, " Close scan: %u\n", sig->closeFlag); + + return false; +} + +bool +printSCANNEXTREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + if(receiverBlockNo == DBTC){ + const ScanNextReq * const sig = (ScanNextReq *) theData; + + fprintf(output, " apiConnectPtr: H\'%.8x\n", + sig->apiConnectPtr); + + fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x) ", + sig->transId1, sig->transId2); + + fprintf(output, " Stop this scan: %u\n", sig->stopScan); + + const Uint32 * ops = theData + ScanNextReq::SignalLength; + if(len > ScanNextReq::SignalLength){ + fprintf(output, " tcFragPtr(s): "); + for(size_t i = ScanNextReq::SignalLength; i<len; i++) + fprintf(output, " 0x%x", * ops++); + fprintf(output, "\n"); + } + } + if (receiverBlockNo == DBLQH){ + return printSCANFRAGNEXTREQ(output, theData, len, receiverBlockNo); + } + return false; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp b/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp new file mode 100644 index 00000000000..ab23c04bffa --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp @@ -0,0 +1,211 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <GlobalSignalNumbers.h> +#include <signaldata/SignalData.hpp> +#include <signaldata/SignalDataPrint.hpp> + +/** + * This is the register + */ + +const NameFunctionPair +SignalDataPrintFunctions[] = { + { GSN_TCKEYREQ, printTCKEYREQ }, + { GSN_TCINDXREQ, printTCKEYREQ }, + { GSN_TCKEYCONF, printTCKEYCONF }, + { GSN_TCKEYREF, printTCKEYREF }, + { GSN_LQHKEYREQ, printLQHKEYREQ }, + { GSN_LQHKEYCONF, printLQHKEYCONF }, + { GSN_LQHKEYREF, printLQHKEYREF }, + { GSN_TUPKEYREQ, printTUPKEYREQ }, + { GSN_TUPKEYCONF, printTUPKEYCONF }, + { GSN_TUPKEYREF, printTUPKEYREF }, + { GSN_TUP_COMMITREQ, printTUPCOMMITREQ }, + { GSN_CONTINUEB, printCONTINUEB }, + { GSN_FSOPENREQ, printFSOPENREQ }, + { GSN_FSCLOSEREQ, printFSCLOSEREQ }, + { GSN_FSREADREQ, printFSREADWRITEREQ }, + { GSN_FSWRITEREQ, printFSREADWRITEREQ }, + { GSN_FSCLOSEREF, printFSREF }, + { GSN_FSOPENREF, printFSREF }, + { GSN_FSWRITEREF, printFSREF }, + { GSN_FSREADREF, printFSREF }, + { GSN_FSSYNCREF, printFSREF }, + { GSN_FSCLOSECONF, printFSCONF }, + { GSN_FSOPENCONF, printFSCONF }, + { GSN_FSWRITECONF, printFSCONF }, + { GSN_FSREADCONF, printFSCONF }, + { GSN_FSSYNCCONF, printFSCONF }, + { GSN_CLOSE_COMREQ, printCLOSECOMREQCONF }, + { GSN_CLOSE_COMCONF, printCLOSECOMREQCONF }, + { GSN_PACKED_SIGNAL, printPACKED_SIGNAL }, + { GSN_PREP_FAILREQ, printPREPFAILREQREF }, + { GSN_PREP_FAILREF, printPREPFAILREQREF }, + { GSN_ALTER_TABLE_REQ, printALTER_TABLE_REQ }, + { GSN_ALTER_TABLE_CONF, printALTER_TABLE_CONF }, + { GSN_ALTER_TABLE_REF, printALTER_TABLE_REF }, + { GSN_ALTER_TAB_REQ, printALTER_TAB_REQ }, + { GSN_ALTER_TAB_CONF, printALTER_TAB_CONF }, + { GSN_ALTER_TAB_REF, printALTER_TAB_REF }, + { GSN_CREATE_TRIG_REQ, printCREATE_TRIG_REQ }, + { GSN_CREATE_TRIG_CONF, printCREATE_TRIG_CONF }, + { GSN_CREATE_TRIG_REF, printCREATE_TRIG_REF }, + { GSN_ALTER_TRIG_REQ, printALTER_TRIG_REQ }, + { GSN_ALTER_TRIG_CONF, printALTER_TRIG_CONF }, + { GSN_ALTER_TRIG_REF, printALTER_TRIG_REF }, + { GSN_DROP_TRIG_REQ, printDROP_TRIG_REQ }, + { GSN_DROP_TRIG_CONF, printDROP_TRIG_CONF }, + { GSN_DROP_TRIG_REF, printDROP_TRIG_REF }, + { GSN_FIRE_TRIG_ORD, printFIRE_TRIG_ORD }, + { GSN_TRIG_ATTRINFO, printTRIG_ATTRINFO }, + { GSN_CREATE_INDX_REQ, printCREATE_INDX_REQ }, + { GSN_CREATE_INDX_CONF, printCREATE_INDX_CONF }, + { GSN_CREATE_INDX_REF, printCREATE_INDX_REF }, + { GSN_DROP_INDX_REQ, printDROP_INDX_REQ }, + { GSN_DROP_INDX_CONF, printDROP_INDX_CONF }, + { GSN_DROP_INDX_REF, printDROP_INDX_REF }, + { GSN_ALTER_INDX_REQ, printALTER_INDX_REQ }, + { GSN_ALTER_INDX_CONF, printALTER_INDX_CONF }, + { GSN_ALTER_INDX_REF, printALTER_INDX_REF }, + { GSN_TCINDXCONF, printTCINDXCONF }, + { GSN_TCINDXREF, printTCINDXREF }, + { GSN_INDXKEYINFO, printINDXKEYINFO }, + { GSN_INDXATTRINFO, printINDXATTRINFO }, + { GSN_FSAPPENDREQ, printFSAPPENDREQ }, + { GSN_BACKUP_REQ, printBACKUP_REQ }, + { GSN_BACKUP_DATA, printBACKUP_DATA }, + { GSN_BACKUP_REF, printBACKUP_REF }, + { GSN_BACKUP_CONF, printBACKUP_CONF }, + { GSN_ABORT_BACKUP_ORD, printABORT_BACKUP_ORD }, + { GSN_BACKUP_ABORT_REP, printBACKUP_ABORT_REP }, + { GSN_BACKUP_COMPLETE_REP, printBACKUP_COMPLETE_REP }, + { GSN_BACKUP_NF_COMPLETE_REP, printBACKUP_NF_COMPLETE_REP }, + { GSN_DEFINE_BACKUP_REQ, printDEFINE_BACKUP_REQ }, + { GSN_DEFINE_BACKUP_REF, printDEFINE_BACKUP_REF }, + { GSN_DEFINE_BACKUP_CONF, printDEFINE_BACKUP_CONF }, + { GSN_START_BACKUP_REQ, printSTART_BACKUP_REQ }, + { GSN_START_BACKUP_REF, printSTART_BACKUP_REF }, + { GSN_START_BACKUP_CONF, printSTART_BACKUP_CONF }, + { GSN_BACKUP_FRAGMENT_REQ, printBACKUP_FRAGMENT_REQ }, + { GSN_BACKUP_FRAGMENT_REF, printBACKUP_FRAGMENT_REF }, + { GSN_BACKUP_FRAGMENT_CONF, printBACKUP_FRAGMENT_CONF }, + { GSN_STOP_BACKUP_REQ, printSTOP_BACKUP_REQ }, + { GSN_STOP_BACKUP_REF, printSTOP_BACKUP_REF }, + { GSN_STOP_BACKUP_CONF, printSTOP_BACKUP_CONF }, + { GSN_BACKUP_STATUS_REQ, printBACKUP_STATUS_REQ }, + //{ GSN_BACKUP_STATUS_REF, printBACKUP_STATUS_REF }, + { GSN_BACKUP_STATUS_CONF, printBACKUP_STATUS_CONF }, + { GSN_UTIL_SEQUENCE_REQ, printUTIL_SEQUENCE_REQ }, + { GSN_UTIL_SEQUENCE_REF, printUTIL_SEQUENCE_REF }, + { GSN_UTIL_SEQUENCE_CONF, printUTIL_SEQUENCE_CONF }, + { GSN_UTIL_PREPARE_REQ, printUTIL_PREPARE_REQ }, + { GSN_UTIL_PREPARE_REF, printUTIL_PREPARE_REF }, + { GSN_UTIL_PREPARE_CONF, printUTIL_PREPARE_CONF }, + { GSN_UTIL_EXECUTE_REQ, printUTIL_EXECUTE_REQ }, + { GSN_UTIL_EXECUTE_REF, printUTIL_EXECUTE_REF }, + { GSN_UTIL_EXECUTE_CONF, printUTIL_EXECUTE_CONF }, + { GSN_SCAN_TABREQ, printSCANTABREQ }, + { GSN_SCAN_TABCONF, printSCANTABCONF }, + { GSN_SCAN_TABREF, printSCANTABREF }, + { GSN_SCAN_NEXTREQ, printSCANNEXTREQ }, + { GSN_LQHFRAGREQ, printLQH_FRAG_REQ }, + { GSN_LQHFRAGREF, printLQH_FRAG_REF }, + { GSN_LQHFRAGCONF, printLQH_FRAG_CONF }, + { GSN_PREP_DROP_TAB_REQ, printPREP_DROP_TAB_REQ }, + { GSN_PREP_DROP_TAB_REF, printPREP_DROP_TAB_REF }, + { GSN_PREP_DROP_TAB_CONF, printPREP_DROP_TAB_CONF }, + { GSN_DROP_TAB_REQ, printDROP_TAB_REQ }, + { GSN_DROP_TAB_REF, printDROP_TAB_REF }, + { GSN_DROP_TAB_CONF, printDROP_TAB_CONF }, + { GSN_LCP_FRAG_ORD, printLCP_FRAG_ORD }, + { GSN_LCP_FRAG_REP, printLCP_FRAG_REP }, + { GSN_LCP_COMPLETE_REP, printLCP_COMPLETE_REP }, + { GSN_START_LCP_REQ, printSTART_LCP_REQ }, + { GSN_START_LCP_CONF, printSTART_LCP_CONF }, + { GSN_MASTER_LCPREQ, printMASTER_LCP_REQ }, + { GSN_MASTER_LCPREF, printMASTER_LCP_REF }, + { GSN_MASTER_LCPCONF, printMASTER_LCP_CONF }, + { GSN_COPY_GCIREQ, printCOPY_GCI_REQ }, + { GSN_SYSTEM_ERROR, printSYSTEM_ERROR }, + { GSN_START_RECREQ, printSTART_REC_REQ }, + { GSN_START_RECCONF, printSTART_REC_CONF }, + { GSN_NF_COMPLETEREP, printNF_COMPLETE_REP }, + { GSN_SIGNAL_DROPPED_REP, printSIGNAL_DROPPED_REP }, + { GSN_FAIL_REP, printFAIL_REP }, + { GSN_DISCONNECT_REP, printDISCONNECT_REP }, + + { GSN_SUB_CREATE_REQ, printSUB_CREATE_REQ }, + { GSN_SUB_CREATE_REF, printSUB_CREATE_REF }, + { GSN_SUB_CREATE_CONF, printSUB_CREATE_CONF }, + { GSN_SUB_REMOVE_REQ, printSUB_REMOVE_REQ }, + { GSN_SUB_REMOVE_REF, printSUB_REMOVE_REF }, + { GSN_SUB_REMOVE_CONF, printSUB_REMOVE_CONF }, + { GSN_SUB_START_REQ, printSUB_START_REQ }, + { GSN_SUB_START_REF, printSUB_START_REF }, + { GSN_SUB_START_CONF, printSUB_START_CONF }, + { GSN_SUB_STOP_REQ, printSUB_STOP_REQ }, + { GSN_SUB_STOP_REF, printSUB_STOP_REF }, + { GSN_SUB_STOP_CONF, printSUB_STOP_CONF }, + { GSN_SUB_SYNC_REQ, printSUB_SYNC_REQ }, + { GSN_SUB_SYNC_REF, printSUB_SYNC_REF }, + { GSN_SUB_SYNC_CONF, printSUB_SYNC_CONF }, + { GSN_SUB_META_DATA, printSUB_META_DATA }, + { GSN_SUB_TABLE_DATA, printSUB_TABLE_DATA }, + { GSN_SUB_SYNC_CONTINUE_REQ, printSUB_SYNC_CONTINUE_REQ }, + { GSN_SUB_SYNC_CONTINUE_REF, printSUB_SYNC_CONTINUE_REF }, + { GSN_SUB_SYNC_CONTINUE_CONF, printSUB_SYNC_CONTINUE_CONF }, + { GSN_SUB_GCP_COMPLETE_REP, printSUB_GCP_COMPLETE_REP } + + ,{ GSN_CREATE_FRAGMENTATION_REQ, printCREATE_FRAGMENTATION_REQ } + ,{ GSN_CREATE_FRAGMENTATION_REF, printCREATE_FRAGMENTATION_REF } + ,{ GSN_CREATE_FRAGMENTATION_CONF, printCREATE_FRAGMENTATION_CONF } + + ,{ GSN_UTIL_CREATE_LOCK_REQ, printUTIL_CREATE_LOCK_REQ } + ,{ GSN_UTIL_CREATE_LOCK_REF, printUTIL_CREATE_LOCK_REF } + ,{ GSN_UTIL_CREATE_LOCK_CONF, printUTIL_CREATE_LOCK_CONF } + ,{ GSN_UTIL_DESTROY_LOCK_REQ, printUTIL_DESTROY_LOCK_REQ } + ,{ GSN_UTIL_DESTROY_LOCK_REF, printUTIL_DESTROY_LOCK_REF } + ,{ GSN_UTIL_DESTROY_LOCK_CONF, printUTIL_DESTROY_LOCK_CONF } + ,{ GSN_UTIL_LOCK_REQ, printUTIL_LOCK_REQ } + ,{ GSN_UTIL_LOCK_REF, printUTIL_LOCK_REF } + ,{ GSN_UTIL_LOCK_CONF, printUTIL_LOCK_CONF } + ,{ GSN_UTIL_UNLOCK_REQ, printUTIL_UNLOCK_REQ } + ,{ GSN_UTIL_UNLOCK_REF, printUTIL_UNLOCK_REF } + ,{ GSN_UTIL_UNLOCK_CONF, printUTIL_UNLOCK_CONF } + ,{ GSN_CNTR_START_REQ, printCNTR_START_REQ } + ,{ GSN_CNTR_START_REF, printCNTR_START_REF } + ,{ GSN_CNTR_START_CONF, printCNTR_START_CONF } + + ,{ GSN_READ_NODESCONF, printREAD_NODES_CONF } + + ,{ GSN_TUX_MAINT_REQ, printTUX_MAINT_REQ } + ,{ GSN_ACC_LOCKREQ, printACC_LOCKREQ } + ,{ GSN_LQH_TRANSCONF, printLQH_TRANSCONF } + ,{ GSN_SCAN_FRAGREQ, printSCAN_FRAGREQ } + ,{ 0, 0 } +}; + +#include <Bitmask.hpp> + +template struct BitmaskPOD<1>; +template struct BitmaskPOD<2>; +template struct BitmaskPOD<4>; +template class Bitmask<1>; +template class Bitmask<2>; +template class Bitmask<4>; diff --git a/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp b/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp new file mode 100644 index 00000000000..be31b4edb22 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp @@ -0,0 +1,34 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <DebuggerNames.hpp> +#include <signaldata/SignalDroppedRep.hpp> + +bool +printSIGNAL_DROPPED_REP(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + SignalDroppedRep * sig = (SignalDroppedRep*)theData; + + fprintf(output, " originalGsn: %s(%d) Length: %d SectionCount: %d\n", + getSignalName(sig->originalGsn), + sig->originalGsn, + sig->originalLength, + sig->originalSectionCount); + return false; +} diff --git a/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp new file mode 100644 index 00000000000..984d28819c0 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp @@ -0,0 +1,652 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "GlobalSignalNumbers.h" + +const GsnName SignalNames [] = { + { GSN_API_REGCONF, "API_REGCONF" } + ,{ GSN_API_REGREF, "API_REGREF" } + ,{ GSN_API_REGREQ, "API_REGREQ" } + ,{ GSN_ATTRINFO, "ATTRINFO" } + ,{ GSN_SCHEMA_INFO, "SCHEMA_INFO" } + ,{ GSN_SCHEMA_INFOCONF, "SCHEMA_INFOCONF" } + ,{ GSN_GET_SCHEMA_INFOREQ, "GET_SCHEMA_INFOREQ" } + ,{ GSN_DIHNDBTAMPER, "DIHNDBTAMPER" } + ,{ GSN_KEYINFO, "KEYINFO" } + ,{ GSN_KEYINFO20, "KEYINFO20" } + ,{ GSN_KEYINFO20_R, "KEYINFO20_R" } + ,{ GSN_NODE_FAILREP, "NODE_FAILREP" } + ,{ GSN_READCONF, "READCONF" } + ,{ GSN_SCAN_NEXTREQ, "SCAN_NEXTREQ" } + ,{ GSN_SCAN_TABCONF, "SCAN_TABCONF" } + ,{ GSN_SCAN_TABREF, "SCAN_TABREF" } + ,{ GSN_SCAN_TABREQ, "SCAN_TABREQ" } + ,{ GSN_TC_COMMITCONF, "TC_COMMITCONF" } + ,{ GSN_TC_COMMITREF, "TC_COMMITREF" } + ,{ GSN_TC_COMMITREQ, "TC_COMMITREQ" } + ,{ GSN_TCKEY_FAILCONF, "TCKEY_FAILCONF" } + ,{ GSN_TCKEY_FAILREF, "TCKEY_FAILREF" } + ,{ GSN_TCKEYCONF, "TCKEYCONF" } + ,{ GSN_TCKEYREF, "TCKEYREF" } + ,{ GSN_TCKEYREQ, "TCKEYREQ" } + ,{ GSN_TCRELEASECONF, "TCRELEASECONF" } + ,{ GSN_TCRELEASEREF, "TCRELEASEREF" } + ,{ GSN_TCRELEASEREQ, "TCRELEASEREQ" } + ,{ GSN_TCROLLBACKCONF, "TCROLLBACKCONF" } + ,{ GSN_TCROLLBACKREF, "TCROLLBACKREF" } + ,{ GSN_TCROLLBACKREQ, "TCROLLBACKREQ" } + ,{ GSN_TCROLLBACKREP, "TCROLLBACKREP" } + ,{ GSN_TCSEIZECONF, "TCSEIZECONF" } + ,{ GSN_TCSEIZEREF, "TCSEIZEREF" } + ,{ GSN_TCSEIZEREQ, "TCSEIZEREQ" } + ,{ GSN_TRANSID_AI, "TRANSID_AI" } + ,{ GSN_TRANSID_AI_R, "TRANSID_AI_R" } + ,{ GSN_ABORT, "ABORT" } + ,{ GSN_ABORTCONF, "ABORTCONF" } + ,{ GSN_ABORTED, "ABORTED" } + ,{ GSN_ABORTREQ, "ABORTREQ" } + ,{ GSN_ACC_ABORTCONF, "ACC_ABORTCONF" } + ,{ GSN_ACC_ABORTREQ, "ACC_ABORTREQ" } + ,{ GSN_ACC_CHECK_SCAN, "ACC_CHECK_SCAN" } + ,{ GSN_ACC_COMMITCONF, "ACC_COMMITCONF" } + ,{ GSN_ACC_COMMITREQ, "ACC_COMMITREQ" } + ,{ GSN_ACC_CONTOPCONF, "ACC_CONTOPCONF" } + ,{ GSN_ACC_CONTOPREQ, "ACC_CONTOPREQ" } + ,{ GSN_ACC_LCPCONF, "ACC_LCPCONF" } + ,{ GSN_ACC_LCPREF, "ACC_LCPREF" } + ,{ GSN_ACC_LCPREQ, "ACC_LCPREQ" } + ,{ GSN_ACC_LCPSTARTED, "ACC_LCPSTARTED" } + ,{ GSN_ACC_OVER_REC, "ACC_OVER_REC" } + ,{ GSN_ACC_SAVE_PAGES, "ACC_SAVE_PAGES" } + ,{ GSN_ACC_SCAN_INFO, "ACC_SCAN_INFO" } + ,{ GSN_ACC_SCAN_INFO24, "ACC_SCAN_INFO24" } + ,{ GSN_ACC_SCANCONF, "ACC_SCANCONF" } + ,{ GSN_ACC_SCANREF, "ACC_SCANREF" } + ,{ GSN_ACC_SCANREQ, "ACC_SCANREQ" } + ,{ GSN_ACC_SRCONF, "ACC_SRCONF" } + ,{ GSN_ACC_SRREF, "ACC_SRREF" } + ,{ GSN_ACC_SRREQ, "ACC_SRREQ" } + ,{ GSN_ACC_TO_CONF, "ACC_TO_CONF" } + ,{ GSN_ACC_TO_REF, "ACC_TO_REF" } + ,{ GSN_ACC_TO_REQ, "ACC_TO_REQ" } + ,{ GSN_ACCFRAGCONF, "ACCFRAGCONF" } + ,{ GSN_ACCFRAGREF, "ACCFRAGREF" } + ,{ GSN_ACCFRAGREQ, "ACCFRAGREQ" } + ,{ GSN_ACCKEYCONF, "ACCKEYCONF" } + ,{ GSN_ACCKEYREF, "ACCKEYREF" } + ,{ GSN_ACCKEYREQ, "ACCKEYREQ" } + ,{ GSN_ACCMINUPDATE, "ACCMINUPDATE" } + ,{ GSN_ACCSEIZECONF, "ACCSEIZECONF" } + ,{ GSN_ACCSEIZEREF, "ACCSEIZEREF" } + ,{ GSN_ACCSEIZEREQ, "ACCSEIZEREQ" } + ,{ GSN_ACCUPDATECONF, "ACCUPDATECONF" } + ,{ GSN_ACCUPDATEKEY, "ACCUPDATEKEY" } + ,{ GSN_ACCUPDATEREF, "ACCUPDATEREF" } + ,{ GSN_ADD_FRAGCONF, "ADD_FRAGCONF" } + ,{ GSN_ADD_FRAGREF, "ADD_FRAGREF" } + ,{ GSN_ADD_FRAGREQ, "ADD_FRAGREQ" } + ,{ GSN_API_FAILCONF, "API_FAILCONF" } + ,{ GSN_API_FAILREQ, "API_FAILREQ" } + ,{ GSN_CHECK_LCP_STOP, "CHECK_LCP_STOP" } + ,{ GSN_CLOSE_COMCONF, "CLOSE_COMCONF" } + ,{ GSN_CLOSE_COMREQ, "CLOSE_COMREQ" } + ,{ GSN_CM_ACKADD, "CM_ACKADD" } + ,{ GSN_CM_ADD, "CM_ADD" } + ,{ GSN_CM_ADD_REP, "CM_ADD_REP" } + ,{ GSN_CM_HEARTBEAT, "CM_HEARTBEAT" } + ,{ GSN_CM_NODEINFOCONF, "CM_NODEINFOCONF" } + ,{ GSN_CM_NODEINFOREF, "CM_NODEINFOREF" } + ,{ GSN_CM_NODEINFOREQ, "CM_NODEINFOREQ" } + ,{ GSN_CM_REGCONF, "CM_REGCONF" } + ,{ GSN_CM_REGREF, "CM_REGREF" } + ,{ GSN_CM_REGREQ, "CM_REGREQ" } + ,{ GSN_CNTR_START_REQ, "CNTR_START_REQ" } + ,{ GSN_CNTR_START_REF, "CNTR_START_REF" } + ,{ GSN_CNTR_START_CONF, "CNTR_START_CONF" } + ,{ GSN_CNTR_START_REP, "CNTR_START_REP" } + ,{ GSN_CNTR_WAITREP, "CNTR_WAITREP" } + ,{ GSN_COMMIT, "COMMIT" } + ,{ GSN_COMMIT_FAILCONF, "COMMIT_FAILCONF" } + ,{ GSN_COMMIT_FAILREQ, "COMMIT_FAILREQ" } + ,{ GSN_COMMITCONF, "COMMITCONF" } + ,{ GSN_COMMITREQ, "COMMITREQ" } + ,{ GSN_COMMITTED, "COMMITTED" } + ,{ GSN_LCP_FRAG_ORD, "LCP_FRAG_ORD" } + ,{ GSN_LCP_FRAG_REP, "LCP_FRAG_REP" } + ,{ GSN_LCP_COMPLETE_REP, "LCP_COMPLETE_REP" } + ,{ GSN_START_LCP_REQ, "START_LCP_REQ" } + ,{ GSN_START_LCP_CONF, "START_LCP_CONF" } + ,{ GSN_COMPLETE, "COMPLETE" } + ,{ GSN_COMPLETECONF, "COMPLETECONF" } + ,{ GSN_COMPLETED, "COMPLETED" } + ,{ GSN_COMPLETEREQ, "COMPLETEREQ" } + ,{ GSN_CONNECT_REP, "CONNECT_REP" } + ,{ GSN_CONTINUEB, "CONTINUEB" } + ,{ GSN_COPY_ACTIVECONF, "COPY_ACTIVECONF" } + ,{ GSN_COPY_ACTIVEREF, "COPY_ACTIVEREF" } + ,{ GSN_COPY_ACTIVEREQ, "COPY_ACTIVEREQ" } + ,{ GSN_COPY_FRAGCONF, "COPY_FRAGCONF" } + ,{ GSN_COPY_FRAGREF, "COPY_FRAGREF" } + ,{ GSN_COPY_FRAGREQ, "COPY_FRAGREQ" } + ,{ GSN_COPY_GCICONF, "COPY_GCICONF" } + ,{ GSN_COPY_GCIREQ, "COPY_GCIREQ" } + ,{ GSN_COPY_STATECONF, "COPY_STATECONF" } + ,{ GSN_COPY_STATEREQ, "COPY_STATEREQ" } + ,{ GSN_COPY_TABCONF, "COPY_TABCONF" } + ,{ GSN_COPY_TABREQ, "COPY_TABREQ" } + ,{ GSN_CREATE_FRAGCONF, "CREATE_FRAGCONF" } + ,{ GSN_CREATE_FRAGREF, "CREATE_FRAGREF" } + ,{ GSN_CREATE_FRAGREQ, "CREATE_FRAGREQ" } + ,{ GSN_DEBUG_SIG, "DEBUG_SIG" } + ,{ GSN_DI_FCOUNTCONF, "DI_FCOUNTCONF" } + ,{ GSN_DI_FCOUNTREF, "DI_FCOUNTREF" } + ,{ GSN_DI_FCOUNTREQ, "DI_FCOUNTREQ" } + ,{ GSN_DIADDTABCONF, "DIADDTABCONF" } + ,{ GSN_DIADDTABREF, "DIADDTABREF" } + ,{ GSN_DIADDTABREQ, "DIADDTABREQ" } + ,{ GSN_DICTSTARTCONF, "DICTSTARTCONF" } + ,{ GSN_DICTSTARTREQ, "DICTSTARTREQ" } + ,{ GSN_LIST_TABLES_REQ, "LIST_TABLES_REQ" } + ,{ GSN_LIST_TABLES_CONF, "LIST_TABLES_CONF" } + ,{ GSN_DIGETNODESCONF, "DIGETNODESCONF" } + ,{ GSN_DIGETNODESREF, "DIGETNODESREF" } + ,{ GSN_DIGETNODESREQ, "DIGETNODESREQ" } + ,{ GSN_DIGETPRIMCONF, "DIGETPRIMCONF" } + ,{ GSN_DIGETPRIMREF, "DIGETPRIMREF" } + ,{ GSN_DIGETPRIMREQ, "DIGETPRIMREQ" } + ,{ GSN_DIH_RESTARTCONF, "DIH_RESTARTCONF" } + ,{ GSN_DIH_RESTARTREF, "DIH_RESTARTREF" } + ,{ GSN_DIH_RESTARTREQ, "DIH_RESTARTREQ" } + + ,{ GSN_DIRELEASECONF, "DIRELEASECONF" } + ,{ GSN_DIRELEASEREF, "DIRELEASEREF" } + ,{ GSN_DIRELEASEREQ, "DIRELEASEREQ" } + ,{ GSN_DISCONNECT_REP, "DISCONNECT_REP" } + ,{ GSN_DISEIZECONF, "DISEIZECONF" } + ,{ GSN_DISEIZEREF, "DISEIZEREF" } + ,{ GSN_DISEIZEREQ, "DISEIZEREQ" } + ,{ GSN_DIVERIFYCONF, "DIVERIFYCONF" } + ,{ GSN_DIVERIFYREF, "DIVERIFYREF" } + ,{ GSN_DIVERIFYREQ, "DIVERIFYREQ" } + ,{ GSN_EMPTY_LCP_REQ, "EMPTY_LCP_REQ" } + ,{ GSN_EMPTY_LCP_CONF, "EMPTY_LCP_CONF" } + ,{ GSN_ENABLE_COMORD, "ENABLE_COMORD" } + ,{ GSN_END_LCPCONF, "END_LCPCONF" } + ,{ GSN_END_LCPREQ, "END_LCPREQ" } + ,{ GSN_END_TOCONF, "END_TOCONF" } + ,{ GSN_END_TOREQ, "END_TOREQ" } + ,{ GSN_EVENT_REP, "EVENT_REP" } + ,{ GSN_EXEC_FRAGCONF, "EXEC_FRAGCONF" } + ,{ GSN_EXEC_FRAGREF, "EXEC_FRAGREF" } + ,{ GSN_EXEC_FRAGREQ, "EXEC_FRAGREQ" } + ,{ GSN_EXEC_SRCONF, "EXEC_SRCONF" } + ,{ GSN_EXEC_SRREQ, "EXEC_SRREQ" } + ,{ GSN_EXPANDCHECK2, "EXPANDCHECK2" } + ,{ GSN_FAIL_REP, "FAIL_REP" } + ,{ GSN_FSCLOSECONF, "FSCLOSECONF" } + ,{ GSN_FSCLOSEREF, "FSCLOSEREF" } + ,{ GSN_FSCLOSEREQ, "FSCLOSEREQ" } + ,{ GSN_FSOPENCONF, "FSOPENCONF" } + ,{ GSN_FSOPENREF, "FSOPENREF" } + ,{ GSN_FSOPENREQ, "FSOPENREQ" } + ,{ GSN_FSREADCONF, "FSREADCONF" } + ,{ GSN_FSREADREF, "FSREADREF" } + ,{ GSN_FSREADREQ, "FSREADREQ" } + ,{ GSN_FSSYNCCONF, "FSSYNCCONF" } + ,{ GSN_FSSYNCREF, "FSSYNCREF" } + ,{ GSN_FSSYNCREQ, "FSSYNCREQ" } + ,{ GSN_FSWRITECONF, "FSWRITECONF" } + ,{ GSN_FSWRITEREF, "FSWRITEREF" } + ,{ GSN_FSWRITEREQ, "FSWRITEREQ" } + ,{ GSN_FSAPPENDCONF, "FSAPPENDCONF" } + ,{ GSN_FSAPPENDREF, "FSAPPENDREF" } + ,{ GSN_FSAPPENDREQ, "FSAPPENDREQ" } + ,{ GSN_FSREMOVECONF, "FSREMOVECONF" } + ,{ GSN_FSREMOVEREF, "FSREMOVEREF" } + ,{ GSN_FSREMOVEREQ, "FSREMOVEREQ" } + ,{ GSN_GCP_ABORT, "GCP_ABORT" } + ,{ GSN_GCP_ABORTED, "GCP_ABORTED" } + ,{ GSN_GCP_COMMIT, "GCP_COMMIT" } + ,{ GSN_GCP_NODEFINISH, "GCP_NODEFINISH" } + ,{ GSN_GCP_NOMORETRANS, "GCP_NOMORETRANS" } + ,{ GSN_GCP_PREPARE, "GCP_PREPARE" } + ,{ GSN_GCP_PREPARECONF, "GCP_PREPARECONF" } + ,{ GSN_GCP_PREPAREREF, "GCP_PREPAREREF" } + ,{ GSN_GCP_SAVECONF, "GCP_SAVECONF" } + ,{ GSN_GCP_SAVEREF, "GCP_SAVEREF" } + ,{ GSN_GCP_SAVEREQ, "GCP_SAVEREQ" } + ,{ GSN_GCP_TCFINISHED, "GCP_TCFINISHED" } + ,{ GSN_GET_TABINFOREF, "GET_TABINFOREF" } + ,{ GSN_GET_TABINFOREQ, "GET_TABINFOREQ" } + ,{ GSN_GET_TABINFO_CONF, "GET_TABINFO_CONF" } + ,{ GSN_GETGCICONF, "GETGCICONF" } + ,{ GSN_GETGCIREQ, "GETGCIREQ" } + ,{ GSN_HOT_SPAREREP, "HOT_SPAREREP" } + ,{ GSN_INCL_NODECONF, "INCL_NODECONF" } + ,{ GSN_INCL_NODEREF, "INCL_NODEREF" } + ,{ GSN_INCL_NODEREQ, "INCL_NODEREQ" } + ,{ GSN_LCP_FRAGIDCONF, "LCP_FRAGIDCONF" } + ,{ GSN_LCP_FRAGIDREF, "LCP_FRAGIDREF" } + ,{ GSN_LCP_FRAGIDREQ, "LCP_FRAGIDREQ" } + ,{ GSN_LCP_HOLDOPCONF, "LCP_HOLDOPCONF" } + ,{ GSN_LCP_HOLDOPREF, "LCP_HOLDOPREF" } + ,{ GSN_LCP_HOLDOPREQ, "LCP_HOLDOPREQ" } + ,{ GSN_LQH_RESTART_OP, "LQH_RESTART_OP" } + ,{ GSN_LQH_TRANSCONF, "LQH_TRANSCONF" } + ,{ GSN_LQH_TRANSREQ, "LQH_TRANSREQ" } + ,{ GSN_LQHADDATTCONF, "LQHADDATTCONF" } + ,{ GSN_LQHADDATTREF, "LQHADDATTREF" } + ,{ GSN_LQHADDATTREQ, "LQHADDATTREQ" } + ,{ GSN_LQHFRAGCONF, "LQHFRAGCONF" } + ,{ GSN_LQHFRAGREF, "LQHFRAGREF" } + ,{ GSN_LQHFRAGREQ, "LQHFRAGREQ" } + ,{ GSN_LQHKEYCONF, "LQHKEYCONF" } + ,{ GSN_LQHKEYREF, "LQHKEYREF" } + ,{ GSN_LQHKEYREQ, "LQHKEYREQ" } + ,{ GSN_MASTER_GCPCONF, "MASTER_GCPCONF" } + ,{ GSN_MASTER_GCPREF, "MASTER_GCPREF" } + ,{ GSN_MASTER_GCPREQ, "MASTER_GCPREQ" } + ,{ GSN_MASTER_LCPCONF, "MASTER_LCPCONF" } + ,{ GSN_MASTER_LCPREF, "MASTER_LCPREF" } + ,{ GSN_MASTER_LCPREQ, "MASTER_LCPREQ" } + ,{ GSN_MEMCHECKCONF, "MEMCHECKCONF" } + ,{ GSN_MEMCHECKREQ, "MEMCHECKREQ" } + ,{ GSN_NDB_FAILCONF, "NDB_FAILCONF" } + ,{ GSN_NDB_STARTCONF, "NDB_STARTCONF" } + ,{ GSN_NDB_STARTREF, "NDB_STARTREF" } + ,{ GSN_NDB_STARTREQ, "NDB_STARTREQ" } + ,{ GSN_NDB_STTOR, "NDB_STTOR" } + ,{ GSN_NDB_STTORRY, "NDB_STTORRY" } + ,{ GSN_NDB_TAMPER, "NDB_TAMPER" } + ,{ GSN_NEXT_SCANCONF, "NEXT_SCANCONF" } + ,{ GSN_NEXT_SCANREF, "NEXT_SCANREF" } + ,{ GSN_NEXT_SCANREQ, "NEXT_SCANREQ" } + ,{ GSN_NEXTOPERATION, "NEXTOPERATION" } + ,{ GSN_NF_COMPLETEREP, "NF_COMPLETEREP" } + ,{ GSN_OPEN_COMCONF, "OPEN_COMCONF" } + ,{ GSN_OPEN_COMREF, "OPEN_COMREF" } + ,{ GSN_OPEN_COMREQ, "OPEN_COMREQ" } + ,{ GSN_PACKED_SIGNAL, "PACKED_SIGNAL" } + ,{ GSN_PREP_FAILCONF, "PREP_FAILCONF" } + ,{ GSN_PREP_FAILREF, "PREP_FAILREF" } + ,{ GSN_PREP_FAILREQ, "PREP_FAILREQ" } + ,{ GSN_PRES_TOCONF, "PRES_TOCONF" } + ,{ GSN_PRES_TOREQ, "PRES_TOREQ" } + ,{ GSN_READ_NODESCONF, "READ_NODESCONF" } + ,{ GSN_READ_NODESREF, "READ_NODESREF" } + ,{ GSN_READ_NODESREQ, "READ_NODESREQ" } + ,{ GSN_SCAN_FRAGCONF, "SCAN_FRAGCONF" } + ,{ GSN_SCAN_FRAGREF, "SCAN_FRAGREF" } + ,{ GSN_SCAN_FRAGREQ, "SCAN_FRAGREQ" } + ,{ GSN_SCAN_HBREP, "SCAN_HBREP" } + ,{ GSN_SCAN_PROCCONF, "SCAN_PROCCONF" } + ,{ GSN_SCAN_PROCREQ, "SCAN_PROCREQ" } + ,{ GSN_SEND_PACKED, "SEND_PACKED" } + ,{ GSN_SET_LOGLEVELORD, "SET_LOGLEVELORD" } + ,{ GSN_SHRINKCHECK2, "SHRINKCHECK2" } + ,{ GSN_READ_CONFIG_REQ, "READ_CONFIG_REQ" } + ,{ GSN_READ_CONFIG_CONF, "READ_CONFIG_CONF" } + ,{ GSN_SR_FRAGIDCONF, "SR_FRAGIDCONF" } + ,{ GSN_SR_FRAGIDREF, "SR_FRAGIDREF" } + ,{ GSN_SR_FRAGIDREQ, "SR_FRAGIDREQ" } + ,{ GSN_START_COPYCONF, "START_COPYCONF" } + ,{ GSN_START_COPYREF, "START_COPYREF" } + ,{ GSN_START_COPYREQ, "START_COPYREQ" } + ,{ GSN_START_EXEC_SR, "START_EXEC_SR" } + ,{ GSN_START_FRAGCONF, "START_FRAGCONF" } + ,{ GSN_START_FRAGREF, "START_FRAGREF" } + ,{ GSN_START_FRAGREQ, "START_FRAGREQ" } + ,{ GSN_START_LCP_REF, "START_LCP_REF" } + ,{ GSN_START_LCP_ROUND, "START_LCP_ROUND" } + ,{ GSN_START_MECONF, "START_MECONF" } + ,{ GSN_START_MEREF, "START_MEREF" } + ,{ GSN_START_MEREQ, "START_MEREQ" } + ,{ GSN_START_PERMCONF, "START_PERMCONF" } + ,{ GSN_START_PERMREF, "START_PERMREF" } + ,{ GSN_START_PERMREQ, "START_PERMREQ" } + ,{ GSN_START_RECCONF, "START_RECCONF" } + ,{ GSN_START_RECREF, "START_RECREF" } + ,{ GSN_START_RECREQ, "START_RECREQ" } + ,{ GSN_START_TOCONF, "START_TOCONF" } + ,{ GSN_START_TOREQ, "START_TOREQ" } + ,{ GSN_STORED_PROCCONF, "STORED_PROCCONF" } + ,{ GSN_STORED_PROCREF, "STORED_PROCREF" } + ,{ GSN_STORED_PROCREQ, "STORED_PROCREQ" } + ,{ GSN_STTOR, "STTOR" } + ,{ GSN_STTORRY, "STTORRY" } + ,{ GSN_SYSTEM_ERROR, "SYSTEM_ERROR" } + ,{ GSN_TAB_COMMITCONF, "TAB_COMMITCONF" } + ,{ GSN_TAB_COMMITREF, "TAB_COMMITREF" } + ,{ GSN_TAB_COMMITREQ, "TAB_COMMITREQ" } + ,{ GSN_TAKE_OVERTCCONF, "TAKE_OVERTCCONF" } + ,{ GSN_TAKE_OVERTCREQ, "TAKE_OVERTCREQ" } + ,{ GSN_TC_CLOPSIZECONF, "TC_CLOPSIZECONF" } + ,{ GSN_TC_CLOPSIZEREQ, "TC_CLOPSIZEREQ" } + ,{ GSN_TC_SCHVERCONF, "TC_SCHVERCONF" } + ,{ GSN_TC_SCHVERREQ, "TC_SCHVERREQ" } + ,{ GSN_TCGETOPSIZECONF, "TCGETOPSIZECONF" } + ,{ GSN_TCGETOPSIZEREQ, "TCGETOPSIZEREQ" } + ,{ GSN_TEST_ORD, "TEST_ORD" } + ,{ GSN_TESTSIG, "TESTSIG" } + ,{ GSN_TIME_SIGNAL, "TIME_SIGNAL" } + ,{ GSN_TUP_ABORTREQ, "TUP_ABORTREQ" } + ,{ GSN_TUP_ADD_ATTCONF, "TUP_ADD_ATTCONF" } + ,{ GSN_TUP_ADD_ATTRREF, "TUP_ADD_ATTRREF" } + ,{ GSN_TUP_ADD_ATTRREQ, "TUP_ADD_ATTRREQ" } + ,{ GSN_TUP_ATTRINFO, "TUP_ATTRINFO" } + ,{ GSN_TUP_COMMITREQ, "TUP_COMMITREQ" } + ,{ GSN_TUP_LCPCONF, "TUP_LCPCONF" } + ,{ GSN_TUP_LCPREF, "TUP_LCPREF" } + ,{ GSN_TUP_LCPREQ, "TUP_LCPREQ" } + ,{ GSN_TUP_LCPSTARTED, "TUP_LCPSTARTED" } + ,{ GSN_TUP_PREPLCPCONF, "TUP_PREPLCPCONF" } + ,{ GSN_TUP_PREPLCPREF, "TUP_PREPLCPREF" } + ,{ GSN_TUP_PREPLCPREQ, "TUP_PREPLCPREQ" } + ,{ GSN_TUP_SRCONF, "TUP_SRCONF" } + ,{ GSN_TUP_SRREF, "TUP_SRREF" } + ,{ GSN_TUP_SRREQ, "TUP_SRREQ" } + ,{ GSN_TUPFRAGCONF, "TUPFRAGCONF" } + ,{ GSN_TUPFRAGREF, "TUPFRAGREF" } + ,{ GSN_TUPFRAGREQ, "TUPFRAGREQ" } + ,{ GSN_TUPKEYCONF, "TUPKEYCONF" } + ,{ GSN_TUPKEYREF, "TUPKEYREF" } + ,{ GSN_TUPKEYREQ, "TUPKEYREQ" } + ,{ GSN_TUPRELEASECONF, "TUPRELEASECONF" } + ,{ GSN_TUPRELEASEREF, "TUPRELEASEREF" } + ,{ GSN_TUPRELEASEREQ, "TUPRELEASEREQ" } + ,{ GSN_TUPSEIZECONF, "TUPSEIZECONF" } + ,{ GSN_TUPSEIZEREF, "TUPSEIZEREF" } + ,{ GSN_TUPSEIZEREQ, "TUPSEIZEREQ" } + ,{ GSN_UNBLO_DICTCONF, "UNBLO_DICTCONF" } + ,{ GSN_UNBLO_DICTREQ, "UNBLO_DICTREQ" } + ,{ GSN_UPDATE_TOCONF, "UPDATE_TOCONF" } + ,{ GSN_UPDATE_TOREF, "UPDATE_TOREF" } + ,{ GSN_UPDATE_TOREQ, "UPDATE_TOREQ" } + ,{ GSN_TUP_ALLOCREQ, "TUP_ALLOCREQ" } + ,{ GSN_LQH_ALLOCREQ, "LQH_ALLOCREQ" } + ,{ GSN_TUP_DEALLOCREQ, "TUP_DEALLOCREQ" } + ,{ GSN_TUP_WRITELOG_REQ, "TUP_WRITELOG_REQ" } + ,{ GSN_LQH_WRITELOG_REQ, "LQH_WRITELOG_REQ" } + + ,{ GSN_STATISTICS_REQ, "STATISTICS_REQ" } + ,{ GSN_START_ORD, "START_ORD" } + ,{ GSN_STOP_ORD, "STOP_ORD" } + ,{ GSN_TAMPER_ORD, "TAMPER_ORD" } + ,{ GSN_SET_VAR_REQ, "SET_VAR_REQ" } + ,{ GSN_SET_VAR_CONF, "SET_VAR_CONF" } + ,{ GSN_SET_VAR_REF, "SET_VAR_REF" } + ,{ GSN_STATISTICS_CONF, "STATISTICS_CONF" } + + ,{ GSN_EVENT_SUBSCRIBE_REQ, "EVENT_SUBSCRIBE_REQ" } + ,{ GSN_EVENT_SUBSCRIBE_CONF, "EVENT_SUBSCRIBE_CONF" } + ,{ GSN_EVENT_SUBSCRIBE_REF, "EVENT_SUBSCRIBE_REF" } + ,{ GSN_ACC_COM_BLOCK, "ACC_COM_BLOCK" } + ,{ GSN_ACC_COM_UNBLOCK, "ACC_COM_UNBLOCK" } + ,{ GSN_TUP_COM_BLOCK, "TUP_COM_BLOCK" } + ,{ GSN_TUP_COM_UNBLOCK, "TUP_COM_UNBLOCK" } + ,{ GSN_DUMP_STATE_ORD, "DUMP_STATE_ORD" } + + ,{ GSN_START_INFOREQ, "START_INFOREQ" } + ,{ GSN_START_INFOREF, "START_INFOREF" } + ,{ GSN_START_INFOCONF, "START_INFOCONF" } + + ,{ GSN_CHECKNODEGROUPSREQ, "CHECKNODEGROUPSREQ" } + ,{ GSN_CHECKNODEGROUPSCONF, "CHECKNODEGROUPSCONF" } + + ,{ GSN_ARBIT_PREPREQ, "ARBIT_PREPREQ" } + ,{ GSN_ARBIT_PREPCONF, "ARBIT_PREPCONF" } + ,{ GSN_ARBIT_PREPREF, "ARBIT_PREPREF" } + ,{ GSN_ARBIT_STARTREQ, "ARBIT_STARTREQ" } + ,{ GSN_ARBIT_STARTCONF, "ARBIT_STARTCONF" } + ,{ GSN_ARBIT_STARTREF, "ARBIT_STARTREF" } + ,{ GSN_ARBIT_CHOOSEREQ, "ARBIT_CHOOSEREQ" } + ,{ GSN_ARBIT_CHOOSECONF, "ARBIT_CHOOSECONF" } + ,{ GSN_ARBIT_CHOOSEREF, "ARBIT_CHOOSEREF" } + ,{ GSN_ARBIT_STOPORD, "ARBIT_STOPORD" } + ,{ GSN_ARBIT_STOPREP, "ARBIT_STOPREP" } + + ,{ GSN_TC_COMMIT_ACK, "TC_COMMIT_ACK" } + ,{ GSN_REMOVE_MARKER_ORD, "REMOVE_MARKER_ORD" } + + ,{ GSN_NODE_STATE_REP, "NODE_STATE_REP" } + ,{ GSN_CHANGE_NODE_STATE_REQ, "CHANGE_NODE_STATE_REQ" } + ,{ GSN_CHANGE_NODE_STATE_CONF, "CHANGE_NODE_STATE_CONF" } + + ,{ GSN_BLOCK_COMMIT_ORD, "BLOCK_COMMIT_ORD" } + ,{ GSN_UNBLOCK_COMMIT_ORD, "UNBLOCK_COMMIT_ORD" } + + ,{ GSN_DIH_SWITCH_REPLICA_REQ, "DIH_SWITCH_REPLICA_REQ" } + ,{ GSN_DIH_SWITCH_REPLICA_REF, "DIH_SWITCH_REPLICA_REF" } + ,{ GSN_DIH_SWITCH_REPLICA_CONF, "DIH_SWITCH_REPLICA_CONF" } + + ,{ GSN_STOP_PERM_REQ, "STOP_PERM_REQ" } + ,{ GSN_STOP_PERM_REF, "STOP_PERM_REF" } + ,{ GSN_STOP_PERM_CONF, "STOP_PERM_CONF" } + + ,{ GSN_STOP_ME_REQ, "STOP_ME_REQ" } + ,{ GSN_STOP_ME_REF, "STOP_ME_REF" } + ,{ GSN_STOP_ME_CONF, "STOP_ME_CONF" } + + ,{ GSN_WAIT_GCP_REQ, "WAIT_GCP_REQ" } + ,{ GSN_WAIT_GCP_REF, "WAIT_GCP_REF" } + ,{ GSN_WAIT_GCP_CONF, "WAIT_GCP_CONF" } + + ,{ GSN_STOP_REQ, "STOP_REQ" } + ,{ GSN_STOP_REF, "STOP_REF" } + ,{ GSN_API_VERSION_REQ, "API_VERSION_REQ" } + ,{ GSN_API_VERSION_CONF, "API_VERSION_CONF" } + + ,{ GSN_ABORT_ALL_REQ, "ABORT_ALL_REQ" } + ,{ GSN_ABORT_ALL_REF, "ABORT_ALL_REF" } + ,{ GSN_ABORT_ALL_CONF, "ABORT_ALL_CONF" } + + ,{ GSN_DROP_TABLE_REQ, "DROP_TABLE_REQ" } + ,{ GSN_DROP_TABLE_REF, "DROP_TABLE_REF" } + ,{ GSN_DROP_TABLE_CONF, "DROP_TABLE_CONF" } + + ,{ GSN_DROP_TAB_REQ, "DROP_TAB_REQ" } + ,{ GSN_DROP_TAB_REF, "DROP_TAB_REF" } + ,{ GSN_DROP_TAB_CONF, "DROP_TAB_CONF" } + + ,{ GSN_PREP_DROP_TAB_REQ, "PREP_DROP_TAB_REQ" } + ,{ GSN_PREP_DROP_TAB_REF, "PREP_DROP_TAB_REF" } + ,{ GSN_PREP_DROP_TAB_CONF, "PREP_DROP_TAB_CONF" } + + ,{ GSN_WAIT_DROP_TAB_REQ, "WAIT_DROP_TAB_REQ" } + ,{ GSN_WAIT_DROP_TAB_REF, "WAIT_DROP_TAB_REF" } + ,{ GSN_WAIT_DROP_TAB_CONF, "WAIT_DROP_TAB_CONF" } + + ,{ GSN_CREATE_TRIG_REQ, "CREATE_TRIG_REQ" } + ,{ GSN_CREATE_TRIG_CONF, "CREATE_TRIG_CONF" } + ,{ GSN_CREATE_TRIG_REF, "CREATE_TRIG_REF" } + ,{ GSN_ALTER_TRIG_REQ, "ALTER_TRIG_REQ" } + ,{ GSN_ALTER_TRIG_CONF, "ALTER_TRIG_CONF" } + ,{ GSN_ALTER_TRIG_REF, "ALTER_TRIG_REF" } + ,{ GSN_DROP_TRIG_REQ, "DROP_TRIG_REQ" } + ,{ GSN_DROP_TRIG_CONF, "DROP_TRIG_CONF" } + ,{ GSN_DROP_TRIG_REF, "DROP_TRIG_REF" } + ,{ GSN_FIRE_TRIG_ORD, "FIRE_TRIG_ORD" } + ,{ GSN_TRIG_ATTRINFO, "TRIG_ATTRINFO" } + + ,{ GSN_CREATE_INDX_REQ, "CREATE_INDX_REQ" } + ,{ GSN_CREATE_INDX_CONF, "CREATE_INDX_CONF" } + ,{ GSN_CREATE_INDX_REF, "CREATE_INDX_REF" } + ,{ GSN_DROP_INDX_REQ, "DROP_INDX_REQ" } + ,{ GSN_DROP_INDX_CONF, "DROP_INDX_CONF" } + ,{ GSN_DROP_INDX_REF, "DROP_INDX_REF" } + ,{ GSN_ALTER_INDX_REQ, "ALTER_INDX_REQ" } + ,{ GSN_ALTER_INDX_CONF, "ALTER_INDX_CONF" } + ,{ GSN_ALTER_INDX_REF, "ALTER_INDX_REF" } + ,{ GSN_TCINDXREQ, "TCINDXREQ" } + ,{ GSN_TCINDXCONF, "TCINDXCONF" } + ,{ GSN_TCINDXREF, "TCINDXREF" } + ,{ GSN_INDXKEYINFO, "INDXKEYINFO" } + ,{ GSN_INDXATTRINFO, "INDXATTRINFO" } + ,{ GSN_BUILDINDXREQ, "BUILDINDXREQ" } + ,{ GSN_BUILDINDXCONF, "BUILDINDXCONF" } + ,{ GSN_BUILDINDXREF, "BUILDINDXREF" } + //,{ GSN_TCINDXNEXTREQ, "TCINDXNEXTREQ" } + //,{ GSN_TCINDEXNEXTCONF, "TCINDEXNEXTCONF" } + //,{ GSN_TCINDEXNEXREF, "TCINDEXNEXREF" } + + ,{ GSN_CREATE_EVNT_REQ, "CREATE_EVNT_REQ" } + ,{ GSN_CREATE_EVNT_CONF, "CREATE_EVNT_CONF" } + ,{ GSN_CREATE_EVNT_REF, "CREATE_EVNT_REF" } + + ,{ GSN_SUMA_START_ME, "SUMA_START_ME" } + ,{ GSN_SUMA_HANDOVER_REQ, "SUMA_HANDOVER_REQ"} + ,{ GSN_SUMA_HANDOVER_CONF, "SUMA_HANDOVER_CONF"} + + ,{ GSN_DROP_EVNT_REQ, "DROP_EVNT_REQ" } + ,{ GSN_DROP_EVNT_CONF, "DROP_EVNT_CONF" } + ,{ GSN_DROP_EVNT_REF, "DROP_EVNT_REF" } + + ,{ GSN_BACKUP_TRIG_REQ, "BACKUP_TRIG_REQ" } + ,{ GSN_BACKUP_REQ, "BACKUP_REQ" } + ,{ GSN_BACKUP_DATA, "BACKUP_DATA" } + ,{ GSN_BACKUP_REF, "BACKUP_REF" } + ,{ GSN_BACKUP_CONF, "BACKUP_CONF" } + ,{ GSN_ABORT_BACKUP_ORD, "ABORT_BACKUP_ORD" } + ,{ GSN_BACKUP_ABORT_REP, "BACKUP_ABORT_REP" } + ,{ GSN_BACKUP_COMPLETE_REP, "BACKUP_COMPLETE_REP" } + ,{ GSN_BACKUP_NF_COMPLETE_REP, "BACKUP_NF_COMPLETE_REP" } + ,{ GSN_DEFINE_BACKUP_REQ, "DEFINE_BACKUP_REQ" } + ,{ GSN_DEFINE_BACKUP_REF, "DEFINE_BACKUP_REF" } + ,{ GSN_DEFINE_BACKUP_CONF, "DEFINE_BACKUP_CONF" } + ,{ GSN_START_BACKUP_REQ, "START_BACKUP_REQ" } + ,{ GSN_START_BACKUP_REF, "START_BACKUP_REF" } + ,{ GSN_START_BACKUP_CONF, "START_BACKUP_CONF" } + ,{ GSN_BACKUP_FRAGMENT_REQ, "BACKUP_FRAGMENT_REQ" } + ,{ GSN_BACKUP_FRAGMENT_REF, "BACKUP_FRAGMENT_REF" } + ,{ GSN_BACKUP_FRAGMENT_CONF, "BACKUP_FRAGMENT_CONF" } + ,{ GSN_STOP_BACKUP_REQ, "STOP_BACKUP_REQ" } + ,{ GSN_STOP_BACKUP_REF, "STOP_BACKUP_REF" } + ,{ GSN_STOP_BACKUP_CONF, "STOP_BACKUP_CONF" } + ,{ GSN_BACKUP_STATUS_REQ, "BACKUP_STATUS_REQ" } + ,{ GSN_BACKUP_STATUS_REF, "BACKUP_STATUS_REF" } + ,{ GSN_BACKUP_STATUS_CONF, "BACKUP_STATUS_CONF" } + ,{ GSN_SIGNAL_DROPPED_REP, "SIGNAL_DROPPED_REP" } + ,{ GSN_CONTINUE_FRAGMENTED, "CONTINUE_FRAGMENTED" } + + /** Util Block Services **/ + ,{ GSN_UTIL_SEQUENCE_REQ, "UTIL_SEQUENCE_REQ" } + ,{ GSN_UTIL_SEQUENCE_REF, "UTIL_SEQUENCE_REF" } + ,{ GSN_UTIL_SEQUENCE_CONF, "UTIL_SEQUENCE_CONF" } + ,{ GSN_UTIL_PREPARE_REQ, "UTIL_PREPARE_REQ" } + ,{ GSN_UTIL_PREPARE_CONF, "UTIL_PREPARE_CONF" } + ,{ GSN_UTIL_PREPARE_REF, "UTIL_PREPARE_REF" } + ,{ GSN_UTIL_EXECUTE_REQ, "UTIL_EXECUTE_REQ" } + ,{ GSN_UTIL_EXECUTE_CONF, "UTIL_EXECUTE_CONF" } + ,{ GSN_UTIL_EXECUTE_REF, "UTIL_EXECUTE_REF" } + ,{ GSN_UTIL_RELEASE_REQ, "UTIL_RELEASE_REQ" } + ,{ GSN_UTIL_RELEASE_CONF, "UTIL_RELEASE_CONF" } + ,{ GSN_UTIL_RELEASE_REF, "UTIL_RELASE_REF" } + + ,{ GSN_GREP_CREATE_REQ, "GREP_CREATE_REQ" }, + { GSN_GREP_CREATE_REF, "GREP_CREATE_REF" }, + { GSN_GREP_CREATE_CONF, "GREP_CREATE_CONF" }, + { GSN_GREP_START_REQ, "GREP_START_REQ" }, + { GSN_GREP_START_REF, "GREP_START_REF" }, + { GSN_GREP_START_CONF, "GREP_START_CONF" }, + { GSN_GREP_SYNC_REQ, "GREP_SYNC_REQ" }, + { GSN_GREP_SYNC_REF, "GREP_SYNC_REF" }, + { GSN_GREP_SYNC_CONF, "GREP_SYNC_CONF" }, + //{ GSN_REP_CONNECT_REQ, "REP_CONNECT_REQ" }, Not used + //{ GSN_REP_CONNECT_REF, "REP_CONNECT_REF" }, Not used + //{ GSN_REP_CONNECT_CONF, "REP_CONNECT_CONF" }, Not used + { GSN_REP_WAITGCP_REQ, "REP_WAIT_GCP_REQ" }, + { GSN_REP_WAITGCP_REF, "REP_WAIT_GCP_REF" }, + { GSN_REP_WAITGCP_CONF, "REP_WAIT_GCP_CONF" }, + { GSN_GREP_WAITGCP_REQ, "GREP_WAIT_GCP_REQ" }, + { GSN_GREP_WAITGCP_REF, "GREP_WAIT_GCP_REF" }, + { GSN_GREP_WAITGCP_CONF, "GREP_WAIT_GCP_CONF" } + + /* Suma Block Services **/ + ,{ GSN_SUB_CREATE_REQ, "SUB_CREATE_REQ" } + ,{ GSN_SUB_CREATE_REF, "SUB_CREATE_REF" } + ,{ GSN_SUB_CREATE_CONF, "SUB_CREATE_CONF" } + ,{ GSN_SUB_REMOVE_REQ, "SUB_REMOVE_REQ" } + ,{ GSN_SUB_REMOVE_REF, "SUB_REMOVE_REF" } + ,{ GSN_SUB_REMOVE_CONF, "SUB_REMOVE_CONF" } + ,{ GSN_SUB_START_REQ, "SUB_START_REQ" } + ,{ GSN_SUB_START_REF, "SUB_START_REF" } + ,{ GSN_SUB_START_CONF, "SUB_START_CONF" } + ,{ GSN_SUB_STOP_REQ, "SUB_STOP_REQ" } + ,{ GSN_SUB_STOP_REF, "SUB_STOP_REF" } + ,{ GSN_SUB_STOP_CONF, "SUB_STOP_CONF" } + ,{ GSN_SUB_SYNC_REQ, "SUB_SYNC_REQ" } + ,{ GSN_SUB_SYNC_REF, "SUB_SYNC_REF" } + ,{ GSN_SUB_SYNC_CONF, "SUB_SYNC_CONF" } + ,{ GSN_SUB_META_DATA, "SUB_META_DATA" } + ,{ GSN_SUB_TABLE_DATA, "SUB_TABLE_DATA" } + ,{ GSN_SUB_SYNC_CONTINUE_REQ, "SUB_SYNC_CONTINUE_REQ" } + ,{ GSN_SUB_SYNC_CONTINUE_REF, "SUB_SYNC_CONTINUE_REF" } + ,{ GSN_SUB_SYNC_CONTINUE_CONF, "SUB_SYNC_CONTINUE_CONF" } + ,{ GSN_SUB_GCP_COMPLETE_REP, "SUB_GCP_COMPLETE_REP" } + ,{ GSN_SUB_GCP_COMPLETE_ACC, "SUB_GCP_COMPLETE_ACC" } + + ,{ GSN_CREATE_SUBID_REQ, "CREATE_SUBID_REQ" } + ,{ GSN_CREATE_SUBID_REF, "CREATE_SUBID_REF" } + ,{ GSN_CREATE_SUBID_CONF, "CREATE_SUBID_CONF" } + + ,{ GSN_CREATE_TABLE_REQ, "CREATE_TABLE_REQ" } + ,{ GSN_CREATE_TABLE_REF, "CREATE_TABLE_REF" } + ,{ GSN_CREATE_TABLE_CONF, "CREATE_TABLE_CONF" } + + ,{ GSN_CREATE_TAB_REQ, "CREATE_TAB_REQ" } + ,{ GSN_CREATE_TAB_REF, "CREATE_TAB_REF" } + ,{ GSN_CREATE_TAB_CONF, "CREATE_TAB_CONF" } + + ,{ GSN_ALTER_TABLE_REQ, "ALTER_TABLE_REQ" } + ,{ GSN_ALTER_TABLE_REF, "ALTER_TABLE_REF" } + ,{ GSN_ALTER_TABLE_CONF, "ALTER_TABLE_CONF" } + + ,{ GSN_ALTER_TAB_REQ, "ALTER_TAB_REQ" } + ,{ GSN_ALTER_TAB_REF, "ALTER_TAB_REF" } + ,{ GSN_ALTER_TAB_CONF, "ALTER_TAB_CONF" } + + ,{ GSN_CREATE_FRAGMENTATION_REQ, "CREATE_FRAGMENTATION_REQ" } + ,{ GSN_CREATE_FRAGMENTATION_REF, "CREATE_FRAGMENTATION_REF" } + ,{ GSN_CREATE_FRAGMENTATION_CONF, "CREATE_FRAGMENTATION_CONF" } + + ,{ GSN_UTIL_CREATE_LOCK_REQ, "UTIL_CREATE_LOCK_REQ" } + ,{ GSN_UTIL_CREATE_LOCK_REF, "UTIL_CREATE_LOCK_REF" } + ,{ GSN_UTIL_CREATE_LOCK_CONF, "UTIL_CREATE_LOCK_CONF" } + ,{ GSN_UTIL_DESTROY_LOCK_REQ, "UTIL_DESTROY_LOCK_REQ" } + ,{ GSN_UTIL_DESTROY_LOCK_REF, "UTIL_DESTROY_LOCK_REF" } + ,{ GSN_UTIL_DESTROY_LOCK_CONF, "UTIL_DESTROY_LOCK_CONF" } + ,{ GSN_UTIL_LOCK_REQ, "UTIL_LOCK_REQ" } + ,{ GSN_UTIL_LOCK_REF, "UTIL_LOCK_REF" } + ,{ GSN_UTIL_LOCK_CONF, "UTIL_LOCK_CONF" } + ,{ GSN_UTIL_UNLOCK_REQ, "UTIL_UNLOCK_REQ" } + ,{ GSN_UTIL_UNLOCK_REF, "UTIL_UNLOCK_REF" } + ,{ GSN_UTIL_UNLOCK_CONF, "UTIL_UNLOCK_CONF" } + + /* TUX */ + ,{ GSN_TUXFRAGREQ, "TUXFRAGREQ" } + ,{ GSN_TUXFRAGCONF, "TUXFRAGCONF" } + ,{ GSN_TUXFRAGREF, "TUXFRAGREF" } + ,{ GSN_TUX_ADD_ATTRREQ, "TUX_ADD_ATTRREQ" } + ,{ GSN_TUX_ADD_ATTRCONF, "TUX_ADD_ATTRCONF" } + ,{ GSN_TUX_ADD_ATTRREF, "TUX_ADD_ATTRREF" } + ,{ GSN_TUX_MAINT_REQ, "TUX_MAINT_REQ" } + ,{ GSN_TUX_MAINT_CONF, "TUX_MAINT_CONF" } + ,{ GSN_TUX_MAINT_REF, "TUX_MAINT_REF" } + ,{ GSN_TUX_BOUND_INFO, "TUX_BOUND_INFO" } + ,{ GSN_ACC_LOCKREQ, "ACC_LOCKREQ" } + +}; +const unsigned short NO_OF_SIGNAL_NAMES = sizeof(SignalNames)/sizeof(GsnName); diff --git a/storage/ndb/src/common/debugger/signaldata/StartRec.cpp b/storage/ndb/src/common/debugger/signaldata/StartRec.cpp new file mode 100644 index 00000000000..482e3cb0728 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/StartRec.cpp @@ -0,0 +1,52 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <RefConvert.hpp> +#include <signaldata/StartRec.hpp> + +bool +printSTART_REC_REQ(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + StartRecReq * sig = (StartRecReq *) theData; + + fprintf(output, " receivingNodeId: %d senderRef: (%d, %d)\n", + sig->receivingNodeId, + refToNode(sig->senderRef), + refToBlock(sig->senderRef)); + + fprintf(output, " keepGci: %d lastCompletedGci: %d newestGci: %d\n", + sig->keepGci, + sig->lastCompletedGci, + sig->newestGci); + + return true; +} + +bool +printSTART_REC_CONF(FILE * output, + const Uint32 * theData, + Uint32 len, + Uint16 recBlockNo){ + StartRecConf * sig = (StartRecConf *) theData; + + fprintf(output, " startingNodeId: %d\n", + sig->startingNodeId); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp b/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp new file mode 100644 index 00000000000..e50a3040fe3 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp @@ -0,0 +1,241 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/SumaImpl.hpp> + +bool +printSUB_CREATE_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubCreateReq * const sig = (SubCreateReq *)theData; + fprintf(output, " subscriberRef: %x\n", sig->subscriberRef); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriptionType: %x\n", sig->subscriptionType); + fprintf(output, " tableId: %x\n", sig->tableId); + return false; +} + +bool +printSUB_CREATE_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubCreateConf * const sig = (SubCreateConf *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_CREATE_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubCreateRef * const sig = (SubCreateRef *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_REMOVE_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const SubRemoveReq * const sig = (SubRemoveReq *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + return false; +} + +bool +printSUB_REMOVE_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const SubRemoveConf * const sig = (SubRemoveConf *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_REMOVE_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const SubRemoveRef * const sig = (SubRemoveRef *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " err: %x\n", sig->err); + return false; +} + +bool +printSUB_START_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubStartReq * const sig = (SubStartReq *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_START_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubStartRef * const sig = (SubStartRef *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " startPart: %x\n", sig->part); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " err: %x\n", sig->err); + return false; +} + +bool +printSUB_START_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubStartConf * const sig = (SubStartConf *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " startPart: %x\n", sig->part); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_STOP_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubStopReq * const sig = (SubStopReq *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_STOP_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubStopRef * const sig = (SubStopRef *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " err: %x\n", sig->err); + return false; +} + +bool +printSUB_STOP_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubStopConf * const sig = (SubStopConf *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_SYNC_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubSyncReq * const sig = (SubSyncReq *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " syncPart: %x\n", sig->part); + return false; +} + +bool +printSUB_SYNC_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubSyncRef * const sig = (SubSyncRef *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " syncPart: %x\n", sig->part); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " err: %x\n", sig->err); + return false; +} + +bool +printSUB_SYNC_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubSyncConf * const sig = (SubSyncConf *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + fprintf(output, " syncPart: %x\n", sig->part); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + return false; +} + +bool +printSUB_META_DATA(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubMetaData * const sig = (SubMetaData *)theData; + fprintf(output, " gci: %x\n", sig->gci); + fprintf(output, " senderData: %x\n", sig->senderData); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " tableId: %x\n", sig->tableId); + return false; +} + +bool +printSUB_TABLE_DATA(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubTableData * const sig = (SubTableData *)theData; + fprintf(output, " senderData: %x\n", sig->senderData); + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " gci: %x\n", sig->gci); + fprintf(output, " tableId: %x\n", sig->tableId); + fprintf(output, " operation: %x\n", sig->operation); + fprintf(output, " noOfAttributes: %x\n", sig->noOfAttributes); + fprintf(output, " dataSize: %x\n", sig->dataSize); + return false; +} + +bool +printSUB_SYNC_CONTINUE_REQ(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubSyncContinueReq * const sig = (SubSyncContinueReq *)theData; + fprintf(output, " subscriberData: %x\n", sig->subscriberData); + fprintf(output, " noOfRowsSent: %x\n", sig->noOfRowsSent); + return false; +} + +bool +printSUB_SYNC_CONTINUE_REF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubSyncContinueRef * const sig = (SubSyncContinueRef *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + return false; +} + +bool +printSUB_SYNC_CONTINUE_CONF(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubSyncContinueConf * const sig = (SubSyncContinueConf *)theData; + fprintf(output, " subscriptionId: %x\n", sig->subscriptionId); + fprintf(output, " subscriptionKey: %x\n", sig->subscriptionKey); + return false; +} + +bool +printSUB_GCP_COMPLETE_REP(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) { + const SubGcpCompleteRep * const sig = (SubGcpCompleteRep *)theData; + fprintf(output, " gci: %x\n", sig->gci); + return false; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/SystemError.cpp b/storage/ndb/src/common/debugger/signaldata/SystemError.cpp new file mode 100644 index 00000000000..549c34710a0 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/SystemError.cpp @@ -0,0 +1,40 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include <kernel_types.h> +#include <BlockNumbers.h> +#include <signaldata/SystemError.hpp> + +bool +printSYSTEM_ERROR(FILE * output, const Uint32 * theData, Uint32 len, + Uint16 receiverBlockNo){ + + const SystemError * const sig = (SystemError *) theData; + + fprintf(output, "errorRef: H\'%.8x\n", + sig->errorRef); + fprintf(output, "errorCode: %d\n", + sig->errorCode); + fprintf(output, "data1: H\'%.8x\n", + sig->data1); + fprintf(output, "data2: H\'%.8x\n", + sig->data2); + + return true; +} + + diff --git a/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp b/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp new file mode 100644 index 00000000000..b0578f5b646 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TcIndx.cpp @@ -0,0 +1,74 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TcIndx.hpp> +#include <signaldata/TcKeyReq.hpp> +#include <BlockNumbers.h> + + +bool +printTCINDXCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + if (receiverBlockNo == API_PACKED) { + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + } + else { + const TcIndxConf * const sig = (TcIndxConf *) theData; + + fprintf(output, "Signal data: "); + Uint32 i = 0; + Uint32 confInfo = sig->confInfo; + Uint32 noOfOp = TcIndxConf::getNoOfOperations(confInfo); + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + fprintf(output, "apiConnectPtr: H'%.8x, gci: %u, transId:(H'%.8x, H'%.8x)\n", + sig->apiConnectPtr, sig->gci, sig->transId1, sig->transId2); + + fprintf(output, "noOfOperations: %u, commitFlag: %s, markerFlag: %s\n", + noOfOp, + (TcIndxConf::getCommitFlag(confInfo) == 0)?"false":"true", + (TcIndxConf::getMarkerFlag(confInfo) == 0)?"false":"true"); + fprintf(output, "Operations:\n"); + for(i = 0; i < noOfOp; i++) { + fprintf(output, + "apiOperationPtr: H'%.8x, attrInfoLen: %u\n", + sig->operations[i].apiOperationPtr, + sig->operations[i].attrInfoLen); + } + } + + return true; +} + +bool +printTCINDXREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + +// const TcIndxRef * const sig = (TcIndxRef *) theData; + + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp new file mode 100644 index 00000000000..652c2b8a557 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp @@ -0,0 +1,69 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TcKeyConf.hpp> +#include <BlockNumbers.h> + +bool +printTCKEYCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + + if (receiverBlockNo == API_PACKED) { + return false; + Uint32 Theader = * theData++; + Uint32 TpacketLen = (Theader & 0x1F) + 3; + Uint32 TrecBlockNo = Theader >> 16; + + do { + fprintf(output, "Block: %d %d %d\n", TrecBlockNo, len, TpacketLen); + printTCKEYCONF(output, theData, TpacketLen, TrecBlockNo); + assert(len >= (1 + TpacketLen)); + len -= (1 + TpacketLen); + theData += TpacketLen; + } while(len); + return true; + } + else { + const TcKeyConf * const sig = (TcKeyConf *) theData; + + Uint32 i = 0; + Uint32 confInfo = sig->confInfo; + Uint32 noOfOp = TcKeyConf::getNoOfOperations(confInfo); + if (noOfOp > 10) noOfOp = 10; + fprintf(output, " apiConnectPtr: H'%.8x, gci: %u, transId:(H'%.8x, H'%.8x)\n", + sig->apiConnectPtr, sig->gci, sig->transId1, sig->transId2); + + fprintf(output, " noOfOperations: %u, commitFlag: %s, markerFlag: %s\n", + noOfOp, + (TcKeyConf::getCommitFlag(confInfo) == 0)?"false":"true", + (TcKeyConf::getMarkerFlag(confInfo) == 0)?"false":"true"); + fprintf(output, "Operations:\n"); + for(i = 0; i < noOfOp; i++) { + if(sig->operations[i].attrInfoLen > TcKeyConf::SimpleReadBit) + fprintf(output, + " apiOperationPtr: H'%.8x, simplereadnode: %u\n", + sig->operations[i].apiOperationPtr, + sig->operations[i].attrInfoLen & (~TcKeyConf::SimpleReadBit)); + else + fprintf(output, + " apiOperationPtr: H'%.8x, attrInfoLen: %u\n", + sig->operations[i].apiOperationPtr, + sig->operations[i].attrInfoLen); + } + } + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp new file mode 100644 index 00000000000..0dba9909caf --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TcKeyRef.hpp> + +bool +printTCKEYREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp b/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp new file mode 100644 index 00000000000..3918bd5db26 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp @@ -0,0 +1,111 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + + +#include <signaldata/TcKeyReq.hpp> + +bool +printTCKEYREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + + const TcKeyReq * const sig = (TcKeyReq *) theData; + + UintR requestInfo = sig->requestInfo; + + fprintf(output, " apiConnectPtr: H\'%.8x, apiOperationPtr: H\'%.8x\n", + sig->apiConnectPtr, sig->apiOperationPtr); + fprintf(output, " Operation: %s, Flags: ", + sig->getOperationType(requestInfo) == ZREAD ? "Read" : + sig->getOperationType(requestInfo) == ZREAD_EX ? "Read-Ex" : + sig->getOperationType(requestInfo) == ZUPDATE ? "Update" : + sig->getOperationType(requestInfo) == ZINSERT ? "Insert" : + sig->getOperationType(requestInfo) == ZDELETE ? "Delete" : + sig->getOperationType(requestInfo) == ZWRITE ? "Write" : + "Unknown"); + { + if(sig->getDirtyFlag(requestInfo)){ + fprintf(output, "Dirty "); + } + if(sig->getStartFlag(requestInfo)){ + fprintf(output, "Start "); + } + if(sig->getExecuteFlag(requestInfo)){ + fprintf(output, "Execute "); + } + if(sig->getCommitFlag(requestInfo)){ + fprintf(output, "Commit "); + } + if (sig->getExecutingTrigger(requestInfo)) { + fprintf(output, "Trigger "); + } + + UintR TcommitType = sig->getAbortOption(requestInfo); + if (TcommitType == TcKeyReq::AbortOnError) { + fprintf(output, "AbortOnError "); + } else if (TcommitType == TcKeyReq::IgnoreError) { + fprintf(output, "IgnoreError "); + }//if + + if(sig->getSimpleFlag(requestInfo)){ + fprintf(output, "Simple "); + } + if(sig->getScanIndFlag(requestInfo)){ + fprintf(output, "ScanInd "); + } + if(sig->getInterpretedFlag(requestInfo)){ + fprintf(output, "Interpreted "); + } + if(sig->getDistributionKeyFlag(sig->requestInfo)){ + fprintf(output, " d-key"); + } + fprintf(output, "\n"); + } + + const int keyLen = sig->getKeyLength(requestInfo); + const int attrInThis = sig->getAIInTcKeyReq(requestInfo); + const int attrLen = sig->getAttrinfoLen(sig->attrLen); + const int apiVer = sig->getAPIVersion(sig->attrLen); + fprintf(output, + " keyLen: %d, attrLen: %d, AI in this: %d, tableId: %d, " + "tableSchemaVer: %d, API Ver: %d\n", + keyLen, attrLen, attrInThis, + sig->tableId, sig->tableSchemaVersion, apiVer); + + fprintf(output, " transId(1, 2): (H\'%.8x, H\'%.8x)\n -- Variable Data --\n", + sig->transId1, sig->transId2); + + if (len >= TcKeyReq::StaticLength) { + Uint32 restLen = (len - TcKeyReq::StaticLength); + const Uint32 * rest = &sig->scanInfo; + while(restLen >= 7){ + fprintf(output, + " H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x\n", + rest[0], rest[1], rest[2], rest[3], + rest[4], rest[5], rest[6]); + restLen -= 7; + rest += 7; + } + if(restLen > 0){ + for(Uint32 i = 0; i<restLen; i++) + fprintf(output, " H\'%.8x", rest[i]); + fprintf(output, "\n"); + } + } else { + fprintf(output, "*** invalid len %u ***\n", len); + } + return true; +} + diff --git a/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp b/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp new file mode 100644 index 00000000000..961f0c3619d --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TcRollbackRep.hpp> + +bool +printTCROLLBACKREP(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp b/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp new file mode 100644 index 00000000000..7a8d176ec61 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp @@ -0,0 +1,53 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TrigAttrInfo.hpp> + +static +const char * +tatype(Uint32 i){ + switch(i){ + case TrigAttrInfo::PRIMARY_KEY: + return "PK"; + break; + case TrigAttrInfo::BEFORE_VALUES: + return "BEFORE"; + break; + case TrigAttrInfo::AFTER_VALUES: + return "AFTER"; + break; + } + return "UNKNOWN"; +} + +bool +printTRIG_ATTRINFO(FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const TrigAttrInfo * const sig = (TrigAttrInfo *) theData; + + fprintf(output, " TriggerId: %d Type: %s ConnectPtr: %x\n", + sig->getTriggerId(), + tatype(sig->getAttrInfoType()), + sig->getConnectionPtr()); + + Uint32 i = 0; + while (i < len - TrigAttrInfo::StaticLength) + fprintf(output, " H\'%.8x", sig->getData()[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp b/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp new file mode 100644 index 00000000000..d0391b2a8e6 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TupCommit.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TupCommit.hpp> + +bool +printTUPCOMMITREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/TupKey.cpp b/storage/ndb/src/common/debugger/signaldata/TupKey.cpp new file mode 100644 index 00000000000..134b5fde8bc --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TupKey.cpp @@ -0,0 +1,50 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TupKey.hpp> + +bool +printTUPKEYREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} + +bool +printTUPKEYCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} + +bool +printTUPKEYREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){ + fprintf(output, "Signal data: "); + Uint32 i = 0; + while (i < len) + fprintf(output, "H\'%.8x ", theData[i++]); + fprintf(output,"\n"); + + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp b/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp new file mode 100644 index 00000000000..ba6a299b77d --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp @@ -0,0 +1,45 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/TuxMaint.hpp> +#include <SignalLoggerManager.hpp> +#include <AttributeHeader.hpp> + +bool +printTUX_MAINT_REQ(FILE* output, const Uint32* theData, Uint32 len, Uint16 rbn) +{ + //const bool inOut = rbn & (1 << 15); + const TuxMaintReq* const sig = (const TuxMaintReq*)theData; + fprintf(output, " errorCode=%d\n", sig->errorCode); + fprintf(output, " table: id=%u", sig->tableId); + fprintf(output, " index: id=%u", sig->indexId); + fprintf(output, " fragment: id=%u\n", sig->fragId); + fprintf(output, " tuple: loc=%u.%u version=%u\n", sig->pageId, sig->pageOffset, sig->tupVersion); + const Uint32 opCode = sig->opInfo & 0xFF; + const Uint32 opFlag = sig->opInfo >> 8; + switch (opCode ) { + case TuxMaintReq::OpAdd: + fprintf(output, " opCode=Add opFlag=%u\n", opFlag); + break; + case TuxMaintReq::OpRemove: + fprintf(output, " opCode=Remove opFlag=%u\n", opFlag); + break; + default: + fprintf(output, " opInfo=%x ***invalid***\n", sig->opInfo); + break; + } + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp b/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp new file mode 100644 index 00000000000..b6ba53559ac --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp @@ -0,0 +1,65 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/UtilDelete.hpp> + +bool +printUTIL_DELETE_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + (void)l; // Don't want compiler warning + (void)b; // Don't want compiler warning + + UtilDeleteReq* sig = (UtilDeleteReq*)data; + fprintf(out, " senderData: %d prepareId: %d totalDataLen: %d\n", + sig->senderData, + sig->prepareId, + sig->totalDataLen); + fprintf(out, + " H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x\n" + " H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x\n" + " H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x H\'%.8x\n", + sig->attrData[0], sig->attrData[1], sig->attrData[2], + sig->attrData[3], sig->attrData[4], sig->attrData[5], + sig->attrData[6], sig->attrData[7], sig->attrData[8], + sig->attrData[9], sig->attrData[10], sig->attrData[11], + sig->attrData[12], sig->attrData[13], sig->attrData[14], + sig->attrData[15], sig->attrData[16], sig->attrData[17], + sig->attrData[18], sig->attrData[19], sig->attrData[20], + sig->attrData[21] + ); + + return true; +} + +bool +printUTIL_DELETE_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + (void)l; // Don't want compiler warning + (void)b; // Don't want compiler warning + + UtilDeleteConf* sig = (UtilDeleteConf*)data; + fprintf(out, " senderData: %d\n", sig->senderData); + return true; +} + +bool +printUTIL_DELETE_REF(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + (void)l; // Don't want compiler warning + (void)b; // Don't want compiler warning + + UtilDeleteRef* sig = (UtilDeleteRef*)data; + fprintf(out, " senderData: %d\n", sig->senderData); + fprintf(out, " errorCode: %d\n", sig->errorCode); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp b/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp new file mode 100644 index 00000000000..2c88fa174d4 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp @@ -0,0 +1,59 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/UtilExecute.hpp> + +bool +printUTIL_EXECUTE_REQ(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) +{ + const UtilExecuteReq* const sig = (UtilExecuteReq*)data; + fprintf(out, " senderRef: H'%.8x, senderData: H'%.8x prepareId: %d\n", + sig->senderRef, + sig->senderData, + sig->prepareId); + return true; +} + +bool +printUTIL_EXECUTE_CONF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) +{ + UtilExecuteConf* sig = (UtilExecuteConf*)data; + fprintf(out, " senderData: H'%.8x\n", + sig->senderData); + return true; +} + +bool +printUTIL_EXECUTE_REF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) +{ + UtilExecuteRef* sig = (UtilExecuteRef*)data; + fprintf(out, " senderData: H'%.8x, ", sig->senderData); + fprintf(out, " errorCode: %s, ", + sig->errorCode == UtilExecuteRef::IllegalKeyNumber ? + "IllegalKeyNumber" : + sig->errorCode == UtilExecuteRef::IllegalAttrNumber ? + "IllegalAttrNumber" : + sig->errorCode == UtilExecuteRef::TCError ? + "TCError" : + sig->errorCode == UtilExecuteRef::IllegalPrepareId ? + "IllegalPrepareId" : + sig->errorCode == UtilExecuteRef::AllocationError ? + "AllocationError" : + "Unknown"); + fprintf(out, " TCErrorCode: %d\n", + sig->TCErrorCode); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp b/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp new file mode 100644 index 00000000000..34e37c3e2d8 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/UtilLock.cpp @@ -0,0 +1,158 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/UtilLock.hpp> + +bool +printUTIL_LOCK_REQ (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilLockReq *const sig = (UtilLockReq *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " requestInfo: %x\n", sig->requestInfo); + return true; +} + +bool +printUTIL_LOCK_CONF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilLockConf *const sig = (UtilLockConf *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " lockKey: %x\n", sig->lockKey); + return true; +} + +bool +printUTIL_LOCK_REF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilLockRef *const sig = (UtilLockRef *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " errorCode: %x\n", sig->errorCode); + return true; +} + +bool +printUTIL_UNLOCK_REQ (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilUnlockReq *const sig = (UtilUnlockReq *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " lockKey: %x\n", sig->lockKey); + return true; +} + +bool +printUTIL_UNLOCK_CONF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilUnlockConf *const sig = (UtilUnlockConf *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + return true; +} + +bool +printUTIL_UNLOCK_REF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilUnlockRef *const sig = (UtilUnlockRef *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " errorCode: %x\n", sig->errorCode); + return true; +} + +bool +printUTIL_CREATE_LOCK_REQ (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilCreateLockReq *const sig = (UtilCreateLockReq *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " lockType: %x\n", sig->lockType); + return true; +} + +bool +printUTIL_CREATE_LOCK_REF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilCreateLockRef *const sig = (UtilCreateLockRef *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " errorCode: %x\n", sig->errorCode); + return true; +} + +bool +printUTIL_CREATE_LOCK_CONF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilCreateLockConf *const sig = (UtilCreateLockConf *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + return true; +} + +bool +printUTIL_DESTROY_LOCK_REQ (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilDestroyLockReq *const sig = (UtilDestroyLockReq *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " lockKey: %x\n", sig->lockKey); + return true; +} + +bool +printUTIL_DESTROY_LOCK_REF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilDestroyLockRef *const sig = (UtilDestroyLockRef *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + fprintf (output, " errorCode: %x\n", sig->errorCode); + return true; +} + +bool +printUTIL_DESTROY_LOCK_CONF (FILE * output, const Uint32 * theData, + Uint32 len, Uint16 receiverBlockNo) +{ + const UtilDestroyLockConf *const sig = (UtilDestroyLockConf *) theData; + fprintf (output, " senderData: %x\n", sig->senderData); + fprintf (output, " senderRef: %x\n", sig->senderRef); + fprintf (output, " lockId: %x\n", sig->lockId); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp b/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp new file mode 100644 index 00000000000..adc2e299380 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp @@ -0,0 +1,64 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/UtilPrepare.hpp> + +bool +printUTIL_PREPARE_REQ(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) +{ + UtilPrepareReq* sig = (UtilPrepareReq*)data; + fprintf(out, " senderRef: H'%.8x senderData: H'%.8x\n", + sig->senderRef, + sig->senderData); + + return true; +} + +bool +printUTIL_PREPARE_CONF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) +{ + UtilPrepareConf* sig = (UtilPrepareConf*)data; + fprintf(out, " senderData: H'%.8x prepareId: %d\n", + sig->senderData, + sig->prepareId); + return true; +} + +bool +printUTIL_PREPARE_REF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) +{ + UtilPrepareRef* sig = (UtilPrepareRef*)data; + fprintf(out, " senderData: H'%.8x, ", sig->senderData); + fprintf(out, " error: %d, ", sig->errorCode); + + fprintf(out, " errorMsg: "); + switch(sig->errorCode) { + case UtilPrepareRef::NO_ERROR: + fprintf(out, "No error"); + break; + case UtilPrepareRef::PREPARE_SEIZE_ERROR: + fprintf(out, "Failed to seize Prepare record"); + break; + case UtilPrepareRef::PREPARED_OPERATION_SEIZE_ERROR: + fprintf(out, "Failed to seize PreparedOperation record"); + break; + case UtilPrepareRef::DICT_TAB_INFO_ERROR: + fprintf(out, "Failed to get table info from DICT"); + break; + } + fprintf(out, "\n"); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp b/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp new file mode 100644 index 00000000000..e91999d9abf --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp @@ -0,0 +1,67 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <signaldata/UtilSequence.hpp> + +inline +const char * +type2string(UtilSequenceReq::RequestType type){ + switch(type){ + case UtilSequenceReq::NextVal: + return "NextVal"; + case UtilSequenceReq::CurrVal: + return "CurrVal"; + case UtilSequenceReq::Create: + return "Create"; + default: + return "Unknown"; + } +} + +bool +printUTIL_SEQUENCE_REQ(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + UtilSequenceReq* sig = (UtilSequenceReq*)data; + fprintf(out, " senderData: %d sequenceId: %d RequestType: %s\n", + sig->senderData, + sig->sequenceId, + type2string((UtilSequenceReq::RequestType)sig->requestType)); + return true; +} + +bool +printUTIL_SEQUENCE_CONF(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + UtilSequenceConf* sig = (UtilSequenceConf*)data; + fprintf(out, " senderData: %d sequenceId: %d RequestType: %s\n", + sig->senderData, + sig->sequenceId, + type2string((UtilSequenceReq::RequestType)sig->requestType)); + fprintf(out, " val: [ %d %d ]\n", + sig->sequenceValue[0], + sig->sequenceValue[1]); + return true; +} + +bool +printUTIL_SEQUENCE_REF(FILE * out, const Uint32 * data, Uint32 l, Uint16 b){ + UtilSequenceRef* sig = (UtilSequenceRef*)data; + fprintf(out, " senderData: %d sequenceId: %d RequestType: %s\n", + sig->senderData, + sig->sequenceId, + type2string((UtilSequenceReq::RequestType)sig->requestType)); + fprintf(out, " errorCode: %d, TCErrorCode: %d\n", + sig->errorCode, sig->TCErrorCode); + return true; +} diff --git a/storage/ndb/src/common/debugger/signaldata/print.awk b/storage/ndb/src/common/debugger/signaldata/print.awk new file mode 100644 index 00000000000..9730fb4a236 --- /dev/null +++ b/storage/ndb/src/common/debugger/signaldata/print.awk @@ -0,0 +1,55 @@ +BEGIN { + m_curr=""; + m_count=0; + m_level=0; +} +/^[ ]*class[ ]+.*{/ { + if(m_curr != ""){ + print; + print "ERROR: " m_curr; + exit; + } + m_curr = $2; +} +/{/ { + m_level++; +} +/bool print/{ + m_print=$3; + i=index($3, "("); + if(i > 0){ + m_print=substr($3, 0, i-1); + } +} + +/[ ]+Uint32[ ]+[^)]*;/ { + if(m_level >= 0){ + m=$2; + i=index($2, ";"); + if(i > 0){ + m=substr($2, 0, i-1); + } + m_members[m_count]=m; + m_count++; + } +} +/^[ ]*}[ ]*;/ { + m_level--; + if(m_level == 0){ + if(m_count > 0 && m_print != ""){ + print "bool"; + print m_print "(FILE * output, const Uint32 * theData, "; + print "Uint32 len, Uint16 receiverBlockNo) {"; + print "const " m_curr " * const sig = (" m_curr " *)theData;"; + for(i = 0; i<m_count; i++){ + print "fprintf(output, \" " m_members[i] ": %x\\n\", sig->" m_members[i] ");"; + } + print "return true;"; + print "}"; + print ""; + } + m_curr=""; + m_print=""; + m_count=0; + } +} |