Loading storage/ndb/include/kernel/signaldata/CreateIndx.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ public: enum ErrorCode { NoError = 0, Busy = 701, BusyWithNR = 711, NotMaster = 702, IndexOnDiskAttributeError = 756, TriggerNotFound = 4238, Loading storage/ndb/include/kernel/signaldata/DropIndx.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,7 @@ public: NoError = 0, InvalidIndexVersion = 241, Busy = 701, BusyWithNR = 711, NotMaster = 702, IndexNotFound = 4243, BadRequestType = 4247, Loading storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +36 −8 Original line number Diff line number Diff line Loading @@ -7584,9 +7584,18 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal) } if (signal->getLength() == CreateIndxReq::SignalLength) { jam(); CreateIndxRef::ErrorCode tmperr = CreateIndxRef::NoError; if (getOwnNodeId() != c_masterNodeId) { jam(); tmperr = CreateIndxRef::NotMaster; } else if (c_blockState == BS_NODE_RESTART) { jam(); tmperr = CreateIndxRef::BusyWithNR; } else if (c_blockState != BS_IDLE) { jam(); tmperr = CreateIndxRef::Busy; } if (tmperr != CreateIndxRef::NoError) { releaseSections(signal); OpCreateIndex opBusy; opPtr.p = &opBusy; Loading @@ -7594,13 +7603,12 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal) opPtr.p->m_isMaster = (senderRef == reference()); opPtr.p->key = 0; opPtr.p->m_requestType = CreateIndxReq::RT_DICT_PREPARE; opPtr.p->m_errorCode = CreateIndxRef::NotMaster; opPtr.p->m_errorCode = tmperr; opPtr.p->m_errorLine = __LINE__; opPtr.p->m_errorNode = c_masterNodeId; createIndex_sendReply(signal, opPtr, true); return; } // forward initial request plus operation key to all req->setOpKey(++c_opRecordSequence); NodeReceiverGroup rg(DBDICT, c_aliveNodes); Loading Loading @@ -8185,10 +8193,19 @@ Dbdict::execDROP_INDX_REQ(Signal* signal) jam(); if (signal->getLength() == DropIndxReq::SignalLength) { jam(); DropIndxRef::ErrorCode tmperr = DropIndxRef::NoError; if (getOwnNodeId() != c_masterNodeId) { jam(); err = DropIndxRef::NotMaster; tmperr = DropIndxRef::NotMaster; } else if (c_blockState == BS_NODE_RESTART) { jam(); tmperr = DropIndxRef::BusyWithNR; } else if (c_blockState != BS_IDLE) { jam(); tmperr = DropIndxRef::Busy; } if (tmperr != DropIndxRef::NoError) { err = tmperr; goto error; } // forward initial request plus operation key to all Loading Loading @@ -13491,6 +13508,17 @@ Dbdict::execDICT_LOCK_REQ(Signal* signal) sendDictLockInfoEvent(lockPtr, "lock request by node"); } // only table and index ops are checked bool Dbdict::hasDictLockSchemaOp() { return ! c_opCreateTable.isEmpty() || ! c_opDropTable.isEmpty() || ! c_opCreateIndex.isEmpty() || ! c_opDropIndex.isEmpty(); } void Dbdict::checkDictLockQueue(Signal* signal, bool poll) { Loading @@ -13511,7 +13539,7 @@ Dbdict::checkDictLockQueue(Signal* signal, bool poll) break; } if (c_opRecordPool.getNoOfFree() != c_opRecordPool.getSize()) { if (hasDictLockSchemaOp()) { jam(); break; } Loading Loading @@ -13544,7 +13572,7 @@ Dbdict::execDICT_UNLOCK_ORD(Signal* signal) if (lockPtr.p->locked) { jam(); ndbrequire(c_blockState == lockPtr.p->lt->blockState); ndbrequire(c_opRecordPool.getNoOfFree() == c_opRecordPool.getSize()); ndbrequire(! hasDictLockSchemaOp()); ndbrequire(! c_dictLockQueue.hasPrev(lockPtr)); c_blockState = BS_IDLE; Loading Loading @@ -13640,7 +13668,7 @@ Dbdict::removeStaleDictLocks(Signal* signal, const Uint32* theFailedNodes) if (lockPtr.p->locked) { jam(); ndbrequire(c_blockState == lockPtr.p->lt->blockState); ndbrequire(c_opRecordPool.getNoOfFree() == c_opRecordPool.getSize()); ndbrequire(! hasDictLockSchemaOp()); ndbrequire(! c_dictLockQueue.hasPrev(lockPtr)); c_blockState = BS_IDLE; Loading storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -2107,6 +2107,9 @@ private: void sendDictLockInfoEvent(Uint32 pollCount); void sendDictLockInfoEvent(DictLockPtr lockPtr, const char* text); // check if any schema op exists (conflicting with dict lock) bool hasDictLockSchemaOp(); void checkDictLockQueue(Signal* signal, bool poll); void sendDictLockConf(Signal* signal, DictLockPtr lockPtr); void sendDictLockRef(Signal* signal, DictLockReq req, Uint32 errorCode); Loading storage/ndb/src/kernel/vm/DLHashTable2.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,8 @@ public: */ bool next(Uint32 bucket, Iterator & iter) const; inline bool isEmpty() const { Iterator iter; return ! first(iter); } private: Uint32 mask; Uint32 * hashValues; Loading Loading
storage/ndb/include/kernel/signaldata/CreateIndx.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ public: enum ErrorCode { NoError = 0, Busy = 701, BusyWithNR = 711, NotMaster = 702, IndexOnDiskAttributeError = 756, TriggerNotFound = 4238, Loading
storage/ndb/include/kernel/signaldata/DropIndx.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,7 @@ public: NoError = 0, InvalidIndexVersion = 241, Busy = 701, BusyWithNR = 711, NotMaster = 702, IndexNotFound = 4243, BadRequestType = 4247, Loading
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +36 −8 Original line number Diff line number Diff line Loading @@ -7584,9 +7584,18 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal) } if (signal->getLength() == CreateIndxReq::SignalLength) { jam(); CreateIndxRef::ErrorCode tmperr = CreateIndxRef::NoError; if (getOwnNodeId() != c_masterNodeId) { jam(); tmperr = CreateIndxRef::NotMaster; } else if (c_blockState == BS_NODE_RESTART) { jam(); tmperr = CreateIndxRef::BusyWithNR; } else if (c_blockState != BS_IDLE) { jam(); tmperr = CreateIndxRef::Busy; } if (tmperr != CreateIndxRef::NoError) { releaseSections(signal); OpCreateIndex opBusy; opPtr.p = &opBusy; Loading @@ -7594,13 +7603,12 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal) opPtr.p->m_isMaster = (senderRef == reference()); opPtr.p->key = 0; opPtr.p->m_requestType = CreateIndxReq::RT_DICT_PREPARE; opPtr.p->m_errorCode = CreateIndxRef::NotMaster; opPtr.p->m_errorCode = tmperr; opPtr.p->m_errorLine = __LINE__; opPtr.p->m_errorNode = c_masterNodeId; createIndex_sendReply(signal, opPtr, true); return; } // forward initial request plus operation key to all req->setOpKey(++c_opRecordSequence); NodeReceiverGroup rg(DBDICT, c_aliveNodes); Loading Loading @@ -8185,10 +8193,19 @@ Dbdict::execDROP_INDX_REQ(Signal* signal) jam(); if (signal->getLength() == DropIndxReq::SignalLength) { jam(); DropIndxRef::ErrorCode tmperr = DropIndxRef::NoError; if (getOwnNodeId() != c_masterNodeId) { jam(); err = DropIndxRef::NotMaster; tmperr = DropIndxRef::NotMaster; } else if (c_blockState == BS_NODE_RESTART) { jam(); tmperr = DropIndxRef::BusyWithNR; } else if (c_blockState != BS_IDLE) { jam(); tmperr = DropIndxRef::Busy; } if (tmperr != DropIndxRef::NoError) { err = tmperr; goto error; } // forward initial request plus operation key to all Loading Loading @@ -13491,6 +13508,17 @@ Dbdict::execDICT_LOCK_REQ(Signal* signal) sendDictLockInfoEvent(lockPtr, "lock request by node"); } // only table and index ops are checked bool Dbdict::hasDictLockSchemaOp() { return ! c_opCreateTable.isEmpty() || ! c_opDropTable.isEmpty() || ! c_opCreateIndex.isEmpty() || ! c_opDropIndex.isEmpty(); } void Dbdict::checkDictLockQueue(Signal* signal, bool poll) { Loading @@ -13511,7 +13539,7 @@ Dbdict::checkDictLockQueue(Signal* signal, bool poll) break; } if (c_opRecordPool.getNoOfFree() != c_opRecordPool.getSize()) { if (hasDictLockSchemaOp()) { jam(); break; } Loading Loading @@ -13544,7 +13572,7 @@ Dbdict::execDICT_UNLOCK_ORD(Signal* signal) if (lockPtr.p->locked) { jam(); ndbrequire(c_blockState == lockPtr.p->lt->blockState); ndbrequire(c_opRecordPool.getNoOfFree() == c_opRecordPool.getSize()); ndbrequire(! hasDictLockSchemaOp()); ndbrequire(! c_dictLockQueue.hasPrev(lockPtr)); c_blockState = BS_IDLE; Loading Loading @@ -13640,7 +13668,7 @@ Dbdict::removeStaleDictLocks(Signal* signal, const Uint32* theFailedNodes) if (lockPtr.p->locked) { jam(); ndbrequire(c_blockState == lockPtr.p->lt->blockState); ndbrequire(c_opRecordPool.getNoOfFree() == c_opRecordPool.getSize()); ndbrequire(! hasDictLockSchemaOp()); ndbrequire(! c_dictLockQueue.hasPrev(lockPtr)); c_blockState = BS_IDLE; Loading
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -2107,6 +2107,9 @@ private: void sendDictLockInfoEvent(Uint32 pollCount); void sendDictLockInfoEvent(DictLockPtr lockPtr, const char* text); // check if any schema op exists (conflicting with dict lock) bool hasDictLockSchemaOp(); void checkDictLockQueue(Signal* signal, bool poll); void sendDictLockConf(Signal* signal, DictLockPtr lockPtr); void sendDictLockRef(Signal* signal, DictLockReq req, Uint32 errorCode); Loading
storage/ndb/src/kernel/vm/DLHashTable2.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,8 @@ public: */ bool next(Uint32 bucket, Iterator & iter) const; inline bool isEmpty() const { Iterator iter; return ! first(iter); } private: Uint32 mask; Uint32 * hashValues; Loading