#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) |
bool | 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 *mem_root) |
static void * | operator new[] (size_t size) |
static void * | operator new[] (size_t size, Root *mem_root) |
static void | operator delete (void *, size_t) |
static void | operator delete (void *, Root *) |
static void | operator delete[] (void *, Root *) |
static void | operator delete[] (void *, size_t) |
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 672 of file subselect.h.
bool drizzled::subselect_uniquesubquery_engine::change_result | ( | Item_subselect * | si, |
select_result_interceptor * | result | ||
) | [virtual, inherited] |
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 2913 of file subselect.cc.
void drizzled::subselect_hash_sj_engine::cleanup | ( | ) | [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 3160 of file subselect.cc.
int drizzled::subselect_hash_sj_engine::exec | ( | ) | [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 3180 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 3011 of file subselect.cc.
References drizzled::Table::cursor, and drizzled::Table::key_info.
bool 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 3129 of file subselect.cc.
bool drizzled::subselect_uniquesubquery_engine::no_tables | ( | ) | [virtual, inherited] |
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 2979 of file subselect.cc.
void drizzled::subselect_hash_sj_engine::print | ( | String * | str | ) | [virtual] |
Print the state of this engine into a string for debugging and views.
Reimplemented from drizzled::subselect_uniquesubquery_engine.
Definition at line 3249 of file subselect.cc.