MySQL 5.6.14 Source Code Document
|
Class of index operations for use in transactions. More...
#include <NdbIndexOperation.hpp>
Public Member Functions | |
Define Standard Operation | |
int | insertTuple () |
int | readTuple (LockMode) |
int | readTuple () |
int | readTupleExclusive () |
int | simpleRead () |
int | dirtyRead () |
int | committedRead () |
int | updateTuple () |
int | deleteTuple () |
const NdbDictionary::Index * | getIndex () const |
int | dirtyUpdate () |
Define Interpreted Program Operation | |
int | interpretedUpdateTuple () |
int | interpretedDeleteTuple () |
Public Member Functions inherited from NdbOperation | |
LockMode | getLockMode () const |
AbortOption | getAbortOption () const |
int | setAbortOption (AbortOption) |
virtual NdbTransaction * | getNdbTransaction () const |
void | setPartitionId (Uint32 id) |
Uint32 | getPartitionId () const |
const NdbLockHandle * | getLockHandle () const |
const NdbLockHandle * | getLockHandle () |
const NdbOperation * | next () const |
const NdbRecAttr * | getFirstRecAttr () const |
void * | getCustomData () const |
void | setCustomData (void *p) |
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) |
NdbRecAttr * | getValue (const char *anAttrName, char *aValue=0) |
NdbRecAttr * | getValue (Uint32 anAttrId, char *aValue=0) |
NdbRecAttr * | getValue (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 | setAnyValue (Uint32 aValue) |
int | setOptimize (Uint32 options) |
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 NdbBlob * | getBlobHandle (const char *anAttrName) |
virtual NdbBlob * | getBlobHandle (Uint32 anAttrId) |
virtual NdbBlob * | getBlobHandle (const char *anAttrName) const |
virtual NdbBlob * | getBlobHandle (Uint32 anAttrId) const |
int | incValue (const char *anAttrName, Uint32 aValue) |
int | incValue (const char *anAttrName, Uint64 aValue) |
int | incValue (Uint32 anAttrId, Uint32 aValue) |
int | incValue (Uint32 anAttrId, Uint64 aValue) |
int | subValue (const char *anAttrName, Uint32 aValue) |
int | subValue (const char *anAttrName, Uint64 aValue) |
int | subValue (Uint32 anAttrId, Uint32 aValue) |
int | subValue (Uint32 anAttrId, Uint64 aValue) |
int | def_label (int labelNumber) |
int | add_reg (Uint32 RegSource1, Uint32 RegSource2, Uint32 RegDest) |
int | sub_reg (Uint32 RegSource1, Uint32 RegSource2, Uint32 RegDest) |
int | load_const_u32 (Uint32 RegDest, Uint32 Constant) |
int | load_const_u64 (Uint32 RegDest, Uint64 Constant) |
int | load_const_null (Uint32 RegDest) |
int | read_attr (const char *anAttrName, Uint32 RegDest) |
int | write_attr (const char *anAttrName, Uint32 RegSource) |
int | read_attr (Uint32 anAttrId, Uint32 RegDest) |
int | write_attr (Uint32 anAttrId, Uint32 RegSource) |
int | branch_ge (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_gt (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_le (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_lt (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_eq (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_ne (Uint32 RegLvalue, Uint32 RegRvalue, Uint32 Label) |
int | branch_ne_null (Uint32 RegLvalue, Uint32 Label) |
int | branch_eq_null (Uint32 RegLvalue, Uint32 Label) |
int | branch_label (Uint32 Label) |
int | branch_col_eq_null (Uint32 ColId, Uint32 Label) |
int | branch_col_ne_null (Uint32 ColId, Uint32 Label) |
int | branch_col_eq (Uint32 ColId, const void *val, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_ne (Uint32 ColId, const void *val, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_lt (Uint32 ColId, const void *val, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_le (Uint32 ColId, const void *val, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_gt (Uint32 ColId, const void *val, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_ge (Uint32 ColId, const void *val, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_like (Uint32 ColId, const void *, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_notlike (Uint32 ColId, const void *, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_and_mask_eq_mask (Uint32 ColId, const void *, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_and_mask_ne_mask (Uint32 ColId, const void *, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_and_mask_eq_zero (Uint32 ColId, const void *, Uint32 len, bool nopad, Uint32 Label) |
int | branch_col_and_mask_ne_zero (Uint32 ColId, const void *, Uint32 len, bool nopad, Uint32 Label) |
int | interpret_exit_ok () |
int | interpret_exit_nok (Uint32 ErrorCode) |
int | interpret_exit_nok () |
int | interpret_exit_last_row () |
int | def_subroutine (int SubroutineNumber) |
int | call_sub (Uint32 Subroutine) |
int | ret_sub () |
const NdbError & | getNdbError () const |
int | getNdbErrorLine () |
int | getNdbErrorLine () const |
const char * | getTableName () const |
const NdbDictionary::Table * | getTable () const |
Type | getType () const |
virtual int | writeTuple () |
virtual int | dirtyWrite () |
Friends | |
class | Ndb |
class | NdbTransaction |
struct | Ndb_free_list_t< NdbIndexOperation > |
Additional Inherited Members | |
Public Types inherited from NdbOperation | |
enum | OperationType { ReadRequest = 0, UpdateRequest = 1, InsertRequest = 2, DeleteRequest = 3, WriteRequest = 4, ReadExclusive = 5, RefreshRequest = 6, UnlockRequest = 7, OpenScanRequest, OpenRangeScanRequest, NotDefined2, NotDefined } |
enum | Type { PrimaryKeyAccess = 0, UniqueIndexAccess = 1, TableScan = 2, OrderedIndexScan = 3 } |
enum | LockMode { LM_Read = 0, LM_Exclusive = 1, LM_CommittedRead = 2, LM_Dirty = 2, LM_SimpleRead = 3 } |
enum | AbortOption { DefaultAbortOption = -1, AbortOnError = 0, AO_IgnoreError = 2 } |
Protected Types inherited from NdbOperation | |
enum | OperationStatus { Init, OperationDefined, TupleKeyDefined, GetValue, SetValue, ExecInterpretedValue, SetValueInterpreted, FinalGetValue, SubroutineExec, SubroutineEnd, WaitResponse, Finished, UseNdbRecord } |
enum | OP_FLAGS { OF_NO_DISK = 0x1, OF_USE_ANY_VALUE = 0x2, OF_QUEUEABLE = 0x4, OF_DEFERRED_CONSTRAINTS = 0x8 } |
Protected Member Functions inherited from NdbOperation | |
bool | needReply () |
int | init (const class NdbTableImpl *, NdbTransaction *aCon, bool useRec) |
void | initInterpreter () |
NdbOperation (Ndb *aNdb, Type aType=PrimaryKeyAccess) | |
void | next (NdbOperation *) |
NdbOperation * | next () |
OperationStatus | Status () |
void | Status (OperationStatus) |
void | NdbCon (NdbTransaction *) |
virtual void | release () |
void | postExecuteRelease () |
void | setStartIndicator () |
int | doSendKeyReq (int processorId, GenericSectionPtr *secs, Uint32 numSecs) |
int | doSend (int ProcessorId, Uint32 lastFlag) |
virtual int | prepareSend (Uint32 TC_ConnectPtr, Uint64 TransactionId, AbortOption) |
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, const Uint32 *read_mask) |
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 (const NdbApiSignal *) |
int | checkMagicNumber (bool b=true) |
int | checkState_TransId (const NdbApiSignal *aSignal) |
virtual int | equal_impl (const NdbColumnImpl *, const char *aValue) |
virtual NdbRecAttr * | getValue_impl (const NdbColumnImpl *, char *aValue=0) |
NdbRecAttr * | getValue_NdbRecord (const NdbColumnImpl *tAttrInfo, char *aValue) |
int | setValue (const NdbColumnImpl *anAttrObject, const char *aValue) |
NdbBlob * | getBlobHandle (NdbTransaction *aCon, const NdbColumnImpl *anAttrObject) |
NdbBlob * | getBlobHandle (NdbTransaction *aCon, const NdbColumnImpl *anAttrObject) const |
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) |
NdbBlob * | linkInBlobHandle (NdbTransaction *aCon, const NdbColumnImpl *column, NdbBlob *&lastPtr) |
int | getBlobHandlesNdbRecord (NdbTransaction *aCon, const Uint32 *mask) |
int | getBlobHandlesNdbRecordDelete (NdbTransaction *aCon, bool checkReadSet, const Uint32 *mask) |
int | insertATTRINFO (Uint32 aData) |
int | insertATTRINFOloop (const Uint32 *aDataPtr, Uint32 aLength) |
int | insertKEYINFO (const char *aValue, Uint32 aStartPosition, Uint32 aKeyLenInByte) |
void | reorderKEYINFO () |
virtual void | setErrorCode (int aErrorCode) const |
virtual void | setErrorCodeAbort (int aErrorCode) const |
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 () |
Uint32 | ptr2int () const |
int | getKeyFromTCREQ (Uint32 *data, Uint32 &size) |
int | getLockHandleImpl () |
int | prepareGetLockHandle () |
int | prepareGetLockHandleNdbRecord () |
virtual void | setReadLockMode (LockMode lockMode) |
NdbRecAttr * | getVarValue (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 inherited from NdbOperation | |
static int | handleOperationOptions (const OperationType type, const OperationOptions *opts, const Uint32 sizeOfOptions, NdbOperation *op) |
Protected Attributes inherited from NdbOperation | |
void * | m_customData |
Type | m_type |
NdbReceiver | theReceiver |
NdbError | theError |
int | theErrorLine |
Ndb * | theNdb |
NdbTransaction * | theNdbCon |
NdbOperation * | theNext |
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_flags |
Uint8 | _unused1 |
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_unused_read_mask [(128+31)>>5] |
const NdbInterpretedCode * | m_interpreted_code |
const SetValueSpec * | m_extraSetValues |
Uint32 | m_numExtraSetValues |
Uint32 | m_any_value |
NdbBlob * | theBlobList |
Int8 | m_abortOption |
Int8 | m_noErrorPropagation |
NdbLockHandle * | theLockHandle |
bool | m_blob_lock_upgraded |
Class of index operations for use in transactions.
Definition at line 30 of file NdbIndexOperation.hpp.
|
virtual |
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.
Reimplemented from NdbOperation.
Definition at line 129 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation to be a standard operation of type deleteTuple.
When calling NdbTransaction::execute, this operation deletes a tuple.
Reimplemented from NdbOperation.
Definition at line 143 of file NdbIndexOperation.cpp.
|
virtual |
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.
Reimplemented from NdbOperation.
Definition at line 122 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation to be a standard operation of type dirtyUpdate.
When calling NdbTransaction::execute, this operation updates without two-phase commit.
Reimplemented from NdbOperation.
Definition at line 150 of file NdbIndexOperation.cpp.
const NdbDictionary::Index * NdbIndexOperation::getIndex | ( | ) | const |
Get index object for this operation
Definition at line 172 of file NdbIndexOperation.cpp.
|
virtual |
insert is not allowed
Reimplemented from NdbOperation.
Definition at line 95 of file NdbIndexOperation.cpp.
|
virtual |
Delete a tuple using an interpreted program.
Reimplemented from NdbOperation.
Definition at line 164 of file NdbIndexOperation.cpp.
|
virtual |
Update a tuple using an interpreted program.
Reimplemented from NdbOperation.
Definition at line 157 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation to be a standard operation of type readTuple. When calling NdbTransaction::execute, this operation reads a tuple.
Reimplemented from NdbOperation.
Definition at line 75 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation to be a standard operation of type readTuple. When calling NdbTransaction::execute, this operation reads a tuple.
Reimplemented from NdbOperation.
Definition at line 101 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation to be a standard operation of type readTupleExclusive. When calling NdbTransaction::execute, this operation read a tuple using an exclusive lock.
Reimplemented from NdbOperation.
Definition at line 108 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation 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 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.
Reimplemented from NdbOperation.
Definition at line 115 of file NdbIndexOperation.cpp.
|
virtual |
Define the NdbIndexOperation to be a standard operation of type updateTuple.
When calling NdbTransaction::execute, this operation updates a tuple in the table.
Reimplemented from NdbOperation.
Definition at line 136 of file NdbIndexOperation.cpp.
|
friend |
Reciver(s)
Definition at line 33 of file NdbIndexOperation.hpp.