diff options
author | unknown <joreland@mysql.com> | 2005-02-06 10:00:29 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-02-06 10:00:29 +0100 |
commit | 37b4b89ebe3beb834bcea3b4481204f7bb4d0ade (patch) | |
tree | aac77cda90989ad98d0a4a9ffda5313a8ac0a297 /ndb/test | |
parent | 4d1441dac4e44944bdf20beb5354ec2f188c4071 (diff) | |
download | mariadb-git-37b4b89ebe3beb834bcea3b4481204f7bb4d0ade.tar.gz |
bug8262 - ndb
crash if scan is poped from queue before all attrinfo has arrived
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
only restart scan if all attrinfo has arrived
otherwise just set remove from queue and set state
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
new error insert - force send attrinfo
ndb/test/ndbapi/testScan.cpp:
new test bug8262 many threads - scanning small tables
ndb/test/run-test/daily-basic-tests.txt:
run new test case in autotest
Diffstat (limited to 'ndb/test')
-rw-r--r-- | ndb/test/ndbapi/testScan.cpp | 30 | ||||
-rw-r--r-- | ndb/test/run-test/daily-basic-tests.txt | 4 |
2 files changed, 31 insertions, 3 deletions
diff --git a/ndb/test/ndbapi/testScan.cpp b/ndb/test/ndbapi/testScan.cpp index 22ec3fff327..f1018d29846 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(); @@ -1221,6 +1235,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 87f86795370..c62908ae999 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -378,6 +378,10 @@ max-time: 500 cmd: testScan args: -n ScanRestart T1 +max-time: 500 +cmd: testScan +args: -l 100 -n Scan-bug8262 T7 + # OLD FLEX max-time: 500 cmd: flexBench |