summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authormskold/marty@linux.site <>2007-02-07 11:44:41 +0100
committermskold/marty@linux.site <>2007-02-07 11:44:41 +0100
commit8dd443f9864f86ea54643d067c45616024c85edf (patch)
treec4881d181b5f2fc000a52bf458524db17b63334e /storage
parentbb8924cf39431a73e2dba3c8dfa4d1839524e63a (diff)
parentfd0232b2264a7fed83c6b7c85e8caa0167873182 (diff)
downloadmariadb-git-8dd443f9864f86ea54643d067c45616024c85edf.tar.gz
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/include/ndbapi/NdbScanOperation.hpp3
-rw-r--r--storage/ndb/src/ndbapi/NdbScanOperation.cpp10
2 files changed, 10 insertions, 3 deletions
diff --git a/storage/ndb/include/ndbapi/NdbScanOperation.hpp b/storage/ndb/include/ndbapi/NdbScanOperation.hpp
index 6a75ed8d482..1897a11c809 100644
--- a/storage/ndb/include/ndbapi/NdbScanOperation.hpp
+++ b/storage/ndb/include/ndbapi/NdbScanOperation.hpp
@@ -38,7 +38,8 @@ class NdbScanOperation : public NdbOperation {
public:
/**
* Scan flags. OR-ed together and passed as second argument to
- * readTuples.
+ * readTuples. Note that SF_MultiRange has to be set if several
+ * ranges (bounds) are to be passed.
*/
enum ScanFlag {
SF_TupScan = (1 << 16), // scan TUP order
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
index eec7b2da571..30f9873c59f 100644
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -1793,6 +1793,12 @@ NdbIndexScanOperation::reset_bounds(bool forceSend){
int
NdbIndexScanOperation::end_of_bound(Uint32 no)
{
+ DBUG_ENTER("end_of_bound");
+ DBUG_PRINT("info", ("Range number %u", no));
+ /* Check that SF_MultiRange has been specified if more
+ than one range is specified */
+ if (no > 0 && !m_multi_range)
+ DBUG_RETURN(-1);
if(no < (1 << 13)) // Only 12-bits no of ranges
{
Uint32 bound_head = * m_first_bound_word;
@@ -1801,9 +1807,9 @@ NdbIndexScanOperation::end_of_bound(Uint32 no)
m_first_bound_word = theKEYINFOptr + theTotalNrOfKeyWordInSignal;;
m_this_bound_start = theTupKeyLen;
- return 0;
+ DBUG_RETURN(0);
}
- return -1;
+ DBUG_RETURN(-1);
}
int