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

ndb - wl-2455 TUP scan for testing in 5.0

ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  fix readTuples signature
ndb/include/ndbapi/NdbScanOperation.hpp:
  fix readTuples signature
ndb/src/ndbapi/NdbScanOperation.cpp:
  fix readTuples signature
ndb/test/include/HugoTransactions.hpp:
  fix readTuples signature
ndb/test/ndbapi/testScanPerf.cpp:
  fix readTuples signature
ndb/test/src/HugoOperations.cpp:
  fix readTuples signature
ndb/test/src/HugoTransactions.cpp:
  fix readTuples signature
ndb/test/ndbapi/testOIBasic.cpp:
  fix readTuples signature
ndb/include/kernel/signaldata/AccScan.hpp:
  TUP scan for testing in 5.0
ndb/include/kernel/signaldata/NextScan.hpp:
  TUP scan for testing in 5.0
ndb/include/kernel/signaldata/ScanFrag.hpp:
  TUP scan for testing in 5.0
ndb/include/kernel/signaldata/ScanTab.hpp:
  TUP scan for testing in 5.0
ndb/src/common/debugger/signaldata/ScanTab.cpp:
  TUP scan for testing in 5.0
ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  TUP scan for testing in 5.0
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  TUP scan for testing in 5.0
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  TUP scan for testing in 5.0
ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  TUP scan for testing in 5.0
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
  TUP scan for testing in 5.0
ndb/src/kernel/blocks/dbtup/Makefile.am:
  TUP scan for testing in 5.0
ndb/test/ndbapi/testScan.cpp:
  TUP scan for testing in 5.0
This commit is contained in:
unknown
2005-04-07 11:15:34 +02:00
parent 5810ee1c91
commit 19cedc5e3d
20 changed files with 245 additions and 80 deletions

View File

@ -316,11 +316,15 @@ int runScanReadIndex(NDBT_Context* ctx, NDBT_Step* step){
while (pIdx && i<loops && !ctx->isTestStopped()) {
g_info << i << ": ";
bool sort = (rand() % 100) > 50 ? true : false;
bool desc = (rand() % 100) > 50 ? true : false;
int scan_flags =
(NdbScanOperation::SF_OrderBy & -(int)sort) |
(NdbScanOperation::SF_Descending & -(int)desc);
NdbOperation::LockMode lm = (NdbOperation::LockMode)(rand() % 3);
if (hugoTrans.scanReadRecords(GETNDB(step), pIdx,
records, abort, parallelism,
lm,
sort) != 0){
scan_flags) != 0){
return NDBT_FAILED;
}
i++;
@ -333,6 +337,8 @@ int runScanReadCommitted(NDBT_Context* ctx, NDBT_Step* step){
int records = ctx->getNumRecords();
int parallelism = ctx->getProperty("Parallelism", 240);
int abort = ctx->getProperty("AbortProb", 5);
bool tupScan = ctx->getProperty("TupScan");
int scan_flags = (NdbScanOperation::SF_TupScan & -(int)tupScan);
int i = 0;
HugoTransactions hugoTrans(*ctx->getTab());
@ -340,7 +346,8 @@ int runScanReadCommitted(NDBT_Context* ctx, NDBT_Step* step){
g_info << i << ": ";
if (hugoTrans.scanReadRecords(GETNDB(step), records,
abort, parallelism,
NdbOperation::LM_CommittedRead) != 0){
NdbOperation::LM_CommittedRead,
scan_flags) != 0){
return NDBT_FAILED;
}
i++;
@ -1150,6 +1157,18 @@ TESTCASE("ScanReadCommitted240",
"downgraded to the maximum parallelism value for the current config)"){
INITIALIZER(runLoadTable);
TC_PROPERTY("Parallelism", 240);
TC_PROPERTY("TupScan", (Uint32)0);
STEP(runScanReadCommitted);
FINALIZER(runClearTable);
}
TESTCASE("ScanTupReadCommitted240",
"Verify scan requirement: It should be possible to scan read committed with "\
"parallelism, test with parallelism 240(240 would automatically be "\
"downgraded to the maximum parallelism value for the current config). "\
"Scans TUP pages directly without using ACC."){
INITIALIZER(runLoadTable);
TC_PROPERTY("Parallelism", 240);
TC_PROPERTY("TupScan", 1);
STEP(runScanReadCommitted);
FINALIZER(runClearTable);
}