MySQL 8.0.40
Source Code Documentation
|
#include <assert.h>
#include <sys/types.h>
#include <cstddef>
#include <memory>
#include <vector>
#include "field_types.h"
#include "my_alloc.h"
#include "my_inttypes.h"
#include "my_table_map.h"
#include "my_time.h"
#include "mysql/udf_registration_types.h"
#include "mysql_time.h"
#include "sql/comp_creator.h"
#include "sql/enum_query_type.h"
#include "sql/item.h"
#include "sql/iterators/row_iterator.h"
#include "sql/parse_location.h"
#include "sql/parse_tree_node_base.h"
#include "sql/sql_const.h"
#include "sql/sql_opt_exec_shared.h"
#include "template_utils.h"
Go to the source code of this file.
Classes | |
class | Item_subselect |
struct | Item_subselect::Collect_subq_info |
argument used by walk method collect_scalar_subqueries ("css") More... | |
class | Item_singlerow_subselect |
struct | Item_singlerow_subselect::Scalar_subquery_replacement |
Argument for walk method replace_scalar_subquery. More... | |
class | Item_maxmin_subselect |
class | Item_exists_subselect |
class | Item_in_subselect |
Representation of IN subquery predicates of the form "left_expr IN (SELECT ...)". More... | |
struct | Item_in_subselect::In2exists_info |
This bundles several pieces of information useful when doing the IN->EXISTS transform. More... | |
class | Item_allany_subselect |
ALL/ANY/SOME subselect. More... | |
class | SubqueryWithResult |
class | subselect_indexsubquery_engine |
A subquery execution engine that evaluates the subquery by doing index lookups in a single table's index. More... | |
class | subselect_hash_sj_engine |
Compute an IN predicate via a hash semi-join. More... | |
Enumerations | |
enum class | Subquery_strategy : int { UNSPECIFIED , CANDIDATE_FOR_IN2EXISTS_OR_MAT , CANDIDATE_FOR_SEMIJOIN , CANDIDATE_FOR_DERIVED_TABLE , SEMIJOIN , DERIVED_TABLE , SUBQ_EXISTS , SUBQ_MATERIALIZATION , DELETED } |
Strategy which will be used to handle this subquery: flattening to a semi-join, conversion to a derived table, rewrite of IN to EXISTS... Sometimes the strategy is first only a candidate, then the real decision happens in a second phase. More... | |
Functions | |
Item * | all_any_subquery_creator (Item *left_expr, chooser_compare_func_creator cmp, bool all, Query_block *select) |
Construct ALL/ANY/SOME subquery Item. More... | |
Item * | remove_in2exists_conds (Item *conds) |
Removes every predicate injected by IN->EXISTS. More... | |
bool | IsItemInSubSelect (Item *item) |
Returns whether the Item is an IN-subselect. More... | |
|
strong |
Strategy which will be used to handle this subquery: flattening to a semi-join, conversion to a derived table, rewrite of IN to EXISTS... Sometimes the strategy is first only a candidate, then the real decision happens in a second phase.
Other times the first decision is final.
bool IsItemInSubSelect | ( | Item * | item | ) |
Returns whether the Item is an IN-subselect.
Removes every predicate injected by IN->EXISTS.
This function is different from others:
If there are no in2exists conditions, it will return the exact same pointer. If it returns a new Item, the old Item is left alone, so it can be reused in other settings.
conds | Condition; may be nullptr. |