MySQL 8.0.39
Source Code Documentation
subselect_indexsubquery_engine Class Reference

A subquery execution engine that evaluates the subquery by doing index lookups in a single table's index. More...

#include <item_subselect.h>

Inheritance diagram for subselect_indexsubquery_engine:
[legend]

Public Types

enum  enum_engine_type { INDEXSUBQUERY_ENGINE , HASH_SJ_ENGINE }
 

Public Member Functions

 subselect_indexsubquery_engine (TABLE *table, Table_ref *table_ref, const Index_lookup &ref, enum join_type join_type, Item_in_subselect *subs, Item *where, Item *having_arg)
 
virtual ~subselect_indexsubquery_engine ()=default
 
virtual bool exec (THD *thd)
 
virtual void print (const THD *thd, String *str, enum_query_type query_type)
 
virtual enum_engine_type engine_type () const
 
virtual void cleanup ()
 
virtual void create_iterators (THD *)
 

Protected Attributes

Query_result_unionresult = nullptr
 
TABLEtable {nullptr}
 Table which is read, using one of eq_ref, ref, ref_or_null. More...
 
Table_reftable_ref {nullptr}
 
Index_lookup ref
 
join_type type {JT_UNKNOWN}
 
Itemcond
 
ulonglong hash
 
Itemhaving
 
Item_in_subselectitem
 

Detailed Description

A subquery execution engine that evaluates the subquery by doing index lookups in a single table's index.

This engine is used to resolve subqueries in forms

outer_expr IN (SELECT tbl.key FROM tbl WHERE subq_where)

or, row-based:

(oe1, .. oeN) IN (SELECT key_part1, ... key_partK FROM tbl WHERE subqwhere)

i.e. the subquery is a single table SELECT without GROUP BY, aggregate functions, etc.

Member Enumeration Documentation

◆ enum_engine_type

Enumerator
INDEXSUBQUERY_ENGINE 
HASH_SJ_ENGINE 

Constructor & Destructor Documentation

◆ subselect_indexsubquery_engine()

subselect_indexsubquery_engine::subselect_indexsubquery_engine ( TABLE table,
Table_ref table_ref,
const Index_lookup ref,
enum join_type  join_type,
Item_in_subselect subs,
Item where,
Item having_arg 
)
inline

◆ ~subselect_indexsubquery_engine()

virtual subselect_indexsubquery_engine::~subselect_indexsubquery_engine ( )
virtualdefault

Member Function Documentation

◆ cleanup()

virtual void subselect_indexsubquery_engine::cleanup ( )
inlinevirtual

Reimplemented in subselect_hash_sj_engine.

◆ create_iterators()

virtual void subselect_indexsubquery_engine::create_iterators ( THD )
inlinevirtual

Reimplemented in subselect_hash_sj_engine.

◆ engine_type()

virtual enum_engine_type subselect_indexsubquery_engine::engine_type ( ) const
inlinevirtual

Reimplemented in subselect_hash_sj_engine.

◆ exec()

bool subselect_indexsubquery_engine::exec ( THD thd)
virtual

Reimplemented in subselect_hash_sj_engine.

◆ print()

void subselect_indexsubquery_engine::print ( const THD thd,
String str,
enum_query_type  query_type 
)
virtual

Reimplemented in subselect_hash_sj_engine.

Member Data Documentation

◆ cond

Item* subselect_indexsubquery_engine::cond
protected

◆ hash

ulonglong subselect_indexsubquery_engine::hash
protected

◆ having

Item* subselect_indexsubquery_engine::having
protected

◆ item

Item_in_subselect* subselect_indexsubquery_engine::item
protected

◆ ref

Index_lookup subselect_indexsubquery_engine::ref
protected

◆ result

Query_result_union* subselect_indexsubquery_engine::result = nullptr
protected

◆ table

TABLE* subselect_indexsubquery_engine::table {nullptr}
protected

Table which is read, using one of eq_ref, ref, ref_or_null.

◆ table_ref

Table_ref* subselect_indexsubquery_engine::table_ref {nullptr}
protected

◆ type

join_type subselect_indexsubquery_engine::type {JT_UNKNOWN}
protected

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