diff options
Diffstat (limited to 'storage/ndb/src/ndbapi/NdbScanOperation.cpp')
| -rw-r--r-- | storage/ndb/src/ndbapi/NdbScanOperation.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp index 2fcbeec1bf0..577eef78816 100644 --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp @@ -161,6 +161,16 @@ NdbScanOperation::readTuples(NdbScanOperation::LockMode lm, } m_keyInfo = lockExcl ? 1 : 0; + bool tupScan = (scan_flags & SF_TupScan); + +#if 1 // XXX temp for testing + { char* p = getenv("NDB_USE_TUPSCAN"); + if (p != 0) { + unsigned n = atoi(p); // 0-10 + if (::time(0) % 10 < n) tupScan = true; + } + } +#endif bool rangeScan = false; if (m_accessTable->m_indexType == NdbDictionary::Index::OrderedIndex) @@ -176,11 +186,8 @@ NdbScanOperation::readTuples(NdbScanOperation::LockMode lm, theStatus = GetValue; theOperationType = OpenRangeScanRequest; rangeScan = true; - } - - bool tupScan = (scan_flags & SF_TupScan); - if (tupScan && rangeScan) tupScan = false; + } theParallelism = parallel; |
