summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-04-25 16:31:21 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-04-25 16:31:21 +0200
commita88129e900b1572839d1118b397f78cd1e9a2527 (patch)
tree94afd3049dd7facf248dee6adb50ebc6550f190e /storage
parent460bfcc41d62a7da28fd3e1362f8fa23ee012788 (diff)
parent27ace481272ae68b40311985e2fe646a4ce4a00f (diff)
downloadmariadb-git-a88129e900b1572839d1118b397f78cd1e9a2527.tar.gz
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-work storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp5
-rw-r--r--storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp37
2 files changed, 28 insertions, 14 deletions
diff --git a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
index bcda7bee5a9..419754e2d08 100644
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
@@ -1411,7 +1411,7 @@ private:
const UintR scanParallel,
const UintR noOprecPerFrag);
void initScanfragrec(Signal* signal);
- void releaseScanResources(ScanRecordPtr);
+ void releaseScanResources(ScanRecordPtr, bool not_started = false);
ScanRecordPtr seizeScanrec(Signal* signal);
void sendScanFragReq(Signal*, ScanRecord*, ScanFragRec*);
void sendScanTabConf(Signal* signal, ScanRecordPtr);
@@ -1558,7 +1558,8 @@ private:
void signalErrorRefuseLab(Signal* signal);
void abort080Lab(Signal* signal);
void packKeyData000Lab(Signal* signal, BlockReference TBRef, Uint32 len);
- void abortScanLab(Signal* signal, ScanRecordPtr, Uint32 errCode);
+ void abortScanLab(Signal* signal, ScanRecordPtr, Uint32 errCode,
+ bool not_started = false);
void sendAbortedAfterTimeout(Signal* signal, int Tcheck);
void abort010Lab(Signal* signal);
void abort015Lab(Signal* signal);
diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 369ba53126e..0989807db4a 100644
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -8845,17 +8845,17 @@ void Dbtc::scanAttrinfoLab(Signal* signal, UintR Tlen)
scanAttrinfo_attrbuf_error:
jam();
- abortScanLab(signal, scanptr, ZGET_ATTRBUF_ERROR);
+ abortScanLab(signal, scanptr, ZGET_ATTRBUF_ERROR, true);
return;
scanAttrinfo_attrbuf2_error:
jam();
- abortScanLab(signal, scanptr, ZGET_ATTRBUF_ERROR);
+ abortScanLab(signal, scanptr, ZGET_ATTRBUF_ERROR, true);
return;
scanAttrinfo_len_error:
jam();
- abortScanLab(signal, scanptr, ZLENGTH_ERROR);
+ abortScanLab(signal, scanptr, ZLENGTH_ERROR, true);
return;
}//Dbtc::scanAttrinfoLab()
@@ -8871,7 +8871,8 @@ void Dbtc::diFcountReqLab(Signal* signal, ScanRecordPtr scanptr)
;
} else {
abortScanLab(signal, scanptr,
- tabPtr.p->getErrorCode(scanptr.p->scanSchemaVersion));
+ tabPtr.p->getErrorCode(scanptr.p->scanSchemaVersion),
+ true);
return;
}
@@ -8942,13 +8943,13 @@ void Dbtc::execDI_FCOUNTCONF(Signal* signal)
ndbrequire(scanptr.p->scanState == ScanRecord::WAIT_FRAGMENT_COUNT);
if (apiConnectptr.p->apiFailState == ZTRUE) {
jam();
- releaseScanResources(scanptr);
+ releaseScanResources(scanptr, true);
handleApiFailState(signal, apiConnectptr.i);
return;
}//if
if (tfragCount == 0) {
jam();
- abortScanLab(signal, scanptr, ZNO_FRAGMENT_ERROR);
+ abortScanLab(signal, scanptr, ZNO_FRAGMENT_ERROR, true);
return;
}//if
@@ -8962,7 +8963,8 @@ void Dbtc::execDI_FCOUNTCONF(Signal* signal)
;
} else {
abortScanLab(signal, scanptr,
- tabPtr.p->getErrorCode(scanptr.p->scanSchemaVersion));
+ tabPtr.p->getErrorCode(scanptr.p->scanSchemaVersion),
+ true);
return;
}
@@ -9027,20 +9029,22 @@ void Dbtc::execDI_FCOUNTREF(Signal* signal)
ndbrequire(scanptr.p->scanState == ScanRecord::WAIT_FRAGMENT_COUNT);
if (apiConnectptr.p->apiFailState == ZTRUE) {
jam();
- releaseScanResources(scanptr);
+ releaseScanResources(scanptr, true);
handleApiFailState(signal, apiConnectptr.i);
return;
}//if
- abortScanLab(signal, scanptr, errCode);
+ abortScanLab(signal, scanptr, errCode, true);
}//Dbtc::execDI_FCOUNTREF()
-void Dbtc::abortScanLab(Signal* signal, ScanRecordPtr scanptr, Uint32 errCode)
+void Dbtc::abortScanLab(Signal* signal, ScanRecordPtr scanptr, Uint32 errCode,
+ bool not_started)
{
scanTabRefLab(signal, errCode);
- releaseScanResources(scanptr);
+ releaseScanResources(scanptr, not_started);
}//Dbtc::abortScanLab()
-void Dbtc::releaseScanResources(ScanRecordPtr scanPtr)
+void Dbtc::releaseScanResources(ScanRecordPtr scanPtr,
+ bool not_started)
{
if (apiConnectptr.p->cachePtr != RNIL) {
cachePtr.i = apiConnectptr.p->cachePtr;
@@ -9052,6 +9056,15 @@ void Dbtc::releaseScanResources(ScanRecordPtr scanPtr)
ptrCheckGuard(tcConnectptr, ctcConnectFilesize, tcConnectRecord);
releaseTcCon();
+ if (not_started)
+ {
+ jam();
+ ScanFragList run(c_scan_frag_pool, scanPtr.p->m_running_scan_frags);
+ ScanFragList queue(c_scan_frag_pool, scanPtr.p->m_queued_scan_frags);
+ run.release();
+ queue.release();
+ }
+
ndbrequire(scanPtr.p->m_running_scan_frags.isEmpty());
ndbrequire(scanPtr.p->m_queued_scan_frags.isEmpty());
ndbrequire(scanPtr.p->m_delivered_scan_frags.isEmpty());