Commit 52c32382 authored by unknown's avatar unknown
Browse files

ndb -

  ndbapi test of bug#20252


storage/ndb/test/ndbapi/testScan.cpp:
  ndbapi test of bug#20252
parent 7e39d48e
Loading
Loading
Loading
Loading
+54 −48
Original line number Diff line number Diff line
@@ -1150,6 +1150,8 @@ runScanVariants(NDBT_Context* ctx, NDBT_Step* step)
  for(int lm = 0; lm <= NdbOperation::LM_CommittedRead; lm++)
  {
    for(int flags = 0; flags < 4; flags++)
    {
      for (int batch = 0; batch < 100; batch += (1 + batch + (batch >> 3)))
      {
	for (int par = 0; par < 16; par += 1 + (rand() % 3))
	{
@@ -1159,6 +1161,7 @@ runScanVariants(NDBT_Context* ctx, NDBT_Step* step)
		 << " disk: " << disk 
		 << " tup scan: " << tups 
		 << " par: " << par 
		 << " batch: " << batch 
		 << endl;
	  
	  NdbConnection* pCon = pNdb->startTransaction();
@@ -1170,7 +1173,8 @@ runScanVariants(NDBT_Context* ctx, NDBT_Step* step)
	  
	  if( pOp->readTuples((NdbOperation::LockMode)lm,
			      tups ? NdbScanOperation::SF_TupScan : 0,
			    par) != 0) 
			      par,
			      batch) != 0) 
	  {
	    ERR(pCon->getNdbError());
	    return NDBT_FAILED;
@@ -1185,7 +1189,8 @@ runScanVariants(NDBT_Context* ctx, NDBT_Step* step)
	  // Define attributes to read  
	  bool found_disk = false;
	  for(int a = 0; a<pTab->getNoOfColumns(); a++){
	  if (pTab->getColumn(a)->getStorageType() == NdbDictionary::Column::StorageTypeDisk)
	    if (pTab->getColumn(a)->getStorageType() == 
		NdbDictionary::Column::StorageTypeDisk)
	    {
	      found_disk = true;
	      if (!disk)
@@ -1214,6 +1219,7 @@ runScanVariants(NDBT_Context* ctx, NDBT_Step* step)
	}
      }
    }
  }

  return NDBT_OK;
}