Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1964 05/11/24 16:43:22 jonas@stripped +2 -0
ndb -
Add testcase for different scan variants
storage/ndb/test/run-test/daily-basic-tests.txt
1.38 05/11/24 16:43:20 jonas@stripped +4 -0
Add testcase for different scan variants
storage/ndb/test/ndbapi/testScan.cpp
1.21 05/11/24 16:43:20 jonas@stripped +88 -0
Add testcase for different scan variants
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-ndb
--- 1.37/storage/ndb/test/run-test/daily-basic-tests.txt 2005-11-24 11:09:39 +01:00
+++ 1.38/storage/ndb/test/run-test/daily-basic-tests.txt 2005-11-24 16:43:20 +01:00
@@ -417,6 +417,10 @@
cmd: testScan
args: -n ScanParallelism
+max-time: 500
+cmd: testScan
+args: -n ScanVariants
+
#
# DICT TESTS
max-time: 1500
--- 1.20/storage/ndb/test/ndbapi/testScan.cpp 2005-11-10 12:04:37 +01:00
+++ 1.21/storage/ndb/test/ndbapi/testScan.cpp 2005-11-24 16:43:20 +01:00
@@ -1125,6 +1125,88 @@
return NDBT_OK;
}
+int
+runScanVariants(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ Ndb * pNdb = GETNDB(step);
+ const NdbDictionary::Table* pTab = ctx->getTab();
+
+ HugoCalculator calc(* pTab);
+ NDBT_ResultRow tmpRow(* pTab);
+
+ for(int lm = 0; lm <= NdbOperation::LM_CommittedRead; lm++)
+ {
+ for(int flags = 0; flags < 4; flags++)
+ {
+ for (int par = 0; par < 16; par += 1 + (rand() % 3))
+ {
+ bool disk = flags & 1;
+ bool tups = flags & 2;
+ g_info << "lm: " << lm
+ << " disk: " << disk
+ << " tup scan: " << tups
+ << " par: " << par
+ << endl;
+
+ NdbConnection* pCon = pNdb->startTransaction();
+ NdbScanOperation* pOp = pCon->getNdbScanOperation(pTab->getName());
+ if (pOp == NULL) {
+ ERR(pCon->getNdbError());
+ return NDBT_FAILED;
+ }
+
+ if( pOp->readTuples((NdbOperation::LockMode)lm,
+ tups ? NdbScanOperation::SF_TupScan : 0,
+ par) != 0)
+ {
+ ERR(pCon->getNdbError());
+ return NDBT_FAILED;
+ }
+
+ int check = pOp->interpret_exit_ok();
+ if( check == -1 ) {
+ ERR(pCon->getNdbError());
+ return NDBT_FAILED;
+ }
+
+ // Define attributes to read
+ bool found_disk = false;
+ for(int a = 0; a<pTab->getNoOfColumns(); a++){
+ if (pTab->getColumn(a)->getStorageType() == NdbDictionary::Column::StorageTypeDisk)
+ {
+ found_disk = true;
+ if (!disk)
+ continue;
+ }
+
+ if((pOp->getValue(pTab->getColumn(a)->getName())) == 0) {
+ ERR(pCon->getNdbError());
+ return NDBT_FAILED;
+ }
+ }
+
+ if (! (disk && !found_disk))
+ {
+ check = pCon->execute(NoCommit);
+ if( check == -1 ) {
+ ERR(pCon->getNdbError());
+ return NDBT_FAILED;
+ }
+
+ int res;
+ int row = 0;
+ while((res = pOp->nextResult()) == 0);
+ }
+ pCon->close();
+ }
+ }
+ }
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testScan);
TESTCASE("ScanRead",
"Verify scan requirement: It should be possible "\
@@ -1590,6 +1672,12 @@
"Test scan with different parallelism"){
INITIALIZER(runLoadTable);
STEP(runScanParallelism);
+ FINALIZER(runClearTable);
+}
+TESTCASE("ScanVariants",
+ "Test different scan variants"){
+ INITIALIZER(runLoadTable);
+ STEP(runScanVariants);
FINALIZER(runClearTable);
}
NDBT_TESTSUITE_END(testScan);
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.1964) | jonas | 24 Nov |