summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2005-02-06 10:44:15 +0100
committerunknown <joreland@mysql.com>2005-02-06 10:44:15 +0100
commit6dc62ae2fe41e536c06eff4f16f8339dfcf9595c (patch)
treee419001b59abf72fdb3270034372b2227acb6a50
parent2b2645d94ce3e7cf9cd78a69a38353f9956b8c8d (diff)
parentd0f71a1186ab8aa06f6ea82fe2c45597c4c6106a (diff)
downloadmariadb-git-6dc62ae2fe41e536c06eff4f16f8339dfcf9595c.tar.gz
Merge
configure.in: Auto merged ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Auto merged ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged ndb/test/ndbapi/testScan.cpp: Auto merged ndb/test/src/NDBT_Test.cpp: Auto merged ndb/test/run-test/daily-basic-tests.txt: SCCS merged
-rw-r--r--ndb/src/kernel/blocks/dblqh/DblqhMain.cpp19
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcMain.cpp4
-rw-r--r--ndb/test/ndbapi/testScan.cpp30
-rw-r--r--ndb/test/run-test/daily-basic-tests.txt4
4 files changed, 49 insertions, 8 deletions
diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index d9fe17af40a..c34d4ddb566 100644
--- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -8817,13 +8817,14 @@ void Dblqh::finishScanrec(Signal* signal)
return;
}
+ ndbrequire(restart.p->scanState == ScanRecord::IN_QUEUE);
+
ScanRecordPtr tmpScan = scanptr;
TcConnectionrecPtr tmpTc = tcConnectptr;
tcConnectptr.i = restart.p->scanTcrec;
ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
restart.p->scanNumber = scanNumber;
- restart.p->scanState = ScanRecord::WAIT_ACC_SCAN;
queue.remove(restart);
scans.add(restart);
@@ -8838,10 +8839,18 @@ void Dblqh::finishScanrec(Signal* signal)
ndbout_c("adding-r (%d %d)", restart.p->scanNumber, restart.p->fragPtrI);
#endif
}
-
- scanptr = restart;
- continueAfterReceivingAllAiLab(signal);
-
+
+ restart.p->scanState = ScanRecord::SCAN_FREE; // set in initScanRec
+ if(tcConnectptr.p->transactionState == TcConnectionrec::SCAN_STATE_USED)
+ {
+ jam();
+ scanptr = restart;
+ continueAfterReceivingAllAiLab(signal);
+ }
+ else
+ {
+ ndbrequire(tcConnectptr.p->transactionState == TcConnectionrec::WAIT_SCAN_AI);
+ }
scanptr = tmpScan;
tcConnectptr = tmpTc;
}//Dblqh::finishScanrec()
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 51fd50c8c46..6325f659e39 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -9220,6 +9220,8 @@ void Dbtc::execDIGETPRIMCONF(Signal* signal)
scanFragptr.p->lqhBlockref = ref;
scanFragptr.p->m_connectCount = getNodeInfo(tnodeid).m_connectCount;
sendScanFragReq(signal, scanptr.p, scanFragptr.p);
+ if(ERROR_INSERTED(8035))
+ globalTransporterRegistry.performSend();
attrbufptr.i = cachePtr.p->firstAttrbuf;
while (attrbufptr.i != RNIL) {
jam();
@@ -9229,6 +9231,8 @@ void Dbtc::execDIGETPRIMCONF(Signal* signal)
attrbufptr.p,
ref);
attrbufptr.i = attrbufptr.p->attrbuf[ZINBUF_NEXT];
+ if(ERROR_INSERTED(8035))
+ globalTransporterRegistry.performSend();
}//while
scanFragptr.p->scanFragState = ScanFragRec::LQH_ACTIVE;
scanFragptr.p->startFragTimer(ctcTimer);
diff --git a/ndb/test/ndbapi/testScan.cpp b/ndb/test/ndbapi/testScan.cpp
index 1f40a52b334..3b52778a013 100644
--- a/ndb/test/ndbapi/testScan.cpp
+++ b/ndb/test/ndbapi/testScan.cpp
@@ -35,7 +35,8 @@ getTable(Ndb* pNdb, int i){
int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){
- int records = ctx->getNumRecords();
+ int records = ctx->getProperty("Rows", ctx->getNumRecords());
+
HugoTransactions hugoTrans(*ctx->getTab());
if (hugoTrans.loadTable(GETNDB(step), records) != 0){
return NDBT_FAILED;
@@ -264,7 +265,7 @@ int runVerifyTable(NDBT_Context* ctx, NDBT_Step* step){
int runScanRead(NDBT_Context* ctx, NDBT_Step* step){
int loops = ctx->getNumLoops();
- int records = ctx->getNumRecords();
+ int records = ctx->getProperty("Rows", ctx->getNumRecords());
int parallelism = ctx->getProperty("Parallelism", 240);
int abort = ctx->getProperty("AbortProb", 5);
@@ -375,7 +376,20 @@ int runScanReadError(NDBT_Context* ctx, NDBT_Step* step){
restarter.insertErrorInAllNodes(0);
return result;
}
-
+
+int
+runInsertError(NDBT_Context* ctx, NDBT_Step* step){
+ int error = ctx->getProperty("ErrorCode");
+ NdbRestarter restarter;
+
+ ctx->setProperty("ErrorCode", (Uint32)0);
+ if (restarter.insertErrorInAllNodes(error) != 0){
+ ndbout << "Could not insert error in all nodes "<<endl;
+ return NDBT_FAILED;
+ }
+ return NDBT_OK;
+}
+
int runScanReadErrorOneNode(NDBT_Context* ctx, NDBT_Step* step){
int result = NDBT_OK;
int loops = ctx->getNumLoops();
@@ -1258,6 +1272,16 @@ TESTCASE("ScanRead100",
STEPS(runScanRead, 100);
FINALIZER(runClearTable);
}
+TESTCASE("Scan-bug8262",
+ ""){
+ TC_PROPERTY("Rows", 1);
+ TC_PROPERTY("ErrorCode", 8035);
+ INITIALIZER(runLoadTable);
+ INITIALIZER(runInsertError); // Will reset error code
+ STEPS(runScanRead, 25);
+ FINALIZER(runInsertError);
+ FINALIZER(runClearTable);
+}
TESTCASE("ScanRead40RandomTable",
"Verify scan requirement: Scan with 40 simultaneous threads. "\
"Use random table for the scan"){
diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt
index 89675acb59f..b666f27d05f 100644
--- a/ndb/test/run-test/daily-basic-tests.txt
+++ b/ndb/test/run-test/daily-basic-tests.txt
@@ -355,6 +355,10 @@ args: -n ScanRestart T1
max-time: 500
cmd: testScan
+args: -l 100 -n Scan-bug8262 T7
+
+max-time: 500
+cmd: testScan
args: -n ScanParallelism
#