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

Class for accumulating join result in a tmp table, grouping them if necessary, and sending further. More...

#include <sql_executor.h>

Inheritance diagram for QEP_tmp_table:
Collaboration diagram for QEP_tmp_table:

Public Member Functions

 QEP_tmp_table (JOIN_TAB *tab)
enum_op_type type ()
enum_nested_loop_state put_record ()
enum_nested_loop_state end_send ()
 Finish rnd/index scan after accumulating records, switch ref_array, and send accumulated records further.
void set_write_func (Next_select_func new_write_func)
- Public Member Functions inherited from QEP_operation
 QEP_operation (JOIN_TAB *tab)
virtual int init ()
virtual void free ()

Additional Inherited Members

- Public Types inherited from QEP_operation
enum  enum_op_type { OT_CACHE, OT_TMP_TABLE }
- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)
- Public Attributes inherited from QEP_operation
JOIN_TABjoin_tab

Detailed Description

Class for accumulating join result in a tmp table, grouping them if necessary, and sending further.

Join result records are accumulated on the put_record() call. The accumulation process is determined by the write_func, it could be: end_write Simply store all records in tmp table. end_write_group Perform grouping using join->group_fields, records are expected to be sorted. end_update Perform grouping using the key generated on tmp table. Input records aren't expected to be sorted. Tmp table uses the heap engine end_update_unique Same as above, but the engine is myisam.

Lazy table initialization is used - the table will be instantiated and rnd/index scan started on the first put_record() call.

Definition at line 234 of file sql_executor.h.

Member Function Documentation

enum_nested_loop_state QEP_tmp_table::put_record ( )
inlinevirtual

Put a new record into the operation's buffer

Returns
return one of enum_nested_loop_state values.

Implements QEP_operation.

Definition at line 241 of file sql_executor.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void QEP_tmp_table::set_write_func ( Next_select_func  new_write_func)
inline

write_func setter

Definition at line 251 of file sql_executor.h.

Here is the caller graph for this function:


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