From 499ebf4d413e38f7f1af7a1bfe4d028a284cd2dd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Oct 2004 12:59:04 +0200 Subject: 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 --- ndb/include/kernel/signaldata/AttrInfo.hpp | 3 ++- ndb/include/kernel/signaldata/KeyInfo.hpp | 1 + ndb/include/kernel/signaldata/ScanFrag.hpp | 6 ++++-- ndb/include/kernel/signaldata/ScanTab.hpp | 2 +- ndb/include/ndbapi/NdbConnection.hpp | 1 + ndb/include/ndbapi/NdbIndexScanOperation.hpp | 8 +++++++- ndb/include/ndbapi/NdbOperation.hpp | 4 ---- ndb/include/ndbapi/NdbScanOperation.hpp | 2 ++ 8 files changed, 18 insertions(+), 9 deletions(-) (limited to 'ndb/include') diff --git a/ndb/include/kernel/signaldata/AttrInfo.hpp b/ndb/include/kernel/signaldata/AttrInfo.hpp index 18bd9b22c40..c87470db8b0 100644 --- a/ndb/include/kernel/signaldata/AttrInfo.hpp +++ b/ndb/include/kernel/signaldata/AttrInfo.hpp @@ -35,7 +35,8 @@ class AttrInfo { */ friend class Dbtc; friend class Dblqh; - + friend class NdbScanOperation; + friend bool printATTRINFO(FILE *, const Uint32 *, Uint32, Uint16); public: diff --git a/ndb/include/kernel/signaldata/KeyInfo.hpp b/ndb/include/kernel/signaldata/KeyInfo.hpp index a4c698f89b2..686f3ae053d 100644 --- a/ndb/include/kernel/signaldata/KeyInfo.hpp +++ b/ndb/include/kernel/signaldata/KeyInfo.hpp @@ -26,6 +26,7 @@ class KeyInfo { friend class DbUtil; friend class NdbOperation; friend class NdbScanOperation; + friend class NdbIndexScanOperation; /** * Reciver(s) diff --git a/ndb/include/kernel/signaldata/ScanFrag.hpp b/ndb/include/kernel/signaldata/ScanFrag.hpp index d3a89b8dc25..41ea569c45d 100644 --- a/ndb/include/kernel/signaldata/ScanFrag.hpp +++ b/ndb/include/kernel/signaldata/ScanFrag.hpp @@ -34,14 +34,16 @@ class ScanFragReq { friend class Dblqh; public: STATIC_CONST( SignalLength = 12 ); - + + friend bool printSCAN_FRAGREQ(FILE *, const Uint32*, Uint32, Uint16); + public: Uint32 senderData; Uint32 resultRef; // Where to send the result Uint32 savePointId; Uint32 requestInfo; Uint32 tableId; - Uint32 fragmentNo; + Uint32 fragmentNoKeyLen; Uint32 schemaVersion; Uint32 transId1; Uint32 transId2; diff --git a/ndb/include/kernel/signaldata/ScanTab.hpp b/ndb/include/kernel/signaldata/ScanTab.hpp index 1acd7ae4736..7a1a5d224a2 100644 --- a/ndb/include/kernel/signaldata/ScanTab.hpp +++ b/ndb/include/kernel/signaldata/ScanTab.hpp @@ -55,7 +55,7 @@ private: * DATA VARIABLES */ UintR apiConnectPtr; // DATA 0 - UintR attrLen; // DATA 1 + UintR attrLenKeyLen; // DATA 1 UintR requestInfo; // DATA 2 UintR tableId; // DATA 3 UintR tableSchemaVersion; // DATA 4 diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp index ef4972f205b..d2ee178c6e1 100644 --- a/ndb/include/ndbapi/NdbConnection.hpp +++ b/ndb/include/ndbapi/NdbConnection.hpp @@ -673,6 +673,7 @@ private: void printState(); #endif bool checkState_TransId(const Uint32 * transId) const; + void define_scan_op(NdbIndexScanOperation*); }; inline diff --git a/ndb/include/ndbapi/NdbIndexScanOperation.hpp b/ndb/include/ndbapi/NdbIndexScanOperation.hpp index 82aed04a9fc..740e3fde52a 100644 --- a/ndb/include/ndbapi/NdbIndexScanOperation.hpp +++ b/ndb/include/ndbapi/NdbIndexScanOperation.hpp @@ -118,13 +118,19 @@ public: int setBound(Uint32 anAttrId, int type, const void* aValue, Uint32 len = 0); /** @} *********************************************************************/ + + /** + * Reset bounds and put operation in list that will be + * sent on next execute + */ + int reset_bounds(); private: NdbIndexScanOperation(Ndb* aNdb); virtual ~NdbIndexScanOperation(); int setBound(const NdbColumnImpl*, int type, const void* aValue, Uint32 len); - int saveBoundATTRINFO(); + int insertBOUNDS(Uint32 * data, Uint32 sz); virtual int equal_impl(const NdbColumnImpl*, const char*, Uint32); virtual NdbRecAttr* getValue_impl(const NdbColumnImpl*, char*); diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp index 2d08fa57aae..316fc2e116b 100644 --- a/ndb/include/ndbapi/NdbOperation.hpp +++ b/ndb/include/ndbapi/NdbOperation.hpp @@ -727,7 +727,6 @@ protected: FinalGetValue, SubroutineExec, SubroutineEnd, - SetBound, WaitResponse, WaitCommitResponse, Finished, @@ -899,9 +898,6 @@ protected: Uint16 m_keyInfoGSN; Uint16 m_attrInfoGSN; - // saveBoundATTRINFO() moves ATTRINFO here when setBound() is ready - NdbApiSignal* theBoundATTRINFO; - Uint32 theTotalBoundAI_Len; // Blobs in this operation NdbBlob* theBlobList; diff --git a/ndb/include/ndbapi/NdbScanOperation.hpp b/ndb/include/ndbapi/NdbScanOperation.hpp index 6ae71ef5aef..955b4f48d75 100644 --- a/ndb/include/ndbapi/NdbScanOperation.hpp +++ b/ndb/include/ndbapi/NdbScanOperation.hpp @@ -105,6 +105,7 @@ protected: virtual void release(); void closeScan(); + int close_impl(class TransporterFacade*); // Overloaded methods from NdbCursorOperation int executeCursor(int ProcessorId); @@ -131,6 +132,7 @@ protected: int prepareSendScan(Uint32 TC_ConnectPtr, Uint64 TransactionId); int fix_receivers(Uint32 parallel); + void reset_receivers(Uint32 parallel, Uint32 ordered); Uint32* m_array; // containing all arrays below Uint32 m_allocated_receivers; NdbReceiver** m_receivers; // All receivers -- cgit v1.2.1