1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

testIndex -n NFNR1

Bugs in scan(tc)
        nf-handling(api)
        exec-handling(tc)
This commit is contained in:
joreland@mysql.com
2004-07-07 13:40:53 +02:00
parent ad7d5bbd6d
commit e18b384b64
10 changed files with 301 additions and 141 deletions

View File

@ -380,6 +380,25 @@ runVerifyIndex(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
int
sync_down(NDBT_Context* ctx){
Uint32 threads = ctx->getProperty("PauseThreads", (unsigned)0);
if(threads){
ctx->decProperty("PauseThreads");
}
}
int
sync_up_and_wait(NDBT_Context* ctx){
Uint32 threads = ctx->getProperty("Threads", (unsigned)0);
ndbout_c("Setting PauseThreads to %d", threads);
ctx->setProperty("PauseThreads", threads);
ctx->getPropertyWait("PauseThreads", (unsigned)0);
if(threads){
ndbout_c("wait completed");
}
}
int
runTransactions1(NDBT_Context* ctx, NDBT_Step* step){
// Verify that data in index match
@ -394,10 +413,17 @@ runTransactions1(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Updated table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
if (hugoTrans.scanUpdateRecords(pNdb, rows, batchSize) != 0){
g_err << "Updated table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
}
return NDBT_OK;
}
@ -418,7 +444,7 @@ runTransactions2(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
#endif
sync_down(ctx);
if(ctx->isTestStopped())
break;
#if 1
@ -427,6 +453,7 @@ runTransactions2(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
#endif
sync_down(ctx);
}
return NDBT_OK;
}
@ -447,6 +474,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Load table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -454,7 +482,8 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Updated table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -463,6 +492,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -471,6 +501,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -479,6 +510,7 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
@ -486,12 +518,15 @@ runTransactions3(NDBT_Context* ctx, NDBT_Step* step){
g_err << "Clear table failed" << endl;
return NDBT_FAILED;
}
sync_down(ctx);
if(ctx->isTestStopped())
break;
int count = -1;
if(utilTrans.selectCount(pNdb, 64, &count) != 0 || count != 0)
return NDBT_FAILED;
sync_down(ctx);
}
return NDBT_OK;
}
@ -510,6 +545,7 @@ int runRestarts(NDBT_Context* ctx, NDBT_Step* step){
result = NDBT_FAILED;
break;
}
sync_up_and_wait(ctx);
i++;
}
ctx->stopTest();
@ -1259,6 +1295,7 @@ TESTCASE("CreateLoadDrop_O",
TESTCASE("NFNR1",
"Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("LoggedIndexes", (unsigned)0);
//TC_PROPERTY("Threads", 2);
INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex);
INITIALIZER(runLoadTable);