Commit 8cb9f0ef authored by pekka@mysql.com's avatar pekka@mysql.com

ndb - bug#11355 some fixes to index drop etc

parent 30feab4c
...@@ -408,10 +408,11 @@ Drop Table/Index: ...@@ -408,10 +408,11 @@ Drop Table/Index:
4001: Crash on REL_TABMEMREQ in TUP 4001: Crash on REL_TABMEMREQ in TUP
4002: Crash on DROP_TABFILEREQ in TUP 4002: Crash on DROP_TABFILEREQ in TUP
4003: Fail next trigger create in TUP 4003: Fail next trigger create in TUP
4004: Fail next trigger drop in TUP
8033: Fail next trigger create in TC 8033: Fail next trigger create in TC
8034: Fail next index create in TC 8034: Fail next index create in TC
8035: Fail next trigger drop in TC
8036: Fail next index drop in TC
System Restart: System Restart:
--------------- ---------------
......
This diff is collapsed.
This diff is collapsed.
...@@ -11043,6 +11043,7 @@ void Dbtc::execCREATE_TRIG_REQ(Signal* signal) ...@@ -11043,6 +11043,7 @@ void Dbtc::execCREATE_TRIG_REQ(Signal* signal)
if (ERROR_INSERTED(8033) || if (ERROR_INSERTED(8033) ||
!c_theDefinedTriggers.seizeId(triggerPtr, !c_theDefinedTriggers.seizeId(triggerPtr,
createTrigReq->getTriggerId())) { createTrigReq->getTriggerId())) {
jam();
CLEAR_ERROR_INSERT_VALUE; CLEAR_ERROR_INSERT_VALUE;
// Failed to allocate trigger record // Failed to allocate trigger record
CreateTrigRef * const createTrigRef = CreateTrigRef * const createTrigRef =
...@@ -11077,8 +11078,10 @@ void Dbtc::execDROP_TRIG_REQ(Signal* signal) ...@@ -11077,8 +11078,10 @@ void Dbtc::execDROP_TRIG_REQ(Signal* signal)
DropTrigReq * const dropTrigReq = (DropTrigReq *)&signal->theData[0]; DropTrigReq * const dropTrigReq = (DropTrigReq *)&signal->theData[0];
BlockReference sender = signal->senderBlockRef(); BlockReference sender = signal->senderBlockRef();
if ((c_theDefinedTriggers.getPtr(dropTrigReq->getTriggerId())) == NULL) { if (ERROR_INSERTED(8035) ||
(c_theDefinedTriggers.getPtr(dropTrigReq->getTriggerId())) == NULL) {
jam(); jam();
CLEAR_ERROR_INSERT_VALUE;
// Failed to find find trigger record // Failed to find find trigger record
DropTrigRef * const dropTrigRef = (DropTrigRef *)&signal->theData[0]; DropTrigRef * const dropTrigRef = (DropTrigRef *)&signal->theData[0];
...@@ -11110,6 +11113,7 @@ void Dbtc::execCREATE_INDX_REQ(Signal* signal) ...@@ -11110,6 +11113,7 @@ void Dbtc::execCREATE_INDX_REQ(Signal* signal)
if (ERROR_INSERTED(8034) || if (ERROR_INSERTED(8034) ||
!c_theIndexes.seizeId(indexPtr, createIndxReq->getIndexId())) { !c_theIndexes.seizeId(indexPtr, createIndxReq->getIndexId())) {
jam();
CLEAR_ERROR_INSERT_VALUE; CLEAR_ERROR_INSERT_VALUE;
// Failed to allocate index record // Failed to allocate index record
CreateIndxRef * const createIndxRef = CreateIndxRef * const createIndxRef =
...@@ -11321,8 +11325,10 @@ void Dbtc::execDROP_INDX_REQ(Signal* signal) ...@@ -11321,8 +11325,10 @@ void Dbtc::execDROP_INDX_REQ(Signal* signal)
TcIndexData* indexData; TcIndexData* indexData;
BlockReference sender = signal->senderBlockRef(); BlockReference sender = signal->senderBlockRef();
if ((indexData = c_theIndexes.getPtr(dropIndxReq->getIndexId())) == NULL) { if (ERROR_INSERTED(8036) ||
(indexData = c_theIndexes.getPtr(dropIndxReq->getIndexId())) == NULL) {
jam(); jam();
CLEAR_ERROR_INSERT_VALUE;
// Failed to find index record // Failed to find index record
DropIndxRef * const dropIndxRef = DropIndxRef * const dropIndxRef =
(DropIndxRef *)signal->getDataPtrSend(); (DropIndxRef *)signal->getDataPtrSend();
......
...@@ -305,6 +305,10 @@ Dbtup::primaryKey(Tablerec* const regTabPtr, Uint32 attrId) ...@@ -305,6 +305,10 @@ Dbtup::primaryKey(Tablerec* const regTabPtr, Uint32 attrId)
Uint32 Uint32
Dbtup::dropTrigger(Tablerec* table, const DropTrigReq* req) Dbtup::dropTrigger(Tablerec* table, const DropTrigReq* req)
{ {
if (ERROR_INSERTED(4004)) {
CLEAR_ERROR_INSERT_VALUE;
return 9999;
}
Uint32 triggerId = req->getTriggerId(); Uint32 triggerId = req->getTriggerId();
TriggerType::Value ttype = req->getTriggerType(); TriggerType::Value ttype = req->getTriggerType();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment