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.2231 06/06/28 11:38:22 jonas@stripped +1 -0
ndb -
ndbapi test of bug#20252
storage/ndb/test/ndbapi/testScan.cpp
1.22 06/06/28 11:38:19 jonas@stripped +54 -48
ndbapi test of bug#20252
# 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-work
--- 1.21/storage/ndb/test/ndbapi/testScan.cpp 2006-05-19 16:29:44 +02:00
+++ 1.22/storage/ndb/test/ndbapi/testScan.cpp 2006-06-28 11:38:19 +02:00
@@ -1151,70 +1151,76 @@ runScanVariants(NDBT_Context* ctx, NDBT_
{
for(int flags = 0; flags < 4; flags++)
{
- for (int par = 0; par < 16; par += 1 + (rand() % 3))
+ for (int batch = 0; batch < 100; batch += (1 + batch + (batch >> 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)
+ for (int par = 0; par < 16; par += 1 + (rand() % 3))
{
- 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;
+ bool disk = flags & 1;
+ bool tups = flags & 2;
+ g_info << "lm: " << lm
+ << " disk: " << disk
+ << " tup scan: " << tups
+ << " par: " << par
+ << " batch: " << batch
+ << endl;
+
+ NdbConnection* pCon = pNdb->startTransaction();
+ NdbScanOperation* pOp = pCon->getNdbScanOperation(pTab->getName());
+ if (pOp == NULL) {
+ ERR(pCon->getNdbError());
+ return NDBT_FAILED;
}
- if((pOp->getValue(pTab->getColumn(a)->getName())) == 0) {
+ if( pOp->readTuples((NdbOperation::LockMode)lm,
+ tups ? NdbScanOperation::SF_TupScan : 0,
+ par,
+ batch) != 0)
+ {
ERR(pCon->getNdbError());
return NDBT_FAILED;
}
- }
-
- if (! (disk && !found_disk))
- {
- check = pCon->execute(NoCommit);
+
+ int check = pOp->interpret_exit_ok();
if( check == -1 ) {
ERR(pCon->getNdbError());
return NDBT_FAILED;
}
- int res;
- int row = 0;
- while((res = pOp->nextResult()) == 0);
+ // 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();
}
- pCon->close();
}
}
}
-
+
return NDBT_OK;
}
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2231) BUG#20252 | jonas | 28 Jun |