diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2006-01-26 11:14:20 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2006-01-26 11:14:20 +0100 |
commit | 77f51bf11a0a5cc7ad6bc9d1628d13a268dd1d4f (patch) | |
tree | c0c958bbd93dad46a3c42c2d4cda10d4ee648f7a | |
parent | 375afff3bd9d427921c81c3f190789b96c9c83ee (diff) | |
download | mariadb-git-77f51bf11a0a5cc7ad6bc9d1628d13a268dd1d4f.tar.gz |
Bug #16152, create event assertion in debug version, list corruption
4 files changed, 11 insertions, 22 deletions
diff --git a/storage/ndb/include/kernel/signaldata/UtilExecute.hpp b/storage/ndb/include/kernel/signaldata/UtilExecute.hpp index 551fb172cac..d74057e78d6 100644 --- a/storage/ndb/include/kernel/signaldata/UtilExecute.hpp +++ b/storage/ndb/include/kernel/signaldata/UtilExecute.hpp @@ -49,9 +49,9 @@ public: GET_SET_SENDERREF GET_SET_SENDERDATA void setPrepareId(Uint32 pId) { prepareId = pId; }; // !! unsets release flag - Uint32 getPrepareId() { return prepareId & 0xFF; }; + Uint32 getPrepareId() const { return prepareId & 0xFF; }; void setReleaseFlag() { prepareId |= 0x100; }; - bool getReleaseFlag() { return (prepareId & 0x100) != 0; }; + bool getReleaseFlag() const { return (prepareId & 0x100) != 0; }; private: Uint32 senderData; // MUST be no 1! Uint32 senderRef; @@ -117,7 +117,6 @@ public: IllegalKeyNumber = 1, IllegalAttrNumber = 2, TCError = 3, - IllegalPrepareId = 4, AllocationError = 5, MissingDataSection = 6, MissingData = 7 diff --git a/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp b/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp index 2c88fa174d4..0c774942977 100644 --- a/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp +++ b/storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp @@ -20,10 +20,12 @@ 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", + fprintf(out, " senderRef: H'%.8x, senderData: H'%.8x prepareId: %d " + " releaseFlag: %d\n", sig->senderRef, sig->senderData, - sig->prepareId); + sig->getPrepareId(), + sig->getReleaseFlag()); return true; } @@ -48,8 +50,6 @@ printUTIL_EXECUTE_REF(FILE* out, const Uint32 * data, Uint32 len, Uint16 rec) "IllegalAttrNumber" : sig->errorCode == UtilExecuteRef::TCError ? "TCError" : - sig->errorCode == UtilExecuteRef::IllegalPrepareId ? - "IllegalPrepareId" : sig->errorCode == UtilExecuteRef::AllocationError ? "AllocationError" : "Unknown"); diff --git a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp index 6401ac35820..8e3e2452a23 100644 --- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp +++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp @@ -52,7 +52,6 @@ DbUtil::DbUtil(const Configuration & conf) : SimulatedBlock(DBUTIL, conf), c_runningPrepares(c_preparePool), - c_runningPreparedOperations(c_preparedOperationPool), c_seizingTransactions(c_transactionPool), c_runningTransactions(c_transactionPool), c_lockQueues(c_lockQueuePool) @@ -566,12 +565,13 @@ DbUtil::execDUMP_STATE_ORD(Signal* signal){ } ndbout << "PreparedOperation Id: " << signal->theData[2] << endl; PreparedOperationPtr prepOpPtr; - c_runningPreparedOperations.getPtr(prepOpPtr, signal->theData[2]); + c_preparedOperationPool.getPtr(prepOpPtr, signal->theData[2]); prepOpPtr.p->print(); return; } // ** Print all records ** +#if 0 // not implemented PreparedOperationPtr prepOpPtr; if (!c_runningPreparedOperations.first(prepOpPtr)) { ndbout << "No PreparedOperations exist" << endl; @@ -583,6 +583,7 @@ DbUtil::execDUMP_STATE_ORD(Signal* signal){ ndbout << "]"; c_runningPreparedOperations.next(prepOpPtr); } +#endif return; case 3: @@ -988,7 +989,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr) * Seize and store PreparedOperation struct *******************************************/ PreparedOperationPtr prepOpPtr; - if(!c_runningPreparedOperations.seize(prepOpPtr)) { + if(!c_preparedOperationPool.seize(prepOpPtr)) { jam(); releaseSections(signal); sendUtilPrepareRef(signal, UtilPrepareRef::PREPARED_OPERATION_SEIZE_ERROR, @@ -1738,17 +1739,7 @@ DbUtil::execUTIL_EXECUTE_REQ(Signal* signal) * Get PreparedOperation struct *******************************/ PreparedOperationPtr prepOpPtr; - c_runningPreparedOperations.first(prepOpPtr); - while (!prepOpPtr.isNull() && prepOpPtr.i != prepareId) - c_runningPreparedOperations.next(prepOpPtr); - - if (prepOpPtr.i != prepareId) { - jam(); - releaseSections(signal); - sendUtilExecuteRef(signal, UtilExecuteRef::IllegalPrepareId, - 0, clientRef, clientData); - return; - } + c_preparedOperationPool.getPtr(prepOpPtr, prepareId); prepOpPtr.p->releaseFlag = releaseFlag; diff --git a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp index 983dd4402a4..2d0fa250c2e 100644 --- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp +++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp @@ -389,7 +389,6 @@ public: DataBuffer<1>::DataBufferPool c_attrMappingPool; DataBuffer<11>::DataBufferPool c_dataBufPool; DLList<Prepare> c_runningPrepares; - DLList<PreparedOperation> c_runningPreparedOperations; DLList<Transaction> c_seizingTransactions; // Being seized at TC DLList<Transaction> c_runningTransactions; // Seized and now exec. |