MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dbspj::TreeNode Struct Reference

#include <Dbspj.hpp>

Inheritance diagram for Dbspj::TreeNode:
Collaboration diagram for Dbspj::TreeNode:

Public Types

enum  TreeNodeState {
  TN_BUILDING = 1, TN_PREPARING = 2, TN_INACTIVE = 3, TN_ACTIVE = 4,
  TN_COMPLETING = 5, TN_END = 0
}
enum  TreeNodeBits {
  T_ATTR_INTERPRETED = 0x1, T_ONE_SHOT = 0x2, T_KEYINFO_CONSTRUCTED = 0x4, T_ATTRINFO_CONSTRUCTED = 0x8,
  T_LEAF = 0x10, T_USER_PROJECTION = 0x20, T_UNIQUE_INDEX_LOOKUP = 0x40, T_ROW_BUFFER = 0x80,
  T_ROW_BUFFER_MAP = 0x100, T_REPORT_BATCH_COMPLETE = 0x200, T_NEED_REPORT_BATCH_COMPLETED = 0x400, T_CONST_PRUNE = 0x800,
  T_PRUNE_PATTERN = 0x1000, T_SCAN_PARALLEL = 0x2000, T_SCAN_REPEATABLE = 0x4000, T_END = 0
}

Public Member Functions

 STATIC_CONST (MAGIC=~RT_SPJ_TREENODE)
 TreeNode (Uint32 request)
bool isLeaf () const

Public Attributes

const Uint32 m_magic
struct OpInfom_info
Uint32 m_bits
Uint32 m_state
Uint32 m_node_no
Uint32 m_batch_size
Uint32 m_parentPtrI
const Uint32 m_requestPtrI
TreeNodeBitMask m_ancestors
Dependency_map::Head m_dependent_nodes
PatternStore::Head m_keyPattern
PatternStore::Head m_attrParamPattern
union {
   RowMap   m_row_map
   SLFifoRowList   m_row_list
}; 
union {
   LookupData   m_lookup_data
   ScanFragData   m_scanfrag_data
   ScanIndexData   m_scanindex_data
}; 
struct {
   Uint32   m_ref
   Uint32   m_correlation
   Uint32   m_keyInfoPtrI
   Uint32   m_attrInfoPtrI
m_send
union {
   Uint32   nextList
   Uint32   nextPool
}; 
Uint32 prevList
- Public Attributes inherited from Dbspj::TreeNode_cursor_ptr
Uint32 nextList

Detailed Description

A node in a Query (This is an instantiated version of QueryNode in include/kernel/signal/QueryTree.hpp)

Definition at line 627 of file Dbspj.hpp.

Member Enumeration Documentation

Enumerator:
T_ONE_SHOT 

Will node be executed only once (::parent_row()) implies key/attr-info will be disowned (by send-signal)

T_KEYINFO_CONSTRUCTED 

Is keyinfo "constructed" (implies key info will be disowned (by send-signal)

T_ATTRINFO_CONSTRUCTED 

Is attrinfo "constructed" (implies attr info will be disowned (by send-signal)

T_LEAF 

Is this node a leaf-node

T_USER_PROJECTION 

Does this node have a user projection. (The index access part of an index lookup operation has no user projection, since only the base table tuple is sent to the API.)

T_UNIQUE_INDEX_LOOKUP 

Is this a unique index lookup (on index table) (implies some extra error handling code)

T_ROW_BUFFER_MAP 

Should rows have dictionary (i.e random access capability) This is typically used when having nodes depending on multiple parents so that when row gets availble from "last" parent, a key can be constructed using correlation value from parents

T_REPORT_BATCH_COMPLETE 

Does any child need to know about when my batch is complete

T_NEED_REPORT_BATCH_COMPLETED 

Do I need to know when parent batch is completed

T_CONST_PRUNE 

Constant prune pattern

T_PRUNE_PATTERN 

Prune pattern

T_SCAN_PARALLEL 

Should index scan be parallel

T_SCAN_REPEATABLE 

Possible requesting resultset for this index scan to be repeated

Definition at line 687 of file Dbspj.hpp.

Enumerator:
TN_BUILDING 

Initial

TN_PREPARING 

Tree node is preparing

TN_INACTIVE 

Tree node is build and prepared, but not active

TN_ACTIVE 

Tree node is active (i.e has outstanding request(s))

TN_COMPLETING 

Tree node is "finishing" (after TN_INACTIVE)

TN_END 

end-marker, not a valid state

Definition at line 654 of file Dbspj.hpp.

Member Data Documentation

union { ... }

Rows buffered by this node

Uint32 Dbspj::TreeNode::m_correlation

Each tuple has a 16-bit id that is unique within that operation, batch and SPJ block instance. The upper half word of m_correlation is the id of the parent tuple, and the lower half word is the id of the current tuple.

Definition at line 809 of file Dbspj.hpp.


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