#include <subselect.h>
Public Types | |
enum | enum_engine_type { ABSTRACT_ENGINE, SINGLE_SELECT_ENGINE, UNION_ENGINE, UNIQUESUBQUERY_ENGINE, INDEXSUBQUERY_ENGINE, HASH_SJ_ENGINE } |
Public Member Functions | |
subselect_hash_sj_engine (Session *session_in, Item_subselect *in_predicate, subselect_single_select_engine *old_engine) | |
bool | init_permanent (List< Item > *tmp_columns) |
void | init_runtime () |
void | cleanup () |
int | prepare () |
int | exec () |
virtual void | print (String *str) |
uint32_t | cols () |
virtual enum_engine_type | engine_type () |
void | fix_length_and_dec (Item_cache **row) |
bool | uncacheable () |
bool | uncacheable (uint32_t) |
void | exclude () |
table_map | upper_select_const_tables () |
bool | change_result (Item_subselect *si, select_result_interceptor *result) |
bool | no_tables () |
int | scan_table () |
bool | copy_ref_key () |
bool | no_rows () |
void | set_session (Session *session_arg) |
Session * | get_session () |
enum Item_result | type () |
enum_field_types | field_type () |
virtual bool | may_be_null () |
virtual bool | is_executed () const |
Static Public Member Functions | |
static table_map | calc_const_tables (TableList *) |
static void * | operator new (size_t size) |
static void * | operator new (size_t size, Root &root) |
static void * | operator new (size_t size, Root *root) |
static void * | operator new[] (size_t size) |
static void * | operator new[] (size_t size, Root &root) |
static void * | operator new[] (size_t size, Root *root) |
static void | operator delete (void *) |
static void | operator delete (void *, Root &) |
static void | operator delete (void *, Root *) |
static void | operator delete[] (void *) |
static void | operator delete[] (void *, Root &) |
static void | operator delete[] (void *, Root *) |
Protected Member Functions | |
void | set_row (List< Item > &item_list, Item_cache **row) |
Protected Attributes | |
bool | is_materialized |
subselect_single_select_engine * | materialize_engine |
Join * | materialize_join |
Tmp_Table_Param * | tmp_param |
JoinTable * | tab |
Item * | cond |
bool | empty_result_set |
bool | null_keypart |
select_result_interceptor * | result |
Session * | session |
Item_subselect * | item |
enum Item_result | res_type |
enum_field_types | res_field_type |
bool | maybe_null |
Compute an IN predicate via a hash semi-join. The subquery is materialized during the first evaluation of the IN predicate. The IN predicate is executed via the functionality inherited from subselect_uniquesubquery_engine.
Definition at line 649 of file subselect.h.
|
virtualinherited |
change select_result emulation, never should be called.
si | new subselect Item |
res | new select_result object |
false | OK |
true | error |
Implements drizzled::subselect_engine.
Definition at line 2860 of file subselect.cc.
|
virtual |
Cleanup performed after each PS execution.
Called in the end of Join::prepare for PS from Item_subselect::cleanup.
Reimplemented from drizzled::subselect_uniquesubquery_engine.
Definition at line 3096 of file subselect.cc.
|
virtual |
Execute a subquery IN predicate via materialization.
If needed materialize the subquery into a temporary table, then copmpute the predicate via a lookup into this table.
true | if error |
false | otherwise |
Reimplemented from drizzled::subselect_uniquesubquery_engine.
Definition at line 3116 of file subselect.cc.
References drizzled::Join::exec(), drizzled::Session::is_fatal_error, and drizzled::Join::optimize().
Create all structures needed for IN execution that can live between PS reexecution.
: Currently Item_subselect::init() already chooses and creates at parse time an engine with a corresponding JOIN to execute the subquery.
true | if error |
false | otherwise |
Definition at line 2958 of file subselect.cc.
References drizzled::Table::cursor, drizzled::Table::key_info, and drizzled::Session::options.
Referenced by drizzled::Item_in_subselect::setup_engine().
void drizzled::subselect_hash_sj_engine::init_runtime | ( | ) |
Initialize members of the engine that need to be re-initilized at each execution.
true | if a memory allocation error occurred |
false | if success |
Definition at line 3066 of file subselect.cc.
References drizzled::Join::change_result(), and drizzled::subselect_single_select_engine::prepare().
Referenced by drizzled::Item_in_subselect::setup_engine().
|
virtualinherited |
Report about presence of tables in subquery.
true | there are not tables used in subquery |
false | there are some tables in subquery |
Implements drizzled::subselect_engine.
Definition at line 2926 of file subselect.cc.
|
virtual |
Print the state of this engine into a string for debugging and views.
Reimplemented from drizzled::subselect_uniquesubquery_engine.
Definition at line 3184 of file subselect.cc.