mariadb/ndb/include/ndbapi/NdbIndexScanOperation.hpp

156 lines
5.2 KiB
C++
Raw Normal View History

2004-05-26 13:24:14 +02:00
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef NdbIndexScanOperation_H
#define NdbIndexScanOperation_H
#include <NdbScanOperation.hpp>
/**
* @class NdbIndexScanOperation
* @brief Class of scan operations for use to scan ordered index
*/
class NdbIndexScanOperation : public NdbScanOperation {
backwards compatible name change NdbConnectionto NdbTransaction removed friend declarations from doxygen updated some documentation in mgmapi BitKeeper/deleted/.del-NdbCursorOperation.hpp~da121aeaf101b136: Delete: ndb/include/ndbapi/NdbCursorOperation.hpp BitKeeper/deleted/.del-NdbCursorOperation.cpp~8d49480ced2deba5: Delete: ndb/src/ndbapi/NdbCursorOperation.cpp ndb/include/Makefile.am: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/ScanTab.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcCommit.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcHbRep.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcIndx.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcKeyConf.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcKeyFailConf.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcRollbackRep.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TransIdAI.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/mgmapi/mgmapi.h: backwards compatible name change NdbConnectionto NdbTransaction documented some missing things in mgmapi ndb/include/ndbapi/Ndb.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbApi.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbBlob.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbDictionary.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbEventOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbIndexOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbIndexScanOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbRecAttr.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbReceiver.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbScanFilter.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbScanOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbTransaction.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Makefile.am: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndb.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbApiSignal.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbBlob.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbImpl.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbIndexOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationDefine.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationExec.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationInt.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationSearch.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbReceiver.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbScanOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbTransaction.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbTransactionScan.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndberr.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndbif.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndbinit.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndblist.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/tools/restore/consumer_restore.hpp: backwards compatible name change NdbConnectionto NdbTransaction sql/ha_ndbcluster.h: backwards compatible name change NdbConnectionto NdbTransaction
2004-12-23 11:21:01 +01:00
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
2004-05-26 13:24:14 +02:00
friend class Ndb;
backwards compatible name change NdbConnectionto NdbTransaction removed friend declarations from doxygen updated some documentation in mgmapi BitKeeper/deleted/.del-NdbCursorOperation.hpp~da121aeaf101b136: Delete: ndb/include/ndbapi/NdbCursorOperation.hpp BitKeeper/deleted/.del-NdbCursorOperation.cpp~8d49480ced2deba5: Delete: ndb/src/ndbapi/NdbCursorOperation.cpp ndb/include/Makefile.am: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/ScanTab.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcCommit.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcHbRep.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcIndx.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcKeyConf.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcKeyFailConf.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcRollbackRep.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TransIdAI.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/mgmapi/mgmapi.h: backwards compatible name change NdbConnectionto NdbTransaction documented some missing things in mgmapi ndb/include/ndbapi/Ndb.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbApi.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbBlob.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbDictionary.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbEventOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbIndexOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbIndexScanOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbRecAttr.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbReceiver.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbScanFilter.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbScanOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbTransaction.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Makefile.am: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndb.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbApiSignal.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbBlob.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbImpl.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbIndexOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationDefine.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationExec.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationInt.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationSearch.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbReceiver.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbScanOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbTransaction.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbTransactionScan.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndberr.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndbif.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndbinit.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndblist.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/tools/restore/consumer_restore.hpp: backwards compatible name change NdbConnectionto NdbTransaction sql/ha_ndbcluster.h: backwards compatible name change NdbConnectionto NdbTransaction
2004-12-23 11:21:01 +01:00
friend class NdbTransaction;
2004-05-26 13:24:14 +02:00
friend class NdbResultSet;
friend class NdbOperation;
friend class NdbScanOperation;
backwards compatible name change NdbConnectionto NdbTransaction removed friend declarations from doxygen updated some documentation in mgmapi BitKeeper/deleted/.del-NdbCursorOperation.hpp~da121aeaf101b136: Delete: ndb/include/ndbapi/NdbCursorOperation.hpp BitKeeper/deleted/.del-NdbCursorOperation.cpp~8d49480ced2deba5: Delete: ndb/src/ndbapi/NdbCursorOperation.cpp ndb/include/Makefile.am: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/ScanTab.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcCommit.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcHbRep.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcIndx.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcKeyConf.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcKeyFailConf.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TcRollbackRep.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/kernel/signaldata/TransIdAI.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/mgmapi/mgmapi.h: backwards compatible name change NdbConnectionto NdbTransaction documented some missing things in mgmapi ndb/include/ndbapi/Ndb.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbApi.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbBlob.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbDictionary.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbEventOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbIndexOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbIndexScanOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbRecAttr.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbReceiver.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbScanFilter.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbScanOperation.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/include/ndbapi/NdbTransaction.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Makefile.am: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndb.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbApiSignal.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbBlob.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbImpl.hpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbIndexOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationDefine.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationExec.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationInt.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbOperationSearch.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbReceiver.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbScanOperation.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbTransaction.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/NdbTransactionScan.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndberr.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndbif.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndbinit.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/src/ndbapi/Ndblist.cpp: backwards compatible name change NdbConnectionto NdbTransaction ndb/tools/restore/consumer_restore.hpp: backwards compatible name change NdbConnectionto NdbTransaction sql/ha_ndbcluster.h: backwards compatible name change NdbConnectionto NdbTransaction
2004-12-23 11:21:01 +01:00
#endif
2004-05-26 13:24:14 +02:00
public:
/**
* readTuples using ordered index
2004-05-26 13:24:14 +02:00
*
* @param lock_mode Lock mode
2004-05-26 13:24:14 +02:00
* @param batch No of rows to fetch from each fragment at a time
* @param parallel No of fragments to scan in parallel
2004-05-26 13:24:14 +02:00
* @param order_by Order result set in index order
* @param order_desc Order descending, ignored unless order_by
* @param read_range_no Enable reading of range no using @ref get_range_no
* @returns 0 for success and -1 for failure
2004-05-26 13:24:14 +02:00
* @see NdbScanOperation::readTuples
*/
2005-01-10 01:25:20 +01:00
int readTuples(LockMode lock_mode = LM_Read,
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
Uint32 batch = 0,
Uint32 parallel = 0,
bool order_by = false,
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
bool order_desc = false,
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
bool read_range_no = false);
2004-05-26 13:24:14 +02:00
/**
* Type of ordered index key bound. The values (0-4) will not change
* and can be used explicitly (e.g. they could be computed).
*/
enum BoundType {
BoundLE = 0, ///< lower bound
2004-05-26 13:24:14 +02:00
BoundLT = 1, ///< lower bound, strict
BoundGE = 2, ///< upper bound
BoundGT = 3, ///< upper bound, strict
BoundEQ = 4 ///< equality
};
/**
* Define bound on index key in range scan.
*
* Each index key can have lower and/or upper bound. Setting the key
* equal to a value defines both upper and lower bounds. The bounds
* can be defined in any order. Conflicting definitions is an error.
*
* For equality, it is better to use BoundEQ instead of the equivalent
* pair of BoundLE and BoundGE. This is especially true when table
* partition key is an initial part of the index key.
2004-05-26 13:24:14 +02:00
*
* The sets of lower and upper bounds must be on initial sequences of
* index keys. All but possibly the last bound must be non-strict.
* So "a >= 2 and b > 3" is ok but "a > 2 and b >= 3" is not.
*
* The scan may currently return tuples for which the bounds are not
* satisfied. For example, "a <= 2 and b <= 3" scans the index up to
* (a=2, b=3) but also returns any (a=1, b=4).
2004-05-26 13:24:14 +02:00
*
2004-07-27 13:20:37 +02:00
* NULL is treated like a normal value which is less than any not-NULL
* value and equal to another NULL value. To compare against NULL use
2004-07-27 13:20:37 +02:00
* setBound with null pointer (0).
2004-05-26 13:24:14 +02:00
*
* An index stores also all-NULL keys. Doing index scan with empty
* bound set returns all table tuples.
2004-05-26 13:24:14 +02:00
*
2005-01-10 01:25:20 +01:00
* @param attr Attribute name, alternatively:
2004-05-26 13:24:14 +02:00
* @param type Type of bound
2004-07-27 13:20:37 +02:00
* @param value Pointer to bound value, 0 for NULL
2004-05-26 13:24:14 +02:00
* @param len Value length in bytes.
* Fixed per datatype and can be omitted
* @return 0 if successful otherwise -1
*/
2005-01-10 01:25:20 +01:00
int setBound(const char* attr, int type, const void* value, Uint32 len = 0);
2004-05-26 13:24:14 +02:00
/**
* Define bound on index key in range scan using index column id.
* See the other setBound() method for details.
*/
int setBound(Uint32 anAttrId, int type, const void* aValue, Uint32 len = 0);
NdbIndexScanOperation::reset_bounds() - Send BOUNDS as KEYINFO - At restart, only reset KEYINFO -- Fix resource shortage at KEYINFO in Dbtc and Dblqh w.r.t scan -- ndb/include/kernel/signaldata/AttrInfo.hpp: Let NdbScanOperation access AttrInfo ndb/include/kernel/signaldata/KeyInfo.hpp: Let NdbScanOperation access AttrInfo ndb/include/kernel/signaldata/ScanFrag.hpp: Send KeyLen in ScanFragReq (for range scans) ndb/include/kernel/signaldata/ScanTab.hpp: Send KeyLen in ScanTabReq (for range scans) ndb/include/ndbapi/NdbConnection.hpp: Function for adding op to list ndb/include/ndbapi/NdbIndexScanOperation.hpp: new method for saving BOUNDS ndb/include/ndbapi/NdbOperation.hpp: Remove bounds stuff from NdbOperation and put it into NdbScanOperation ndb/include/ndbapi/NdbScanOperation.hpp: reset bounds ndb/src/common/debugger/signaldata/Makefile.am: New signal data printer for ScanFrag ndb/src/common/debugger/signaldata/ScanTab.cpp: Fix printout ndb/src/common/debugger/signaldata/SignalDataPrint.cpp: New signal data printer for ScanFrag ndb/src/kernel/blocks/backup/Backup.cpp: Updated ScanFragReq ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Use same sendKeyInfo for both acckeyreq and tux_bounds ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Let range scan use KEYinfo for bounds instead of attrinfo ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Let range scan use KEYinfo for bounds instead of attrinfo ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Handle keyinfo in range scan ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: Skip useless 5 words in beginning of TuxBounds ndb/src/kernel/blocks/suma/Suma.cpp: Fix SCAN_FRAGREQ ndb/src/ndbapi/NdbConnection.cpp: reset bounds ndb/src/ndbapi/NdbOperation.cpp: Remove bounds ndb/src/ndbapi/NdbOperationDefine.cpp: Remove bounds stuff ndb/src/ndbapi/NdbOperationInt.cpp: Remove bounds stuff ndb/src/ndbapi/NdbScanOperation.cpp: Send BOUNDS in KEYINFO instead of ATTRINFO
2004-10-04 12:59:04 +02:00
/**
* Reset bounds and put operation in list that will be
* sent on next execute
*/
int reset_bounds(bool forceSend = false);
/**
* Marks end of a bound,
* used when batching index reads (multiple ranges)
*/
int end_of_bound(Uint32 range_no);
/**
* Return range no for current row
*/
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
int get_range_no();
2004-05-26 13:24:14 +02:00
/**
* Is current scan sorted
*/
bool getSorted() const { return m_ordered; }
/**
* Is current scan sorted descending
*/
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
bool getDescending() const { return m_descending; }
2004-05-26 13:24:14 +02:00
private:
NdbIndexScanOperation(Ndb* aNdb);
virtual ~NdbIndexScanOperation();
int setBound(const NdbColumnImpl*, int type, const void* aValue, Uint32 len);
NdbIndexScanOperation::reset_bounds() - Send BOUNDS as KEYINFO - At restart, only reset KEYINFO -- Fix resource shortage at KEYINFO in Dbtc and Dblqh w.r.t scan -- ndb/include/kernel/signaldata/AttrInfo.hpp: Let NdbScanOperation access AttrInfo ndb/include/kernel/signaldata/KeyInfo.hpp: Let NdbScanOperation access AttrInfo ndb/include/kernel/signaldata/ScanFrag.hpp: Send KeyLen in ScanFragReq (for range scans) ndb/include/kernel/signaldata/ScanTab.hpp: Send KeyLen in ScanTabReq (for range scans) ndb/include/ndbapi/NdbConnection.hpp: Function for adding op to list ndb/include/ndbapi/NdbIndexScanOperation.hpp: new method for saving BOUNDS ndb/include/ndbapi/NdbOperation.hpp: Remove bounds stuff from NdbOperation and put it into NdbScanOperation ndb/include/ndbapi/NdbScanOperation.hpp: reset bounds ndb/src/common/debugger/signaldata/Makefile.am: New signal data printer for ScanFrag ndb/src/common/debugger/signaldata/ScanTab.cpp: Fix printout ndb/src/common/debugger/signaldata/SignalDataPrint.cpp: New signal data printer for ScanFrag ndb/src/kernel/blocks/backup/Backup.cpp: Updated ScanFragReq ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Use same sendKeyInfo for both acckeyreq and tux_bounds ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Let range scan use KEYinfo for bounds instead of attrinfo ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Let range scan use KEYinfo for bounds instead of attrinfo ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Handle keyinfo in range scan ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: Skip useless 5 words in beginning of TuxBounds ndb/src/kernel/blocks/suma/Suma.cpp: Fix SCAN_FRAGREQ ndb/src/ndbapi/NdbConnection.cpp: reset bounds ndb/src/ndbapi/NdbOperation.cpp: Remove bounds ndb/src/ndbapi/NdbOperationDefine.cpp: Remove bounds stuff ndb/src/ndbapi/NdbOperationInt.cpp: Remove bounds stuff ndb/src/ndbapi/NdbScanOperation.cpp: Send BOUNDS in KEYINFO instead of ATTRINFO
2004-10-04 12:59:04 +02:00
int insertBOUNDS(Uint32 * data, Uint32 sz);
2004-05-26 13:24:14 +02:00
virtual int equal_impl(const NdbColumnImpl*, const char*, Uint32);
virtual NdbRecAttr* getValue_impl(const NdbColumnImpl*, char*);
void fix_get_values();
int next_result_ordered(bool fetchAllowed, bool forceSend = false);
int send_next_scan_ordered(Uint32 idx, bool forceSend = false);
2004-05-26 13:24:14 +02:00
int compare(Uint32 key, Uint32 cols, const NdbReceiver*, const NdbReceiver*);
Uint32 m_sort_columns;
Uint32 m_this_bound_start;
Uint32 * m_first_bound_word;
2004-05-26 13:24:14 +02:00
};
#endif