MySQL 5.6.14 Source Code Document
|
Classes | |
class | TupleSet |
Public Member Functions | |
NdbResultStream (NdbQueryOperationImpl &operation, NdbRootFragment &rootFrag) | |
void | prepare () |
void | prepareNextReceiveSet () |
NdbReceiver & | getReceiver () |
const NdbReceiver & | getReceiver () const |
const char * | getCurrentRow () |
void | execTRANSID_AI (const Uint32 *ptr, Uint32 len, TupleCorrelation correlation) |
bool | prepareResultSet (Uint32 remainingScans) |
Uint16 | firstResult () |
Uint16 | nextResult () |
bool | isEmpty () const |
bool | isSubScanComplete (Uint32 remainingScans) const |
bool | isScanQuery () const |
bool | isScanResult () const |
bool | isInnerJoin () const |
Friends | |
NdbOut & | operator<< (NdbOut &out, const NdbResultStream &) |
This class manages the subset of result data for one operation that is derived from one fragment of the root operation. Note that the result tuples may come from any fragment, but they all have initial ancestors from the same fragment of the root operation. For each operation there will thus be one NdbResultStream for each fragment that the root operation reads from (one in the case of lookups.) This class has an NdbReceiver object for processing tuples as well as structures for correlating child and parent tuples.
Definition at line 409 of file NdbQueryOperation.cpp.
|
explicit |
operation | The operation for which we will receive results. |
rootFragNo | 0..n-1 when the root operation reads from n fragments. |
Definition at line 706 of file NdbQueryOperation.cpp.
void NdbResultStream::execTRANSID_AI | ( | const Uint32 * | ptr, |
Uint32 | len, | ||
TupleCorrelation | correlation | ||
) |
Process an incomming tuple for this stream. Extract parent and own tuple ids and pass it on to m_receiver.
ptr | buffer holding tuple. |
len | buffer length. |
Callback when a TRANSID_AI signal (receive row) is processed.
Store TupleCorrelation.
Definition at line 880 of file NdbQueryOperation.cpp.
Uint16 NdbResultStream::firstResult | ( | ) |
Navigate within the current ResultSet to resp. first and next row. For non-parent operations in the pushed query, navigation is with respect to any preceding parents which results in this ResultSet depends on. Returns either the tupleNo within TupleSet[] which we navigated to, or tupleNotFound().
Definition at line 836 of file NdbQueryOperation.cpp.
|
inline |
Returns true if last row matching the current parent tuple has been consumed.
Definition at line 469 of file NdbQueryOperation.cpp.
|
inline |
This method returns true if this result stream holds the last batch of a sub scan. This means that it is the last batch of the scan that was instantiated from the current batch of its parent operation.
Find the node number seen by the SPJ block. Since a unique index operation will have two distincts nodes in the tree used by the SPJ block, this number may be different from 'opNo'.
Definition at line 478 of file NdbQueryOperation.cpp.
void NdbResultStream::prepare | ( | ) |
Prepare for receiving first results.
Definition at line 739 of file NdbQueryOperation.cpp.
void NdbResultStream::prepareNextReceiveSet | ( | ) |
Prepare for receiving next batch of scan results.
Make preparation for another batch of results to be received. This NdbResultStream, and all its sibling will receive a batch of results from the datanodes.
If this stream will get new rows in the next batch, then so will all of its descendants.
Definition at line 902 of file NdbQueryOperation.cpp.
bool NdbResultStream::prepareResultSet | ( | Uint32 | remainingScans | ) |
A complete batch has been received for a fragment on this NdbResultStream, Update whatever required before the appl. are allowed to navigate the result.
Make preparations for another batch of result to be read:
Prepare NdbResultSet for reading - either the next received from datanodes or reuse the last as has been determined by ::prepareNextReceiveSet()
Recursively iterate all child results depth first. Filter away any result rows which should not be visible (yet) - Either due to incomplete child batches, or the join being an 'inner join'. Set result itterator state to 'before first' resultrow.
Definition at line 930 of file NdbQueryOperation.cpp.
|
friend |
For debugging.
Definition at line 5205 of file NdbQueryOperation.cpp.