summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2004-10-06 13:18:55 +0000
committerunknown <tomas@poseidon.ndb.mysql.com>2004-10-06 13:18:55 +0000
commit838af107a3a2cfbeade5a5e787bff1da71bf7207 (patch)
treeebaf89381e7d046d746e9a8e8a1180e2b5c3de48 /ndb
parent7d583c5834f420406c9abe8bb9c44518e49e74c3 (diff)
downloadmariadb-git-838af107a3a2cfbeade5a5e787bff1da71bf7207.tar.gz
bug#5736, subqueries and not in
and testcases ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: bug#5736, subqueries and not in sql/ha_ndbcluster.cc: bug#5736, subqueries and not in
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcMain.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 5b5578cb579..765d77d5dd6 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -1249,7 +1249,8 @@ void Dbtc::execTCRELEASEREQ(Signal* signal)
jam();
signal->theData[0] = tuserpointer;
signal->theData[1] = ZINVALID_CONNECTION;
- sendSignal(tapiBlockref, GSN_TCRELEASEREF, signal, 2, JBB);
+ signal->theData[2] = __LINE__;
+ sendSignal(tapiBlockref, GSN_TCRELEASEREF, signal, 3, JBB);
return;
} else {
jam();
@@ -1262,7 +1263,9 @@ void Dbtc::execTCRELEASEREQ(Signal* signal)
sendSignal(tapiBlockref, GSN_TCRELEASECONF, signal, 1, JBB);
} else {
if (tapiBlockref == apiConnectptr.p->ndbapiBlockref) {
- if (apiConnectptr.p->apiConnectstate == CS_CONNECTED) {
+ if (apiConnectptr.p->apiConnectstate == CS_CONNECTED ||
+ (apiConnectptr.p->apiConnectstate == CS_ABORTING &&
+ apiConnectptr.p->abortState == AS_IDLE)){
jam(); /* JUST REPLY OK */
releaseApiCon(signal, apiConnectptr.i);
signal->theData[0] = tuserpointer;
@@ -1272,14 +1275,19 @@ void Dbtc::execTCRELEASEREQ(Signal* signal)
jam();
signal->theData[0] = tuserpointer;
signal->theData[1] = ZINVALID_CONNECTION;
+ signal->theData[2] = __LINE__;
+ signal->theData[3] = apiConnectptr.p->apiConnectstate;
sendSignal(tapiBlockref,
- GSN_TCRELEASEREF, signal, 2, JBB);
+ GSN_TCRELEASEREF, signal, 4, JBB);
}
} else {
jam();
signal->theData[0] = tuserpointer;
signal->theData[1] = ZINVALID_CONNECTION;
- sendSignal(tapiBlockref, GSN_TCRELEASEREF, signal, 2, JBB);
+ signal->theData[2] = __LINE__;
+ signal->theData[3] = tapiBlockref;
+ signal->theData[4] = apiConnectptr.p->ndbapiBlockref;
+ sendSignal(tapiBlockref, GSN_TCRELEASEREF, signal, 5, JBB);
}//if
}//if
}//Dbtc::execTCRELEASEREQ()
@@ -6037,6 +6045,7 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
<< " - place: " << c_apiConTimer_line[apiConnectptr.i]);
switch (apiConnectptr.p->apiConnectstate) {
case CS_STARTED:
+ ndbrequire(c_apiConTimer_line[apiConnectptr.i] != 3615);
if(apiConnectptr.p->lqhkeyreqrec == apiConnectptr.p->lqhkeyconfrec){
jam();
/*
@@ -11359,6 +11368,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
Uint32 Ttcindxrec = regApiPtr->tcindxrec;
// Copy reply from TcKeyConf
+ ndbassert(regApiPtr->noIndexOp);
regApiPtr->noIndexOp--; // Decrease count
regApiPtr->tcIndxSendArray[Ttcindxrec] = indexOp->tcIndxReq.senderData;
regApiPtr->tcIndxSendArray[Ttcindxrec + 1] =
@@ -11417,6 +11427,12 @@ void Dbtc::execTCKEYREF(Signal* signal)
abortErrorLab(signal);
break;
}
+ /**
+ * Increase count as it will be decreased below...
+ * (and the code is written to handle failing lookup on "real" table
+ * not lookup on index table)
+ */
+ regApiPtr->noIndexOp++;
// else continue
}
case(IOS_INDEX_OPERATION): {
@@ -11426,6 +11442,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
TcIndxReq * const tcIndxReq = &indexOp->tcIndxReq;
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend();
+ ndbassert(regApiPtr->noIndexOp);
regApiPtr->noIndexOp--; // Decrease count
tcIndxRef->connectPtr = tcIndxReq->senderData;
tcIndxRef->transId[0] = tcKeyRef->transId[0];