MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbQueryOperationImpl Class Reference

#include <NdbQueryOperationImpl.hpp>

Public Member Functions

Uint32 getNoOfParentOperations () const
NdbQueryOperationImplgetParentOperation (Uint32 i) const
NdbQueryOperationImplgetParentOperation () const
Uint32 getNoOfChildOperations () const
NdbQueryOperationImplgetChildOperation (Uint32 i) const
NdbQueryOperationImplgetRoot () const
const NdbQueryDefImpl & getQueryDef () const
const NdbQueryOperationDefImpl & getQueryOperationDef () const
NdbQueryImplgetQuery () const
NdbRecAttrgetValue (const char *anAttrName, char *resultBuffer)
NdbRecAttrgetValue (Uint32 anAttrId, char *resultBuffer)
NdbRecAttrgetValue (const NdbColumnImpl &, char *resultBuffer)
int setResultRowBuf (const NdbRecord *rec, char *resBuffer, const unsigned char *result_mask)
int setResultRowRef (const NdbRecord *rec, const char *&bufRef, const unsigned char *result_mask)
NdbQuery::NextResultOutcome firstResult ()
NdbQuery::NextResultOutcome nextResult (bool fetchAllowed, bool forceSend)
bool isRowNULL () const
bool isRowChanged () const
bool execTRANSID_AI (const Uint32 *ptr, Uint32 len)
bool execTCKEYREF (const NdbApiSignal *aSignal)
bool execSCAN_TABCONF (Uint32 tcPtrI, Uint32 rowCount, Uint32 nodeMask, NdbReceiver *receiver)
const NdbQueryOperationgetInterface () const
NdbQueryOperationgetInterface ()
int setOrdering (NdbQueryOptions::ScanOrdering ordering)
NdbQueryOptions::ScanOrdering getOrdering () const
int setParallelism (Uint32 parallelism)
int setMaxParallelism ()
int setAdaptiveParallelism ()
int setBatchSize (Uint32 batchSize)
int setInterpretedCode (const NdbInterpretedCode &code)
bool hasInterpretedCode () const
bool checkMagicNumber () const
Uint32 getMaxBatchRows () const
Uint32 getRowSize () const
const NdbRecordgetNdbRecord () const

Friends

class NdbQueryImpl
NdbOut & operator<< (NdbOut &out, const NdbQueryOperationImpl &)

Detailed Description

This class contains data members for NdbQueryOperation, such that these do not need to exposed in NdbQueryOperation.hpp. This class may be changed without forcing the customer to recompile his application.

Definition at line 580 of file NdbQueryOperationImpl.hpp.

Member Function Documentation

bool NdbQueryOperationImpl::checkMagicNumber ( ) const
inline

Verify magic number.

Definition at line 710 of file NdbQueryOperationImpl.hpp.

Here is the caller graph for this function:

bool NdbQueryOperationImpl::execSCAN_TABCONF ( Uint32  tcPtrI,
Uint32  rowCount,
Uint32  nodeMask,
NdbReceiver receiver 
)

Called once per complete (within batch) fragment when a SCAN_TABCONF signal is received.

Parameters
tcPtrInot in use.
rowCountNumber of rows for this fragment, including all rows from descendant lookup operations.
receiverThe receiver object that shall process the results.

Definition at line 4923 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

bool NdbQueryOperationImpl::execTCKEYREF ( const NdbApiSignal aSignal)

Process absence of result data for this operation. (Only used when the root operation is a lookup.)

Returns
true if query complete.

Definition at line 4857 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

bool NdbQueryOperationImpl::execTRANSID_AI ( const Uint32 *  ptr,
Uint32  len 
)

Process result data for this operation. Return true if batch complete.

receiverId holds the Id of the receiver of the corresponding stream of the root operation. We can thus find the correct root fragment number.

Definition at line 4802 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Uint32 NdbQueryOperationImpl::getMaxBatchRows ( ) const
inline

Get the maximal number of rows that may be returned in a single SCANREQ to the SPJ block.

Definition at line 716 of file NdbQueryOperationImpl.hpp.

Here is the caller graph for this function:

NdbQueryOperationImpl& NdbQueryOperationImpl::getRoot ( ) const
inline

A shorthand for getting the root operation.

Definition at line 596 of file NdbQueryOperationImpl.hpp.

Here is the caller graph for this function:

Uint32 NdbQueryOperationImpl::getRowSize ( ) const

Get size of row as required to buffer it.

Definition at line 5171 of file NdbQueryOperation.cpp.

Here is the caller graph for this function:

NdbQuery::NextResultOutcome NdbQueryOperationImpl::nextResult ( bool  fetchAllowed,
bool  forceSend 
)

'next' will never be able to return anything for a lookup operation. NOTE: This is a pure optimization shortcut!

Definition at line 3995 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int NdbQueryOperationImpl::setAdaptiveParallelism ( )

Let the system dynamically choose the number of fragments to scan in parallel. The system will try to choose a value that gives optimal performance. This is the default for all scans but the root scan. This method only implemented for non-root scan operations.

Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Definition at line 5096 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int NdbQueryOperationImpl::setBatchSize ( Uint32  batchSize)

Set the batch size (max rows per batch) for this operation. This only applies to scan operations, as lookup operations always will have the same batch size as its parent operation, or 1 if it is the root operation.

Parameters
batchSizeBatch size (in number of rows). A value of 0 means use the default batch size.
Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Each SPJ block instance will scan each fragment, so the batch size cannot be smaller than the number of fragments.

Definition at line 5111 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int NdbQueryOperationImpl::setInterpretedCode ( const NdbInterpretedCode code)

Set the NdbInterpretedCode needed for defining a scan filter for this operation. It is an error to call this method on a lookup operation.

Parameters
codeThe interpreted code. This object is copied internally, meaning that 'code' may be destroyed as soon as this method returns.
Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Definition at line 5010 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int NdbQueryOperationImpl::setMaxParallelism ( )

Set the number of fragments to be scanned in parallel to the maximum possible value. This is the default for the root scan operation.

Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Definition at line 5086 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int NdbQueryOperationImpl::setOrdering ( NdbQueryOptions::ScanOrdering  ordering)

Define result ordering for ordered index scan. It is an error to call this method on an operation that is not a scan, or to call it if an ordering was already set on the operation defintion by calling NdbQueryOperationDef::setOrdering().

Parameters
orderingThe desired ordering of results.
Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Definition at line 4974 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int NdbQueryOperationImpl::setParallelism ( Uint32  parallelism)

Set the number of fragments to be scanned in parallel. This only applies to table scans and non-sorted scans of ordered indexes. This method is only implemented for then root scan operation.

Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Definition at line 5060 of file NdbQueryOperation.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

NdbOut& operator<< ( NdbOut &  out,
const NdbQueryOperationImpl op 
)
friend

For debugging.

Definition at line 5183 of file NdbQueryOperation.cpp.


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