NdbIndexScanOperation Class Reference

Class of scan operations for use to scan ordered index. More...

#include <NdbIndexScanOperation.hpp>

Inheritance diagram for NdbIndexScanOperation:

NdbScanOperation NdbOperation

List of all members.

Classes

struct  IndexBound
struct  OldApiBoundInfo
struct  OldApiScanRangeDefinition

Public Types

enum  BoundType {
  BoundLE = 0, BoundLT = 1, BoundGE = 2, BoundGT = 3,
  BoundEQ = 4
}
enum  { MaxRangeNo = 0xfff }
enum  ScanFlag {
  SF_TupScan = (1 << 16), SF_DiskScan = (2 << 16), SF_OrderBy = (1 << 24), SF_OrderByFull = (16 << 24),
  SF_Descending = (2 << 24), SF_ReadRangeNo = (4 << 24), SF_MultiRange = (8 << 24), SF_KeyInfo = 1
}

Public Member Functions

virtual int readTuples (LockMode lock_mode=LM_Read, Uint32 scan_flags=0, Uint32 parallel=0, Uint32 batch=0)
int setBound (const char *attr, int type, const void *value, Uint32 len)
int setBound (const char *attr, int type, const void *value)
int setBound (Uint32 anAttrId, int type, const void *aValue, Uint32 len)
int setBound (Uint32 anAttrId, int type, const void *aValue)
int end_of_bound (Uint32 range_no=0)
int get_range_no ()
int setBound (const NdbRecord *key_record, const IndexBound &bound)
int setBound (const NdbRecord *key_record, const IndexBound &bound, const Ndb::PartitionSpec *partInfo, Uint32 sizeOfPartInfo=0)
bool getSorted () const
bool getDescending () const
int readTuples (int parallell)
int readTuplesExclusive (int parallell=0)
int nextResult (bool fetchAllowed=true, bool forceSend=false)
int nextResult (const char **out_row_ptr, bool fetchAllowed, bool forceSend)
void close (bool forceSend=false, bool releaseOp=false)
NdbOperationlockCurrentTuple ()
NdbOperationlockCurrentTuple (NdbTransaction *lockTrans)
const NdbOperationlockCurrentTuple (NdbTransaction *takeOverTrans, const NdbRecord *result_rec, char *result_row=0, const unsigned char *result_mask=0, const NdbOperation::OperationOptions *opts=0, Uint32 sizeOfOptions=0)
NdbOperationupdateCurrentTuple ()
NdbOperationupdateCurrentTuple (NdbTransaction *updateTrans)
const NdbOperationupdateCurrentTuple (NdbTransaction *takeOverTrans, const NdbRecord *attr_rec, const char *attr_row, const unsigned char *mask=0, const NdbOperation::OperationOptions *opts=0, Uint32 sizeOfOptions=0)
int deleteCurrentTuple ()
int deleteCurrentTuple (NdbTransaction *takeOverTransaction)
const NdbOperationdeleteCurrentTuple (NdbTransaction *takeOverTrans, const NdbRecord *result_rec, char *result_row=0, const unsigned char *result_mask=0, const NdbOperation::OperationOptions *opts=0, Uint32 sizeOfOptions=0)
NdbTransactiongetNdbTransaction () const
bool getPruned () const
LockMode getLockMode () const
AbortOption getAbortOption () const
int setAbortOption (AbortOption)
Specify Search Conditions
int equal (const char *anAttrName, const char *aValue, Uint32 len)
int equal (const char *anAttrName, const char *aValue)
int equal (const char *anAttrName, Int32 aValue)
int equal (const char *anAttrName, Uint32 aValue)
int equal (const char *anAttrName, Int64 aValue)
int equal (const char *anAttrName, Uint64 aValue)
int equal (Uint32 anAttrId, const char *aValue, Uint32 len)
int equal (Uint32 anAttrId, const char *aValue)
int equal (Uint32 anAttrId, Int32 aValue)
int equal (Uint32 anAttrId, Uint32 aValue)
int equal (Uint32 anAttrId, Int64 aValue)
int equal (Uint32 anAttrId, Uint64 aValue)
Specify Attribute Actions for Operations
NdbRecAttrgetValue (const char *anAttrName, char *aValue=0)
NdbRecAttrgetValue (Uint32 anAttrId, char *aValue=0)
NdbRecAttrgetValue (const NdbDictionary::Column *, char *val=0)
int setValue (const char *anAttrName, const char *aValue, Uint32 len)
int setValue (const char *anAttrName, const char *aValue)
int setValue (const char *anAttrName, Int32 aValue)
int setValue (const char *anAttrName, Uint32 aValue)
int setValue (const char *anAttrName, Int64 aValue)
int setValue (const char *anAttrName, Uint64 aValue)
int setValue (const char *anAttrName, float aValue)
int setValue (const char *anAttrName, double aValue)
int setValue (Uint32 anAttrId, const char *aValue, Uint32 len)
int setValue (Uint32 anAttrId, const char *aValue)
int setValue (Uint32 anAttrId, Int32 aValue)
int setValue (Uint32 anAttrId, Uint32 aValue)
int setValue (Uint32 anAttrId, Int64 aValue)
int setValue (Uint32 anAttrId, Uint64 aValue)
int setValue (Uint32 anAttrId, float aValue)
int setValue (Uint32 anAttrId, double aValue)
virtual NdbBlobgetBlobHandle (const char *anAttrName)
virtual NdbBlobgetBlobHandle (Uint32 anAttrId)
virtual NdbBlobgetBlobHandle (const char *anAttrName) const
virtual NdbBlobgetBlobHandle (Uint32 anAttrId) const
Error Handling
const NdbErrorgetNdbError () const
int getNdbErrorLine ()
int getNdbErrorLine () const
const char * getTableName () const
const NdbDictionary::TablegetTable () const
const Type getType () const

Protected Types

enum  ScanPruningState { SPS_UNKNOWN, SPS_FIXED, SPS_ONE_PARTITION, SPS_MULTI_PARTITION }
enum  OperationStatus {
  Init, OperationDefined, TupleKeyDefined, GetValue,
  SetValue, ExecInterpretedValue, SetValueInterpreted, FinalGetValue,
  SubroutineExec, SubroutineEnd, WaitResponse, Finished,
  UseNdbRecord
}

Protected Member Functions

NdbRecAttrgetValue_NdbRecord_scan (const NdbColumnImpl *, char *aValue)
NdbRecAttrgetValue_NdbRecAttr_scan (const NdbColumnImpl *, char *aValue)
int handleScanGetValuesOldApi ()
int addInterpretedCode ()
int handleScanOptionsVersion (const ScanOptions *&optionsPtr, Uint32 sizeOfOptions, ScanOptions &currOptions)
int handleScanOptions (const ScanOptions *options)
int validatePartInfoPtr (const Ndb::PartitionSpec *&partInfo, Uint32 sizeOfPartInfo, Ndb::PartitionSpec &partValue)
int getPartValueFromInfo (const Ndb::PartitionSpec *partInfo, const NdbTableImpl *table, Uint32 *partValue)
int generatePackedReadAIs (const NdbRecord *reseult_record, bool &haveBlob)
int scanImpl (const NdbScanOperation::ScanOptions *options)
int scanTableImpl (const NdbRecord *result_record, NdbOperation::LockMode lock_mode, const unsigned char *result_mask, const NdbScanOperation::ScanOptions *options, Uint32 sizeOfOptions)
int nextResultNdbRecord (const char *&out_row, bool fetchAllowed, bool forceSend)
virtual void release ()
int close_impl (class TransporterFacade *, bool forceSend, PollGuard *poll_guard)
NdbInterpretedCodeallocInterpretedCodeOldApi ()
void freeInterpretedCodeOldApi ()
int doSendSetAISectionSizes ()
int executeCursor (int ProcessorId)
int init (const NdbTableImpl *tab, NdbTransaction *)
int init (const class NdbTableImpl *, NdbTransaction *aCon, bool useRec)
int prepareSend (Uint32 TC_ConnectPtr, Uint64 TransactionId)
virtual int prepareSend (Uint32 TC_ConnectPtr, Uint64 TransactionId, AbortOption)
int doSend (int ProcessorId)
int doSend (int ProcessorId, Uint32 lastFlag)
virtual void setReadLockMode (LockMode lockMode)
virtual void setErrorCode (int aErrorCode)
virtual void setErrorCode (int aErrorCode) const
virtual void setErrorCodeAbort (int aErrorCode)
virtual void setErrorCodeAbort (int aErrorCode) const
int getFirstATTRINFOScan ()
Uint32 calcGetValueSize ()
int doSendScan (int ProcessorId)
int finaliseScanOldApi ()
int prepareSendScan (Uint32 TC_ConnectPtr, Uint64 TransactionId)
int fix_receivers (Uint32 parallel)
void reset_receivers (Uint32 parallel, Uint32 ordered)
int send_next_scan (Uint32 cnt, bool close)
void receiver_delivered (NdbReceiver *)
void receiver_completed (NdbReceiver *)
void execCLOSE_SCAN_REP ()
int getKeyFromKEYINFO20 (Uint32 *data, Uint32 &size)
NdbOperationtakeOverScanOp (OperationType opType, NdbTransaction *)
NdbOperationtakeOverScanOpNdbRecord (OperationType opType, NdbTransaction *pTrans, const NdbRecord *record, char *row, const unsigned char *mask, const NdbOperation::OperationOptions *opts, Uint32 sizeOfOptions)
virtual int processTableScanDefs (LockMode lock_mode, Uint32 scan_flags, Uint32 parallel, Uint32 batch)
int setValue (const NdbColumnImpl *anAttrObject, const char *aValue)
NdbBlobgetBlobHandle (NdbTransaction *aCon, const NdbColumnImpl *anAttrObject)
NdbBlobgetBlobHandle (NdbTransaction *aCon, const NdbColumnImpl *anAttrObject) const
bool needReply ()
void initInterpreter ()
void next (NdbOperation *)
NdbOperationnext ()
OperationStatus Status ()
void Status (OperationStatus)
void NdbCon (NdbTransaction *)
void postExecuteRelease ()
void setStartIndicator ()
int doSendNdbRecord (int aNodeId)
virtual void setLastFlag (NdbApiSignal *signal, Uint32 lastFlag)
int prepareSendInterpreted ()
int initInterpretedInfo (const NdbInterpretedCode *code, Uint32 *&interpretedInfo, Uint32 *stackSpace, Uint32 stackSpaceEntries, Uint32 *&dynamicSpace)
void freeInterpretedInfo (Uint32 *&dynamicSpace)
int buildInterpretedProgramSignals (Uint32 aTC_ConnectPtr, Uint64 aTransId, Uint32 **attrInfoPtr, Uint32 *remain, const NdbInterpretedCode *code, Uint32 *interpretedWorkspace, bool mainProgram, Uint32 &wordsWritten)
int buildSignalsNdbRecord (Uint32 aTC_ConnectPtr, Uint64 aTransId)
int prepareSendNdbRecord (AbortOption ao)
Uint32 fillTcKeyReqHdr (TcKeyReq *tcKeyReq, Uint32 connectPtr, Uint64 transId)
int allocKeyInfo ()
int allocAttrInfo ()
int insertKEYINFO_NdbRecord (const char *value, Uint32 byteSize)
int insertATTRINFOHdr_NdbRecord (Uint32 attrId, Uint32 attrLen)
int insertATTRINFOData_NdbRecord (const char *value, Uint32 size)
int receiveTCKEYREF (NdbApiSignal *)
int checkMagicNumber (bool b=true)
int checkState_TransId (NdbApiSignal *aSignal)
NdbRecAttrgetValue_NdbRecord (const NdbColumnImpl *tAttrInfo, char *aValue)
int incValue (const NdbColumnImpl *anAttrObject, Uint32 aValue)
int incValue (const NdbColumnImpl *anAttrObject, Uint64 aValue)
int subValue (const NdbColumnImpl *anAttrObject, Uint32 aValue)
int subValue (const NdbColumnImpl *anAttrObject, Uint64 aValue)
int read_attr (const NdbColumnImpl *anAttrObject, Uint32 RegDest)
int write_attr (const NdbColumnImpl *anAttrObject, Uint32 RegSource)
int branch_reg_reg (Uint32 type, Uint32, Uint32, Uint32)
int branch_col (Uint32 type, Uint32, const void *, Uint32, Uint32 Label)
int branch_col_null (Uint32 type, Uint32 col, Uint32 Label)
NdbBloblinkInBlobHandle (NdbTransaction *aCon, const NdbColumnImpl *column, NdbBlob *&lastPtr)
int getBlobHandlesNdbRecord (NdbTransaction *aCon)
int getBlobHandlesNdbRecordDelete (NdbTransaction *aCon, bool checkReadSet)
int insertATTRINFO (Uint32 aData)
int insertATTRINFOloop (const Uint32 *aDataPtr, Uint32 aLength)
int insertKEYINFO (const char *aValue, Uint32 aStartPosition, Uint32 aKeyLenInByte)
void reorderKEYINFO ()
bool isNdbRecordOperation ()
int incCheck (const NdbColumnImpl *anAttrObject)
int initial_interpreterCheck ()
int intermediate_interpreterCheck ()
int read_attrCheck (const NdbColumnImpl *anAttrObject)
int write_attrCheck (const NdbColumnImpl *anAttrObject)
int labelCheck ()
int insertCall (Uint32 aCall)
int insertBranch (Uint32 aBranch)
Uint32 ptr2int ()
int getKeyFromTCREQ (Uint32 *data, Uint32 &size)
NdbRecAttrgetVarValue (const NdbColumnImpl *, char *aBareValue, Uint16 *aLenLoc)
int setVarValue (const NdbColumnImpl *, const char *aBareValue, const Uint16 &aLen)
Uint32 repack_read (Uint32 len)

Static Protected Member Functions

static int handleOperationOptions (const OperationType type, const OperationOptions *opts, const Uint32 sizeOfOptions, NdbOperation *op)

Protected Attributes

NdbTransactionm_transConnection
Uint32 theParallelism
Uint32 m_keyInfo
Uint32 * m_array
Uint32 m_allocated_receivers
NdbReceiver ** m_receivers
Uint32 * m_prepared_receivers
Uint32 m_current_api_receiver
Uint32 m_api_receivers_count
NdbReceiver ** m_api_receivers
Uint32 m_conf_receivers_count
NdbReceiver ** m_conf_receivers
Uint32 m_sent_receivers_count
NdbReceiver ** m_sent_receivers
bool m_ordered
bool m_descending
Uint32 m_read_range_no
NdbRecAttrm_curr_row
bool m_multi_range
bool m_executed
char * m_scan_buffer
bool m_scanUsingOldApi
bool m_readTuplesCalled
LockMode m_savedLockModeOldApi
Uint32 m_savedScanFlagsOldApi
Uint32 m_savedParallelOldApi
Uint32 m_savedBatchOldApi
NdbInterpretedCodem_interpretedCodeOldApi
ScanPruningState m_pruneState
Uint32 m_pruningKey
Type m_type
NdbReceiver theReceiver
NdbError theError
int theErrorLine
NdbtheNdb
NdbTransactiontheNdbCon
NdbOperationtheNext
union {
   NdbApiSignal *   theTCREQ
   NdbApiSignal *   theSCAN_TABREQ
   NdbApiSignal *   theRequest
}; 
NdbApiSignal * theFirstATTRINFO
NdbApiSignal * theCurrentATTRINFO
Uint32 theTotalCurrAI_Len
Uint32 theAI_LenInCurrAI
NdbApiSignal * theLastKEYINFO
class NdbLabel * theFirstLabel
class NdbLabel * theLastLabel
class NdbBranch * theFirstBranch
class NdbBranch * theLastBranch
class NdbCall * theFirstCall
class NdbCall * theLastCall
class NdbSubroutine * theFirstSubroutine
class NdbSubroutine * theLastSubroutine
Uint32 theNoOfLabels
Uint32 theNoOfSubroutines
Uint32 * theKEYINFOptr
Uint32 keyInfoRemain
Uint32 * theATTRINFOptr
Uint32 attrInfoRemain
class NdbTableImpl * m_currentTable
class NdbTableImpl * m_accessTable
Uint32 theTupleKeyDefined [NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY][3]
Uint32 theTotalNrOfKeyWordInSignal
Uint32 theTupKeyLen
Uint8 theNoOfTupKeyLeft
OperationType theOperationType
LockMode theLockMode
OperationStatus theStatus
Uint32 theMagicNumber
Uint32 theScanInfo
Uint32 theDistributionKey
Uint32 theSubroutineSize
Uint32 theInitialReadSize
Uint32 theInterpretedSize
Uint32 theFinalUpdateSize
Uint32 theFinalReadSize
Uint8 theStartIndicator
Uint8 theCommitIndicator
Uint8 theSimpleIndicator
Uint8 theDirtyIndicator
Uint8 theInterpretIndicator
Int8 theDistrKeyIndicator_
Uint8 m_no_disk_flag
Uint8 m_use_any_value
Uint16 m_tcReqGSN
Uint16 m_keyInfoGSN
Uint16 m_attrInfoGSN
const NdbRecord * m_key_record
const char * m_key_row
Uint32 m_keyinfo_length
const NdbRecord * m_attribute_record
const char * m_attribute_row
Uint32 m_read_mask [(NDB_MAX_ATTRIBUTES_IN_TABLE+31)>>5]
const NdbInterpretedCodem_interpreted_code
const SetValueSpecm_extraSetValues
Uint32 m_numExtraSetValues
Uint32 m_any_value
NdbBlobtheBlobList
Int8 m_abortOption
Int8 m_noErrorPropagation

Private Member Functions

 NdbIndexScanOperation (Ndb *aNdb)
virtual ~NdbIndexScanOperation ()
int processIndexScanDefs (LockMode lm, Uint32 scan_flags, Uint32 parallel, Uint32 batch)
int scanIndexImpl (const NdbRecord *key_record, const NdbRecord *result_record, NdbOperation::LockMode lock_mode, const unsigned char *result_mask, const NdbIndexScanOperation::IndexBound *bound, const NdbScanOperation::ScanOptions *options, Uint32 sizeOfOptions)
int setBoundHelperOldApi (OldApiBoundInfo &boundInfo, Uint32 maxKeyRecordBytes, Uint32 index_attrId, Uint32 valueLen, bool inclusive, Uint32 byteOffset, Uint32 nullbit_byte_offset, Uint32 nullbit_bit_in_byte, const void *aValue)
int setBound (const NdbColumnImpl *, int type, const void *aValue)
int buildIndexBoundOldApi (int range_no)
const IndexBoundgetIndexBoundFromRecAttr (NdbRecAttr *recAttr)
void releaseIndexBoundsOldApi ()
int ndbrecord_insert_bound (const NdbRecord *key_record, Uint32 column_index, const char *row, Uint32 bound_type, Uint32 *&firstWordOfBound)
int insert_open_bound (const NdbRecord *key_record, Uint32 *&firstWordOfBound)
virtual int equal_impl (const NdbColumnImpl *, const char *)
virtual NdbRecAttrgetValue_impl (const NdbColumnImpl *, char *)
int getDistKeyFromRange (const NdbRecord *key_record, const NdbRecord *result_record, const char *row, Uint32 *distKey)
void fix_get_values ()
int next_result_ordered (bool fetchAllowed, bool forceSend=false)
int next_result_ordered_ndbrecord (const char *&out_row, bool fetchAllowed, bool forceSend)
void ordered_insert_receiver (Uint32 start, NdbReceiver *receiver)
int ordered_send_scan_wait_for_all (bool forceSend)
int send_next_scan_ordered (Uint32 idx)
int compare (Uint32 key, Uint32 cols, const NdbReceiver *, const NdbReceiver *)
int compare_ndbrecord (const NdbReceiver *r1, const NdbReceiver *r2) const

Private Attributes

Uint32 m_sort_columns
Uint32 m_num_bounds
Uint32 m_previous_range_num
NdbRecAttrfirstRangeOldApi
NdbRecAttrlastRangeOldApi
NdbRecAttrcurrentRangeOldApi

Friends

struct Ndb_free_list_t< NdbIndexScanOperation >
struct Ndb_free_list_t< NdbOperation >

Define Standard Operation Type

enum  Type { PrimaryKeyAccess, UniqueIndexAccess, TableScan, OrderedIndexScan }
enum  LockMode { LM_Read, LM_Exclusive, LM_SimpleRead = 3 }
enum  AbortOption { DefaultAbortOption = -1, AbortOnError = 0, AO_IgnoreError = 2 }
virtual int insertTuple ()
virtual int updateTuple ()
virtual int writeTuple ()
virtual int deleteTuple ()
virtual int readTuple (LockMode)
virtual int readTuple ()
virtual int readTupleExclusive ()
virtual int simpleRead ()
virtual int dirtyRead ()
virtual int committedRead ()
virtual int dirtyUpdate ()
virtual int dirtyWrite ()


Detailed Description

Class of scan operations for use to scan ordered index.

Member Enumeration Documentation

anonymous enum

Enumerator:
MaxRangeNo 

enum NdbOperation::AbortOption [inherited]

How should transaction be handled if operation fails.

If AO_IgnoreError, a failure in one operation will not abort the transaction, and NdbTransaction::execute() will return 0 (success). Use NdbOperation::getNdbError() to check for errors from individual operations.

If AbortOnError, a failure in one operation will abort the transaction and cause NdbTransaction::execute() to return -1.

Abort option can be set on execute(), or in the individual operation. Setting AO_IgnoreError or AbortOnError in execute() overrides the settings on individual operations. Setting DefaultAbortOption in execute() (the default) causes individual operation settings to be used.

For READ, default is AO_IgnoreError DML, default is AbortOnError CommittedRead does _only_ support AO_IgnoreError

Enumerator:
DefaultAbortOption  Use default as specified by op-type.
AbortOnError  Abort transaction on failed operation.
AO_IgnoreError  Transaction continues on failed operation.

Type of ordered index key bound. The values (0-4) will not change and can be used explicitly (e.g. they could be computed).

Enumerator:
BoundLE  lower bound
BoundLT  lower bound, strict
BoundGE  upper bound
BoundGT  upper bound, strict
BoundEQ  equality

enum NdbOperation::LockMode [inherited]

Lock when performing read

Enumerator:
LM_Read  Read with shared lock.
LM_Exclusive  Read with exclusive lock.
LM_SimpleRead  Ignore locks, read last committed value.

Read with shared lock, but release lock directly

enum NdbOperation::OperationStatus [protected, inherited]

Enumerator:
Init 
OperationDefined 
TupleKeyDefined 
GetValue 
SetValue 
ExecInterpretedValue 
SetValueInterpreted 
FinalGetValue 
SubroutineExec 
SubroutineEnd 
WaitResponse 
Finished 
UseNdbRecord 

enum NdbScanOperation::ScanFlag [inherited]

Scan flags. OR-ed together and passed as second argument to readTuples. Note that SF_MultiRange has to be set if several ranges (bounds) are to be passed.

Enumerator:
SF_TupScan 
SF_DiskScan 
SF_OrderBy 
SF_OrderByFull  Same as order by, except that it will automatically add all key columns into the read-mask
SF_Descending 
SF_ReadRangeNo 
SF_MultiRange 
SF_KeyInfo 

enum NdbScanOperation::ScanPruningState [protected, inherited]

Enumerator:
SPS_UNKNOWN 
SPS_FIXED 
SPS_ONE_PARTITION 
SPS_MULTI_PARTITION 

enum NdbOperation::Type [inherited]

Different access types (supported by sub-classes of NdbOperation)

Enumerator:
PrimaryKeyAccess  Read, insert, update, or delete using pk.
UniqueIndexAccess  Read, update, or delete using unique index.
TableScan  Full table scan.
OrderedIndexScan  Ordered index scan.


Constructor & Destructor Documentation

NdbIndexScanOperation::NdbIndexScanOperation ( Ndb aNdb  )  [private]

virtual NdbIndexScanOperation::~NdbIndexScanOperation (  )  [private, virtual]


Member Function Documentation

int NdbScanOperation::addInterpretedCode (  )  [protected, inherited]

int NdbOperation::allocAttrInfo (  )  [protected, inherited]

NdbInterpretedCode* NdbScanOperation::allocInterpretedCodeOldApi (  )  [protected, inherited]

int NdbOperation::allocKeyInfo (  )  [protected, inherited]

int NdbOperation::branch_col ( Uint32  type,
Uint32  ,
const void *  ,
Uint32  ,
Uint32  Label 
) [protected, inherited]

int NdbOperation::branch_col_null ( Uint32  type,
Uint32  col,
Uint32  Label 
) [protected, inherited]

int NdbOperation::branch_reg_reg ( Uint32  type,
Uint32  ,
Uint32  ,
Uint32   
) [protected, inherited]

int NdbIndexScanOperation::buildIndexBoundOldApi ( int  range_no  )  [private]

int NdbOperation::buildInterpretedProgramSignals ( Uint32  aTC_ConnectPtr,
Uint64  aTransId,
Uint32 **  attrInfoPtr,
Uint32 *  remain,
const NdbInterpretedCode code,
Uint32 *  interpretedWorkspace,
bool  mainProgram,
Uint32 &  wordsWritten 
) [protected, inherited]

int NdbOperation::buildSignalsNdbRecord ( Uint32  aTC_ConnectPtr,
Uint64  aTransId 
) [protected, inherited]

Uint32 NdbScanOperation::calcGetValueSize (  )  [protected, inherited]

int NdbOperation::checkMagicNumber ( bool  b = true  )  [protected, inherited]

int NdbOperation::checkState_TransId ( NdbApiSignal *  aSignal  )  [protected, inherited]

void NdbScanOperation::close ( bool  forceSend = false,
bool  releaseOp = false 
) [inherited]

Close scan

int NdbScanOperation::close_impl ( class TransporterFacade *  ,
bool  forceSend,
PollGuard *  poll_guard 
) [protected, inherited]

virtual int NdbOperation::committedRead (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type committedRead. When calling NdbTransaction::execute, this operation read latest committed value of the record.

This means that if another transaction is updating the record, then the current transaction will not wait. It will instead use the latest committed value of the record.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

int NdbIndexScanOperation::compare ( Uint32  key,
Uint32  cols,
const NdbReceiver *  ,
const NdbReceiver *   
) [private]

int NdbIndexScanOperation::compare_ndbrecord ( const NdbReceiver *  r1,
const NdbReceiver *  r2 
) const [private]

const NdbOperation * NdbScanOperation::deleteCurrentTuple ( NdbTransaction takeOverTrans,
const NdbRecord *  result_rec,
char *  result_row = 0,
const unsigned char *  result_mask = 0,
const NdbOperation::OperationOptions opts = 0,
Uint32  sizeOfOptions = 0 
) [inline, inherited]

int NdbScanOperation::deleteCurrentTuple ( NdbTransaction takeOverTransaction  )  [inline, inherited]

Delete current tuple

Parameters:
takeOverTransaction Transaction that should perform the delete
Returns:
0 on success or -1 on failure

int NdbScanOperation::deleteCurrentTuple (  )  [inline, inherited]

Delete current tuple

Returns:
0 on success or -1 on failure

virtual int NdbOperation::deleteTuple (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type deleteTuple. When calling NdbTransaction::execute, this operation delete a tuple.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

virtual int NdbOperation::dirtyRead (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type committedRead. When calling NdbTransaction::execute, this operation read latest committed value of the record.

This means that if another transaction is updating the record, then the current transaction will not wait. It will instead use the latest committed value of the record. dirtyRead is a deprecated name for committedRead

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

virtual int NdbOperation::dirtyUpdate (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type dirtyUpdate. When calling NdbTransaction::execute, this operation updates without two-phase commit.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

virtual int NdbOperation::dirtyWrite (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type dirtyWrite. When calling NdbTransaction::execute, this operation writes without two-phase commit.

Returns:
0 if successful otherwise -1.

int NdbOperation::doSend ( int  ProcessorId,
Uint32  lastFlag 
) [protected, inherited]

int NdbScanOperation::doSend ( int  ProcessorId  )  [protected, inherited]

int NdbOperation::doSendNdbRecord ( int  aNodeId  )  [protected, inherited]

int NdbScanOperation::doSendScan ( int  ProcessorId  )  [protected, inherited]

int NdbScanOperation::doSendSetAISectionSizes (  )  [protected, inherited]

int NdbIndexScanOperation::end_of_bound ( Uint32  range_no = 0  ) 

This method is called to separate sets of bounds (ranges) when defining an Index Scan with multiple ranges It can only be used with scans defined using the SF_MultiRange scan flag. For NdbRecord, ranges are specified using the IndexBound structure and the setBound() API. If an index scan has more than one range then end_of_bound must be called after every range, including the last. If the SF_ReadRangeNo flag is set then the range_no supplied when the range is defined will be associated with each row returned from that range. This can be obtained by calling get_range_no(). If SF_ReadRangeNo and SF_OrderBy flags are provided then range_no values must be strictly increasing (i.e. starting at zero and getting larger by 1 for each range specified). This is to ensure that rows are returned in order.

int NdbOperation::equal ( Uint32  anAttrId,
Uint64  aValue 
) [inherited]

int NdbOperation::equal ( Uint32  anAttrId,
Int64  aValue 
) [inherited]

int NdbOperation::equal ( Uint32  anAttrId,
Uint32  aValue 
) [inherited]

int NdbOperation::equal ( Uint32  anAttrId,
Int32  aValue 
) [inherited]

int NdbOperation::equal ( Uint32  anAttrId,
const char *  aValue 
) [inherited]

int NdbOperation::equal ( Uint32  anAttrId,
const char *  aValue,
Uint32  len 
) [inherited]

int NdbOperation::equal ( const char *  anAttrName,
Uint64  aValue 
) [inherited]

int NdbOperation::equal ( const char *  anAttrName,
Int64  aValue 
) [inherited]

int NdbOperation::equal ( const char *  anAttrName,
Uint32  aValue 
) [inherited]

int NdbOperation::equal ( const char *  anAttrName,
Int32  aValue 
) [inherited]

int NdbOperation::equal ( const char *  anAttrName,
const char *  aValue 
) [inherited]

int NdbOperation::equal ( const char *  anAttrName,
const char *  aValue,
Uint32  len 
) [inherited]

Define a search condition with equality. The condition is true if the attribute has the given value. To set search conditions on multiple attributes, use several equals (then all of them must be satisfied for the tuple to be selected).

Note:
For insertTuple() it is also allowed to define the search key by using setValue().

There are 10 versions of equal() with slightly different parameters.

If attribute has fixed size, value must include all bytes. In particular a Char must be native-blank padded. If attribute has variable size, value must start with 1 or 2 little-endian length bytes (2 if Long*).

Parameters:
anAttrName Attribute name
aValue Attribute value.
Returns:
-1 if unsuccessful.

virtual int NdbIndexScanOperation::equal_impl ( const NdbColumnImpl *  ,
const char *   
) [private, virtual]

Reimplemented from NdbOperation.

void NdbScanOperation::execCLOSE_SCAN_REP (  )  [protected, inherited]

int NdbScanOperation::executeCursor ( int  ProcessorId  )  [protected, inherited]

Uint32 NdbOperation::fillTcKeyReqHdr ( TcKeyReq *  tcKeyReq,
Uint32  connectPtr,
Uint64  transId 
) [protected, inherited]

int NdbScanOperation::finaliseScanOldApi (  )  [protected, inherited]

void NdbIndexScanOperation::fix_get_values (  )  [private]

int NdbScanOperation::fix_receivers ( Uint32  parallel  )  [protected, inherited]

void NdbScanOperation::freeInterpretedCodeOldApi (  )  [protected, inherited]

void NdbOperation::freeInterpretedInfo ( Uint32 *&  dynamicSpace  )  [protected, inherited]

int NdbScanOperation::generatePackedReadAIs ( const NdbRecord *  reseult_record,
bool &  haveBlob 
) [protected, inherited]

int NdbIndexScanOperation::get_range_no (  ) 

Return range number for current row, as defined in the IndexBound structure used when the scan was defined. Only available if the SF_ReadRangeNo and SF_MultiRange flags were set in the ScanOptions::scan_flags structure passed to scanIndex().

AbortOption NdbOperation::getAbortOption (  )  const [inherited]

Get/set abort option

NdbBlob* NdbOperation::getBlobHandle ( NdbTransaction aCon,
const NdbColumnImpl *  anAttrObject 
) const [protected, inherited]

NdbBlob* NdbOperation::getBlobHandle ( NdbTransaction aCon,
const NdbColumnImpl *  anAttrObject 
) [protected, inherited]

virtual NdbBlob* NdbOperation::getBlobHandle ( Uint32  anAttrId  )  const [virtual, inherited]

virtual NdbBlob* NdbOperation::getBlobHandle ( const char *  anAttrName  )  const [virtual, inherited]

virtual NdbBlob* NdbOperation::getBlobHandle ( Uint32  anAttrId  )  [virtual, inherited]

virtual NdbBlob* NdbOperation::getBlobHandle ( const char *  anAttrName  )  [virtual, inherited]

This method replaces getValue/setValue for blobs. It creates a blob handle NdbBlob. A second call with same argument returns the previously created handle. The handle is linked to the operation and is maintained automatically.

See NdbBlob for details.

For NdbRecord operation, this method can be used to fetch the blob handle for an NdbRecord operation that references the blob, but extra blob columns can not be added with this call (it will return 0).

For reading with NdbRecord, the NdbRecord entry for each blob must reserve space in the row for sizeof(NdbBlob *). The blob handle will be stored there, providing an alternative way of obtaining the blob handle.

int NdbOperation::getBlobHandlesNdbRecord ( NdbTransaction aCon  )  [protected, inherited]

int NdbOperation::getBlobHandlesNdbRecordDelete ( NdbTransaction aCon,
bool  checkReadSet 
) [protected, inherited]

bool NdbIndexScanOperation::getDescending (  )  const [inline]

Is current scan sorted descending?

int NdbIndexScanOperation::getDistKeyFromRange ( const NdbRecord *  key_record,
const NdbRecord *  result_record,
const char *  row,
Uint32 *  distKey 
) [private]

int NdbScanOperation::getFirstATTRINFOScan (  )  [protected, inherited]

const IndexBound* NdbIndexScanOperation::getIndexBoundFromRecAttr ( NdbRecAttr recAttr  )  [private]

int NdbScanOperation::getKeyFromKEYINFO20 ( Uint32 *  data,
Uint32 &  size 
) [protected, inherited]

int NdbOperation::getKeyFromTCREQ ( Uint32 *  data,
Uint32 &  size 
) [protected, inherited]

LockMode NdbOperation::getLockMode (  )  const [inline, inherited]

Return lock mode for operation

const NdbError& NdbOperation::getNdbError (  )  const [inherited]

Get the latest error code.

Returns:
error code.

int NdbOperation::getNdbErrorLine (  )  const [inherited]

int NdbOperation::getNdbErrorLine (  )  [inherited]

Get the method number where the error occured.

Returns:
method number where the error occured.

NdbTransaction * NdbScanOperation::getNdbTransaction (  )  const [inline, virtual, inherited]

Get NdbTransaction object for this scan operation

Reimplemented from NdbOperation.

int NdbScanOperation::getPartValueFromInfo ( const Ndb::PartitionSpec partInfo,
const NdbTableImpl *  table,
Uint32 *  partValue 
) [protected, inherited]

bool NdbScanOperation::getPruned (  )  const [inherited]

Is scan operation pruned to a single table partition? For NdbRecord defined scans, valid before+after execute. For Old Api defined scans, valid only after execute.

bool NdbIndexScanOperation::getSorted (  )  const [inline]

Is current scan sorted?

const NdbDictionary::Table* NdbOperation::getTable (  )  const [inherited]

Get table object for this operation Not supported for NdbRecord operation.

const char* NdbOperation::getTableName (  )  const [inherited]

Get table name of this operation. Not supported for NdbRecord operation.

const Type NdbOperation::getType (  )  const [inherited]

Get the type of access for this operation

NdbRecAttr* NdbOperation::getValue ( const NdbDictionary::Column ,
char *  val = 0 
) [inherited]

NdbRecAttr* NdbOperation::getValue ( Uint32  anAttrId,
char *  aValue = 0 
) [inherited]

NdbRecAttr* NdbOperation::getValue ( const char *  anAttrName,
char *  aValue = 0 
) [inherited]

Defines a retrieval operation of an attribute value. The NDB API allocate memory for the NdbRecAttr object that will hold the returned attribute value.

Note:
Note that it is the applications responsibility to allocate enough memory for aValue (if non-NULL). The buffer aValue supplied by the application must be aligned appropriately. The buffer is used directly (avoiding a copy penalty) only if it is aligned on a 4-byte boundary and the attribute size in bytes (i.e. NdbRecAttr::attrSize times NdbRecAttr::arraySize is a multiple of 4).

There are two versions of NdbOperation::getValue with slightly different parameters.

This method does not fetch the attribute value from the database! The NdbRecAttr object returned by this method is not readable/printable before the transaction has been executed with NdbTransaction::execute.

Parameters:
anAttrName Attribute name
aValue If this is non-NULL, then the attribute value will be returned in this parameter.
If NULL, then the attribute value will only be stored in the returned NdbRecAttr object.
Returns:
An NdbRecAttr object to hold the value of the attribute, or a NULL pointer (indicating error).

virtual NdbRecAttr* NdbIndexScanOperation::getValue_impl ( const NdbColumnImpl *  ,
char *   
) [private, virtual]

Reimplemented from NdbScanOperation.

NdbRecAttr* NdbScanOperation::getValue_NdbRecAttr_scan ( const NdbColumnImpl *  ,
char *  aValue 
) [protected, inherited]

NdbRecAttr* NdbOperation::getValue_NdbRecord ( const NdbColumnImpl *  tAttrInfo,
char *  aValue 
) [protected, inherited]

NdbRecAttr* NdbScanOperation::getValue_NdbRecord_scan ( const NdbColumnImpl *  ,
char *  aValue 
) [protected, inherited]

NdbRecAttr* NdbOperation::getVarValue ( const NdbColumnImpl *  ,
char *  aBareValue,
Uint16 *  aLenLoc 
) [protected, inherited]

static int NdbOperation::handleOperationOptions ( const OperationType  type,
const OperationOptions opts,
const Uint32  sizeOfOptions,
NdbOperation op 
) [static, protected, inherited]

int NdbScanOperation::handleScanGetValuesOldApi (  )  [protected, inherited]

int NdbScanOperation::handleScanOptions ( const ScanOptions options  )  [protected, inherited]

int NdbScanOperation::handleScanOptionsVersion ( const ScanOptions *&  optionsPtr,
Uint32  sizeOfOptions,
ScanOptions currOptions 
) [protected, inherited]

int NdbOperation::incCheck ( const NdbColumnImpl *  anAttrObject  )  [protected, inherited]

int NdbOperation::incValue ( const NdbColumnImpl *  anAttrObject,
Uint64  aValue 
) [protected, inherited]

int NdbOperation::incValue ( const NdbColumnImpl *  anAttrObject,
Uint32  aValue 
) [protected, inherited]

int NdbOperation::init ( const class NdbTableImpl *  ,
NdbTransaction aCon,
bool  useRec 
) [protected, inherited]

int NdbScanOperation::init ( const NdbTableImpl *  tab,
NdbTransaction  
) [protected, inherited]

int NdbOperation::initial_interpreterCheck (  )  [protected, inherited]

int NdbOperation::initInterpretedInfo ( const NdbInterpretedCode code,
Uint32 *&  interpretedInfo,
Uint32 *  stackSpace,
Uint32  stackSpaceEntries,
Uint32 *&  dynamicSpace 
) [protected, inherited]

void NdbOperation::initInterpreter (  )  [protected, inherited]

int NdbIndexScanOperation::insert_open_bound ( const NdbRecord *  key_record,
Uint32 *&  firstWordOfBound 
) [private]

int NdbOperation::insertATTRINFO ( Uint32  aData  )  [protected, inherited]

int NdbOperation::insertATTRINFOData_NdbRecord ( const char *  value,
Uint32  size 
) [protected, inherited]

int NdbOperation::insertATTRINFOHdr_NdbRecord ( Uint32  attrId,
Uint32  attrLen 
) [protected, inherited]

int NdbOperation::insertATTRINFOloop ( const Uint32 *  aDataPtr,
Uint32  aLength 
) [protected, inherited]

int NdbOperation::insertBranch ( Uint32  aBranch  )  [protected, inherited]

int NdbOperation::insertCall ( Uint32  aCall  )  [protected, inherited]

int NdbOperation::insertKEYINFO ( const char *  aValue,
Uint32  aStartPosition,
Uint32  aKeyLenInByte 
) [protected, inherited]

int NdbOperation::insertKEYINFO_NdbRecord ( const char *  value,
Uint32  byteSize 
) [protected, inherited]

virtual int NdbOperation::insertTuple (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type insertTuple. When calling NdbTransaction::execute, this operation adds a new tuple to the table.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

int NdbOperation::intermediate_interpreterCheck (  )  [protected, inherited]

bool NdbOperation::isNdbRecordOperation (  )  [protected, inherited]

int NdbOperation::labelCheck (  )  [protected, inherited]

NdbBlob* NdbOperation::linkInBlobHandle ( NdbTransaction aCon,
const NdbColumnImpl *  column,
NdbBlob *&  lastPtr 
) [protected, inherited]

const NdbOperation* NdbScanOperation::lockCurrentTuple ( NdbTransaction takeOverTrans,
const NdbRecord *  result_rec,
char *  result_row = 0,
const unsigned char *  result_mask = 0,
const NdbOperation::OperationOptions opts = 0,
Uint32  sizeOfOptions = 0 
) [inherited]

NdbOperation * NdbScanOperation::lockCurrentTuple ( NdbTransaction lockTrans  )  [inline, inherited]

Lock current tuple

Parameters:
lockTrans Transaction that should perform the lock
Returns:
an NdbOperation or NULL.

NdbOperation * NdbScanOperation::lockCurrentTuple (  )  [inline, inherited]

Lock current tuple

Returns:
an NdbOperation or NULL.

void NdbOperation::NdbCon ( NdbTransaction  )  [protected, inherited]

int NdbIndexScanOperation::ndbrecord_insert_bound ( const NdbRecord *  key_record,
Uint32  column_index,
const char *  row,
Uint32  bound_type,
Uint32 *&  firstWordOfBound 
) [private]

bool NdbOperation::needReply (  )  [protected, inherited]

NdbOperation* NdbOperation::next (  )  [protected, inherited]

void NdbOperation::next ( NdbOperation  )  [protected, inherited]

int NdbIndexScanOperation::next_result_ordered ( bool  fetchAllowed,
bool  forceSend = false 
) [private]

int NdbIndexScanOperation::next_result_ordered_ndbrecord ( const char *&  out_row,
bool  fetchAllowed,
bool  forceSend 
) [private]

int NdbScanOperation::nextResult ( const char **  out_row_ptr,
bool  fetchAllowed,
bool  forceSend 
) [inherited]

int NdbScanOperation::nextResult ( bool  fetchAllowed = true,
bool  forceSend = false 
) [inherited]

Get the next tuple in a scan transaction.

After each call to nextResult the buffers and NdbRecAttr objects defined in NdbOperation::getValue are updated with values from the scanned tuple.

Parameters:
fetchAllowed If set to false, then fetching is disabled
forceSend If true send will occur immediately (see Adaptive Send Algorithm)
The NDB API will receive tuples from each fragment in batches, and needs to explicitly request from the NDB Kernel the sending of each new batch. When a new batch is requested, the NDB Kernel will remove any locks taken on rows in the previous batch, unless they have been already taken over by the application executing updateCurrentTuple(), lockCurrentTuple(), etc.

The fetchAllowed parameter is used to control this release of locks from the application. When fetchAllowed is set to false, the NDB API will not request new batches from the NDB Kernel when all received rows have been exhausted, but will instead return 2 from nextResult(), indicating that new batches must be requested. You must then call nextResult with fetchAllowed = true in order to contact the NDB Kernel for more records, after taking over locks as appropriate.

fetchAllowed = false is useful when you want to update or delete all the records fetched in one transaction(This will save a lot of round trip time and make updates or deletes of scanned records a lot faster).

While nextResult(false) returns 0, take over the record to another transaction. When nextResult(false) returns 2 you must execute and commit the other transaction. This will cause the locks to be transferred to the other transaction, updates or deletes will be made and then the locks will be released.

After that, call nextResult(true) which will fetch new records and cache them in the NdbApi.

Note:
If you don't take over the records to another transaction the locks on those records will be released the next time NDB Kernel is contacted for more records.

Please contact for examples of efficient scan updates and deletes.

See ndb/examples/ndbapi_scan_example for usage.

Returns:
  • -1: if unsuccessful,
  • 0: if another tuple was received, and
  • 1: if there are no more tuples to scan.
  • 2: if there are no more cached records in NdbApi

int NdbScanOperation::nextResultNdbRecord ( const char *&  out_row,
bool  fetchAllowed,
bool  forceSend 
) [protected, inherited]

void NdbIndexScanOperation::ordered_insert_receiver ( Uint32  start,
NdbReceiver *  receiver 
) [private]

int NdbIndexScanOperation::ordered_send_scan_wait_for_all ( bool  forceSend  )  [private]

void NdbOperation::postExecuteRelease (  )  [protected, inherited]

virtual int NdbOperation::prepareSend ( Uint32  TC_ConnectPtr,
Uint64  TransactionId,
AbortOption   
) [protected, virtual, inherited]

int NdbScanOperation::prepareSend ( Uint32  TC_ConnectPtr,
Uint64  TransactionId 
) [protected, inherited]

int NdbOperation::prepareSendInterpreted (  )  [protected, inherited]

int NdbOperation::prepareSendNdbRecord ( AbortOption  ao  )  [protected, inherited]

int NdbScanOperation::prepareSendScan ( Uint32  TC_ConnectPtr,
Uint64  TransactionId 
) [protected, inherited]

int NdbIndexScanOperation::processIndexScanDefs ( LockMode  lm,
Uint32  scan_flags,
Uint32  parallel,
Uint32  batch 
) [private]

virtual int NdbScanOperation::processTableScanDefs ( LockMode  lock_mode,
Uint32  scan_flags,
Uint32  parallel,
Uint32  batch 
) [protected, virtual, inherited]

Uint32 NdbOperation::ptr2int (  )  [inline, protected, inherited]

int NdbOperation::read_attr ( const NdbColumnImpl *  anAttrObject,
Uint32  RegDest 
) [protected, inherited]

int NdbOperation::read_attrCheck ( const NdbColumnImpl *  anAttrObject  )  [protected, inherited]

virtual int NdbOperation::readTuple (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type readTuple. When calling NdbTransaction::execute, this operation reads a tuple.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

virtual int NdbOperation::readTuple ( LockMode   )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type readTuple. When calling NdbTransaction::execute, this operation reads a tuple.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

virtual int NdbOperation::readTupleExclusive (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type readTupleExclusive. When calling NdbTransaction::execute, this operation read a tuple using an exclusive lock.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

int NdbScanOperation::readTuples ( int  parallell  )  [inline, inherited]

readTuples

Parameters:
lock_mode Lock mode
batch No of rows to fetch from each fragment at a time
parallel No of fragments to scan in parallell
Note:
specifying 0 for batch and parallel means max performance

virtual int NdbIndexScanOperation::readTuples ( LockMode  lock_mode = LM_Read,
Uint32  scan_flags = 0,
Uint32  parallel = 0,
Uint32  batch = 0 
) [virtual]

readTuples using ordered index This method is used to specify details for an old Api Index Scan operation.

Parameters:
lock_mode Lock mode
scan_flags see ScanFlag
parallel No of fragments to scan in parallel (0=max)

Reimplemented from NdbScanOperation.

int NdbScanOperation::readTuplesExclusive ( int  parallell = 0  )  [inline, inherited]

void NdbScanOperation::receiver_completed ( NdbReceiver *   )  [protected, inherited]

void NdbScanOperation::receiver_delivered ( NdbReceiver *   )  [protected, inherited]

int NdbOperation::receiveTCKEYREF ( NdbApiSignal *   )  [protected, inherited]

virtual void NdbScanOperation::release (  )  [protected, virtual, inherited]

Reimplemented from NdbOperation.

void NdbIndexScanOperation::releaseIndexBoundsOldApi (  )  [private]

void NdbOperation::reorderKEYINFO (  )  [protected, inherited]

Uint32 NdbOperation::repack_read ( Uint32  len  )  [protected, inherited]

void NdbScanOperation::reset_receivers ( Uint32  parallel,
Uint32  ordered 
) [protected, inherited]

int NdbScanOperation::scanImpl ( const NdbScanOperation::ScanOptions options  )  [protected, inherited]

int NdbIndexScanOperation::scanIndexImpl ( const NdbRecord *  key_record,
const NdbRecord *  result_record,
NdbOperation::LockMode  lock_mode,
const unsigned char *  result_mask,
const NdbIndexScanOperation::IndexBound bound,
const NdbScanOperation::ScanOptions options,
Uint32  sizeOfOptions 
) [private]

int NdbScanOperation::scanTableImpl ( const NdbRecord *  result_record,
NdbOperation::LockMode  lock_mode,
const unsigned char *  result_mask,
const NdbScanOperation::ScanOptions options,
Uint32  sizeOfOptions 
) [protected, inherited]

int NdbScanOperation::send_next_scan ( Uint32  cnt,
bool  close 
) [protected, inherited]

int NdbIndexScanOperation::send_next_scan_ordered ( Uint32  idx  )  [private]

int NdbOperation::setAbortOption ( AbortOption   )  [inherited]

int NdbIndexScanOperation::setBound ( const NdbColumnImpl *  ,
int  type,
const void *  aValue 
) [private]

int NdbIndexScanOperation::setBound ( const NdbRecord *  key_record,
const IndexBound bound,
const Ndb::PartitionSpec partInfo,
Uint32  sizeOfPartInfo = 0 
)

int NdbIndexScanOperation::setBound ( const NdbRecord *  key_record,
const IndexBound bound 
)

Add a range to an NdbRecord defined Index scan

This method is called to add a range to an IndexScan operation which has been defined with a call to NdbTransaction::scanIndex(). To add more than one range, the index scan operation must have been defined with the the SF_MultiRange flag set.

Where multiple numbered ranges are defined with multiple calls to setBound, and the scan is ordered, the range number for each range must be larger than the range number for the previously defined range.

When the application knows that rows in-range will only be found in a particular partition, a PartitionSpecification can be supplied. This may be used to limit the scan to a single partition, improving system efficiency The sizeOfPartInfo parameter should be set to the sizeof(PartitionSpec) to enable backwards compatibility.

Parameters:
key_record NdbRecord structure for the key the index is defined on
bound The bound to add
partInfo Extra information to enable a reduced set of partitions to be scanned.
sizeOfPartInfo 
Returns:
0 for Success, other for Failure.

int NdbIndexScanOperation::setBound ( Uint32  anAttrId,
int  type,
const void *  aValue 
)

int NdbIndexScanOperation::setBound ( Uint32  anAttrId,
int  type,
const void *  aValue,
Uint32  len 
) [inline]

Define bound on index key in range scan using index column id. See the other setBound() method for details.

int NdbIndexScanOperation::setBound ( const char *  attr,
int  type,
const void *  value 
)

int NdbIndexScanOperation::setBound ( const char *  attr,
int  type,
const void *  value,
Uint32  len 
) [inline]

Define bound on index key in range scan - old Api.

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.

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).

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 setBound with null pointer (0).

An index stores also all-NULL keys. Doing index scan with empty bound set returns all table tuples.

Parameters:
attr Attribute name, alternatively:
type Type of bound
value Pointer to bound value, 0 for NULL
Returns:
0 if successful otherwise -1
Note:
See comment under equal() about data format and length.

See the two parameter setBound variant for use with NdbRecord

int NdbIndexScanOperation::setBoundHelperOldApi ( OldApiBoundInfo boundInfo,
Uint32  maxKeyRecordBytes,
Uint32  index_attrId,
Uint32  valueLen,
bool  inclusive,
Uint32  byteOffset,
Uint32  nullbit_byte_offset,
Uint32  nullbit_bit_in_byte,
const void *  aValue 
) [private]

virtual void NdbOperation::setErrorCode ( int  aErrorCode  )  const [protected, virtual, inherited]

virtual void NdbScanOperation::setErrorCode ( int  aErrorCode  )  [protected, virtual, inherited]

virtual void NdbOperation::setErrorCodeAbort ( int  aErrorCode  )  const [protected, virtual, inherited]

virtual void NdbScanOperation::setErrorCodeAbort ( int  aErrorCode  )  [protected, virtual, inherited]

virtual void NdbOperation::setLastFlag ( NdbApiSignal *  signal,
Uint32  lastFlag 
) [protected, virtual, inherited]

virtual void NdbScanOperation::setReadLockMode ( LockMode  lockMode  )  [protected, virtual, inherited]

Reimplemented from NdbOperation.

void NdbOperation::setStartIndicator (  )  [protected, inherited]

int NdbOperation::setValue ( const NdbColumnImpl *  anAttrObject,
const char *  aValue 
) [protected, inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
double  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
float  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
Uint64  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
Int64  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
Uint32  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
Int32  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
const char *  aValue 
) [inherited]

int NdbOperation::setValue ( Uint32  anAttrId,
const char *  aValue,
Uint32  len 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
double  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
float  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
Uint64  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
Int64  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
Uint32  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
Int32  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
const char *  aValue 
) [inherited]

int NdbOperation::setValue ( const char *  anAttrName,
const char *  aValue,
Uint32  len 
) [inherited]

Define an attribute to set or update in query.

To set a NULL value, use the following construct:

   setValue("ATTR_NAME", (char*)NULL);

There are a number of NdbOperation::setValue methods that take a certain type as input (pass by value rather than passing a pointer). As the interface is currently implemented it is the responsibility of the application programmer to use the correct types.

The NDB API will however check that the application sends a correct length to the interface as given in the length parameter. The passing of char* as the value can contain any type or any type of array. If length is not provided or set to zero, then the API will assume that the pointer is correct and not bother with checking it.

Note:
For insertTuple() the NDB API will automatically detect that it is supposed to use equal() instead.

For insertTuple() it is not necessary to use setValue() on key attributes before other attributes.

There are 14 versions of NdbOperation::setValue with slightly different parameters.

See note under equal() about value format and length.

Parameters:
anAttrName Name (or Id) of attribute.
aValue Attribute value to set.
Returns:
-1 if unsuccessful.

int NdbOperation::setVarValue ( const NdbColumnImpl *  ,
const char *  aBareValue,
const Uint16 &  aLen 
) [protected, inherited]

virtual int NdbOperation::simpleRead (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type simpleRead. When calling NdbTransaction::execute, this operation reads an existing tuple (using shared read lock), but releases lock immediately after read.

Note:
Using this operation twice in the same transaction may produce different results (e.g. if there is another transaction which updates the value between the simple reads).
Note that simpleRead can read the value from any database node while standard read always read the value on the database node which is primary for the record.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

void NdbOperation::Status ( OperationStatus   )  [protected, inherited]

OperationStatus NdbOperation::Status (  )  [protected, inherited]

int NdbOperation::subValue ( const NdbColumnImpl *  anAttrObject,
Uint64  aValue 
) [protected, inherited]

int NdbOperation::subValue ( const NdbColumnImpl *  anAttrObject,
Uint32  aValue 
) [protected, inherited]

NdbOperation* NdbScanOperation::takeOverScanOp ( OperationType  opType,
NdbTransaction  
) [protected, inherited]

NdbOperation* NdbScanOperation::takeOverScanOpNdbRecord ( OperationType  opType,
NdbTransaction pTrans,
const NdbRecord *  record,
char *  row,
const unsigned char *  mask,
const NdbOperation::OperationOptions opts,
Uint32  sizeOfOptions 
) [protected, inherited]

const NdbOperation * NdbScanOperation::updateCurrentTuple ( NdbTransaction takeOverTrans,
const NdbRecord *  attr_rec,
const char *  attr_row,
const unsigned char *  mask = 0,
const NdbOperation::OperationOptions opts = 0,
Uint32  sizeOfOptions = 0 
) [inline, inherited]

NdbOperation * NdbScanOperation::updateCurrentTuple ( NdbTransaction updateTrans  )  [inline, inherited]

Update current tuple

Parameters:
updateTrans Transaction that should perform the update
Returns:
an NdbOperation or NULL.

NdbOperation * NdbScanOperation::updateCurrentTuple (  )  [inline, inherited]

Update current tuple

Returns:
an NdbOperation or NULL.

virtual int NdbOperation::updateTuple (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type updateTuple. When calling NdbTransaction::execute, this operation updates a tuple in the table.

Returns:
0 if successful otherwise -1.

Reimplemented in NdbIndexOperation.

int NdbScanOperation::validatePartInfoPtr ( const Ndb::PartitionSpec *&  partInfo,
Uint32  sizeOfPartInfo,
Ndb::PartitionSpec partValue 
) [protected, inherited]

int NdbOperation::write_attr ( const NdbColumnImpl *  anAttrObject,
Uint32  RegSource 
) [protected, inherited]

int NdbOperation::write_attrCheck ( const NdbColumnImpl *  anAttrObject  )  [protected, inherited]

virtual int NdbOperation::writeTuple (  )  [virtual, inherited]

Define the NdbOperation to be a standard operation of type writeTuple. When calling NdbTransaction::execute, this operation writes a tuple to the table. If the tuple exists, it updates it, otherwise an insert takes place.

Returns:
0 if successful otherwise -1.


Friends And Related Function Documentation

friend struct Ndb_free_list_t< NdbIndexScanOperation > [friend]

friend struct Ndb_free_list_t< NdbOperation > [friend, inherited]


Member Data Documentation

union { ... } [protected, inherited]

Uint32 NdbOperation::attrInfoRemain [protected, inherited]

Uint32 NdbOperation::keyInfoRemain [protected, inherited]

Int8 NdbOperation::m_abortOption [protected, inherited]

class NdbTableImpl* NdbOperation::m_accessTable [protected, inherited]

Uint32 NdbScanOperation::m_allocated_receivers [protected, inherited]

Uint32 NdbOperation::m_any_value [protected, inherited]

NdbReceiver** NdbScanOperation::m_api_receivers [protected, inherited]

Uint32 NdbScanOperation::m_api_receivers_count [protected, inherited]

Uint32* NdbScanOperation::m_array [protected, inherited]

const NdbRecord* NdbOperation::m_attribute_record [protected, inherited]

const char* NdbOperation::m_attribute_row [protected, inherited]

Uint16 NdbOperation::m_attrInfoGSN [protected, inherited]

NdbReceiver** NdbScanOperation::m_conf_receivers [protected, inherited]

Uint32 NdbScanOperation::m_conf_receivers_count [protected, inherited]

NdbRecAttr* NdbScanOperation::m_curr_row [protected, inherited]

Uint32 NdbScanOperation::m_current_api_receiver [protected, inherited]

class NdbTableImpl* NdbOperation::m_currentTable [protected, inherited]

bool NdbScanOperation::m_descending [protected, inherited]

bool NdbScanOperation::m_executed [protected, inherited]

const SetValueSpec* NdbOperation::m_extraSetValues [protected, inherited]

const NdbRecord* NdbOperation::m_key_record [protected, inherited]

const char* NdbOperation::m_key_row [protected, inherited]

Uint32 NdbScanOperation::m_keyInfo [protected, inherited]

Uint32 NdbOperation::m_keyinfo_length [protected, inherited]

Uint16 NdbOperation::m_keyInfoGSN [protected, inherited]

bool NdbScanOperation::m_multi_range [protected, inherited]

Uint8 NdbOperation::m_no_disk_flag [protected, inherited]

Int8 NdbOperation::m_noErrorPropagation [protected, inherited]

Uint32 NdbOperation::m_numExtraSetValues [protected, inherited]

bool NdbScanOperation::m_ordered [protected, inherited]

Uint32* NdbScanOperation::m_prepared_receivers [protected, inherited]

Uint32 NdbScanOperation::m_pruningKey [protected, inherited]

Uint32 NdbOperation::m_read_mask[(NDB_MAX_ATTRIBUTES_IN_TABLE+31)>>5] [protected, inherited]

Uint32 NdbScanOperation::m_read_range_no [protected, inherited]

bool NdbScanOperation::m_readTuplesCalled [protected, inherited]

NdbReceiver** NdbScanOperation::m_receivers [protected, inherited]

Uint32 NdbScanOperation::m_savedBatchOldApi [protected, inherited]

Uint32 NdbScanOperation::m_savedParallelOldApi [protected, inherited]

Uint32 NdbScanOperation::m_savedScanFlagsOldApi [protected, inherited]

char* NdbScanOperation::m_scan_buffer [protected, inherited]

bool NdbScanOperation::m_scanUsingOldApi [protected, inherited]

NdbReceiver** NdbScanOperation::m_sent_receivers [protected, inherited]

Uint32 NdbScanOperation::m_sent_receivers_count [protected, inherited]

Uint16 NdbOperation::m_tcReqGSN [protected, inherited]

Type NdbOperation::m_type [protected, inherited]

Uint8 NdbOperation::m_use_any_value [protected, inherited]

Uint32 NdbOperation::theAI_LenInCurrAI [protected, inherited]

Uint32* NdbOperation::theATTRINFOptr [protected, inherited]

NdbBlob* NdbOperation::theBlobList [protected, inherited]

Uint8 NdbOperation::theCommitIndicator [protected, inherited]

NdbApiSignal* NdbOperation::theCurrentATTRINFO [protected, inherited]

Uint8 NdbOperation::theDirtyIndicator [protected, inherited]

Uint32 NdbOperation::theDistributionKey [protected, inherited]

Int8 NdbOperation::theDistrKeyIndicator_ [protected, inherited]

NdbError NdbOperation::theError [protected, inherited]

int NdbOperation::theErrorLine [protected, inherited]

Uint32 NdbOperation::theFinalReadSize [protected, inherited]

Uint32 NdbOperation::theFinalUpdateSize [protected, inherited]

NdbApiSignal* NdbOperation::theFirstATTRINFO [protected, inherited]

class NdbBranch* NdbOperation::theFirstBranch [protected, inherited]

class NdbCall* NdbOperation::theFirstCall [protected, inherited]

class NdbLabel* NdbOperation::theFirstLabel [protected, inherited]

class NdbSubroutine* NdbOperation::theFirstSubroutine [protected, inherited]

Uint32 NdbOperation::theInitialReadSize [protected, inherited]

Uint32 NdbOperation::theInterpretedSize [protected, inherited]

Uint8 NdbOperation::theInterpretIndicator [protected, inherited]

Uint32* NdbOperation::theKEYINFOptr [protected, inherited]

class NdbBranch* NdbOperation::theLastBranch [protected, inherited]

class NdbCall* NdbOperation::theLastCall [protected, inherited]

NdbApiSignal* NdbOperation::theLastKEYINFO [protected, inherited]

class NdbLabel* NdbOperation::theLastLabel [protected, inherited]

class NdbSubroutine* NdbOperation::theLastSubroutine [protected, inherited]

LockMode NdbOperation::theLockMode [protected, inherited]

Uint32 NdbOperation::theMagicNumber [protected, inherited]

Ndb* NdbOperation::theNdb [protected, inherited]

NdbTransaction* NdbOperation::theNdbCon [protected, inherited]

NdbOperation* NdbOperation::theNext [protected, inherited]

Uint32 NdbOperation::theNoOfLabels [protected, inherited]

Uint32 NdbOperation::theNoOfSubroutines [protected, inherited]

Uint8 NdbOperation::theNoOfTupKeyLeft [protected, inherited]

OperationType NdbOperation::theOperationType [protected, inherited]

Uint32 NdbScanOperation::theParallelism [protected, inherited]

NdbReceiver NdbOperation::theReceiver [protected, inherited]

NdbApiSignal* NdbOperation::theRequest [inherited]

NdbApiSignal* NdbOperation::theSCAN_TABREQ [inherited]

Uint32 NdbOperation::theScanInfo [protected, inherited]

Uint8 NdbOperation::theSimpleIndicator [protected, inherited]

Uint8 NdbOperation::theStartIndicator [protected, inherited]

OperationStatus NdbOperation::theStatus [protected, inherited]

Uint32 NdbOperation::theSubroutineSize [protected, inherited]

NdbApiSignal* NdbOperation::theTCREQ [inherited]

Uint32 NdbOperation::theTotalCurrAI_Len [protected, inherited]

Uint32 NdbOperation::theTotalNrOfKeyWordInSignal [protected, inherited]

Uint32 NdbOperation::theTupKeyLen [protected, inherited]

Uint32 NdbOperation::theTupleKeyDefined[NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY][3] [protected, inherited]


The documentation for this class was generated from the following file:

MySQL Cluster Database Blog

Based on MySQL Cluster 7.0.6.

This page is for information only and is not maintained by MySQL or Sun Microsystems - use at your own risk. For an upto date view of the API refer to the header files included with your MySQL Cluster distribution or check the MySQL Cluster API Developer Guide.