1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-27 13:04:36 +03:00

wl1504 - scan using distribution key and EQ_BOUND

ndb/include/kernel/signaldata/ScanTab.hpp:
  Add distribution key to ScanTab to enable scanning of specific fragment
ndb/include/ndbapi/NdbOperation.hpp:
  New methods for controlling distribution/partitioning
ndb/include/ndbapi/NdbScanOperation.hpp:
  New methods for controlling distribution/partitioning
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Don't mask away kvalue from hash while computing fragId
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Add distribution key to ScanTab to enable scanning of specific fragment
ndb/src/ndbapi/NdbBlob.cpp:
  removed m_sizeOfKeysInWords which was the same a m_keyLenInWords
ndb/src/ndbapi/NdbConnection.cpp:
  removed explicit cast
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  removed m_sizeOfKeysInWords which was the same a m_keyLenInWords
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  removed m_sizeOfKeysInWords which was the same a m_keyLenInWords
ndb/src/ndbapi/NdbIndexOperation.cpp:
  removed theFirstKEYINFO and replaced that with theTCREQ->next
ndb/src/ndbapi/NdbOperation.cpp:
  removed theFirstKEYINFO and replaced that with theTCREQ->next
ndb/src/ndbapi/NdbOperationExec.cpp:
  removed theFirstKEYINFO and replaced that with theTCREQ->next
ndb/src/ndbapi/NdbOperationSearch.cpp:
  removed theFirstKEYINFO and replaced that with theTCREQ->next
  Enable partition scan
ndb/src/ndbapi/NdbScanOperation.cpp:
  removed theFirstKEYINFO and replaced that with theTCREQ->next
  Enable partition scan
This commit is contained in:
unknown
2004-11-01 23:23:26 +01:00
parent 82b968efc2
commit 9b55605460
14 changed files with 347 additions and 211 deletions

View File

@@ -720,11 +720,14 @@ public:
LockMode getLockMode() const { return theLockMode; }
/**
* Set/get distribution key
* Set/get distribution/partition key
*/
void setDistributionKey(Uint32 key);
Uint32 getDistributionKey() const;
void setPartitionId(Uint32 id);
void setPartitionHash(Uint32 key);
void setPartitionHash(const Uint64 *, Uint32 len);
Uint32 getPartitionId() const;
protected:
int handle_distribution_key(const Uint64 *, Uint32 len);
protected:
/******************************************************************************
* These are the methods used to create and delete the NdbOperation objects.
@@ -855,14 +858,18 @@ protected:
Ndb* theNdb; // Point back to the Ndb object.
NdbConnection* theNdbCon; // Point back to the connection object.
NdbOperation* theNext; // Next pointer to operation.
NdbApiSignal* theTCREQ; // The TC[KEY/INDX]REQ signal object
union {
NdbApiSignal* theTCREQ; // The TC[KEY/INDX]REQ signal object
NdbApiSignal* theSCAN_TABREQ;
};
NdbApiSignal* theFirstATTRINFO; // The first ATTRINFO signal object
NdbApiSignal* theCurrentATTRINFO; // The current ATTRINFO signal object
Uint32 theTotalCurrAI_Len; // The total number of attribute info
// words currently defined
Uint32 theAI_LenInCurrAI; // The number of words defined in the
// current ATTRINFO signal
NdbApiSignal* theFirstKEYINFO; // The first KEYINFO signal object
NdbApiSignal* theLastKEYINFO; // The first KEYINFO signal object
class NdbLabel* theFirstLabel;
@@ -879,8 +886,8 @@ protected:
Uint32* theKEYINFOptr; // Pointer to where to write KEYINFO
Uint32* theATTRINFOptr; // Pointer to where to write ATTRINFO
const class NdbTableImpl* m_currentTable; // The current table
const class NdbTableImpl* m_accessTable;
const class NdbTableImpl* m_currentTable; // The current table
const class NdbTableImpl* m_accessTable; // Index table (== current for pk)
// Set to TRUE when a tuple key attribute has been defined.
Uint32 theTupleKeyDefined[NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY][3];
@@ -888,13 +895,14 @@ protected:
Uint32 theTotalNrOfKeyWordInSignal; // The total number of
// keyword in signal.
Uint32 theTupKeyLen; // Length of the tuple key in words
Uint32 theNoOfTupKeyDefined; // The number of tuple key attributes
// currently defined
OperationType theOperationType; // Read Request, Update Req......
Uint32 theTupKeyLen; // Length of the tuple key in words
// left until done
Uint8 theNoOfTupKeyLeft; // The number of tuple key attributes
OperationType theOperationType; // Read Request, Update Req......
LockMode theLockMode; // Can be set to WRITE if read operation
OperationStatus theStatus; // The status of the operation.
Uint32 theMagicNumber; // Magic number to verify that object
// is correct
Uint32 theScanInfo; // Scan info bits (take over flag etc)
@@ -906,12 +914,12 @@ protected:
Uint32 theFinalUpdateSize; // Size of final updates for interpretation
Uint32 theFinalReadSize; // Size of final reads for interpretation
Uint8 theStartIndicator; // Indicator of whether start operation
Uint8 theCommitIndicator; // Indicator of whether commit operation
Uint8 theSimpleIndicator; // Indicator of whether simple operation
Uint8 theDirtyIndicator; // Indicator of whether dirty operation
Uint8 theInterpretIndicator; // Indicator of whether interpreted operation
Uint8 theDistrKeyIndicator; // Indicates whether distr. key is used
Uint8 theStartIndicator; // Indicator of whether start operation
Uint8 theCommitIndicator; // Indicator of whether commit operation
Uint8 theSimpleIndicator; // Indicator of whether simple operation
Uint8 theDirtyIndicator; // Indicator of whether dirty operation
Uint8 theInterpretIndicator; // Indicator of whether interpreted operation
Int8 theDistrKeyIndicator_; // Indicates whether distr. key is used
Uint16 m_tcReqGSN;
Uint16 m_keyInfoGSN;