MySQL 8.4.3
Source Code Documentation
|
#include "sql/sql_derived.h"
#include <stddef.h>
#include <string.h>
#include <sys/types.h>
#include "lex_string.h"
#include "my_alloc.h"
#include "my_base.h"
#include "my_bitmap.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "my_table_map.h"
#include "mysqld_error.h"
#include "sql/auth/auth_acls.h"
#include "sql/debug_sync.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/join_optimizer/join_optimizer.h"
#include "sql/mem_root_array.h"
#include "sql/nested_join.h"
#include "sql/opt_trace.h"
#include "sql/query_options.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_executor.h"
#include "sql/sql_lex.h"
#include "sql/sql_list.h"
#include "sql/sql_opt_exec_shared.h"
#include "sql/sql_optimizer.h"
#include "sql/sql_parse.h"
#include "sql/sql_resolver.h"
#include "sql/sql_tmp_table.h"
#include "sql/sql_union.h"
#include "sql/sql_view.h"
#include "sql/table.h"
#include "sql/table_function.h"
#include "sql/thd_raii.h"
#include "thr_lock.h"
Functions | |
static void | swap_column_names_of_unit_and_tmp_table (const mem_root_deque< Item * > &unit_items, const Create_col_name_list &tmp_table_col_names) |
Helper function for Table_ref::setup_materialized_derived() More... | |
bool | copy_field_info (THD *thd, Item *orig_expr, Item *cloned_expr) |
Copy field information like table_ref, context etc of all the fields from the original expression to the cloned expression. More... | |
static Item * | parse_expression (THD *thd, Item *item, Query_block *query_block, Table_ref *derived_table) |
Given an item and a query block, this function creates a clone of the item (unresolved) by reparsing the item. More... | |
Item * | resolve_expression (THD *thd, Item *item, Query_block *query_block) |
Resolves the expression given. More... | |
Copy field information like table_ref, context etc of all the fields from the original expression to the cloned expression.
thd | current thread |
orig_expr | original expression |
cloned_expr | cloned expression |
|
static |
Given an item and a query block, this function creates a clone of the item (unresolved) by reparsing the item.
Used during condition pushdown to derived tables.
thd | Current thread. |
item | Item to be reparsed to get a clone. |
query_block | query block where expression is being parsed |
derived_table | derived table to which the item belongs to. "nullptr" when cloning to make a copy of the original condition to be pushed down to a derived table that has SET operations. |
Item * resolve_expression | ( | THD * | thd, |
Item * | item, | ||
Query_block * | query_block | ||
) |
Resolves the expression given.
Used with parse_expression() to clone an item during condition pushdown. For all the column references in the expression, information like table reference, field, context etc is expected to be correctly set. This will just do a short cut fix_fields() for Item_field.
thd | Current thread. |
item | Item to resolve. |
query_block | query block where this item needs to be resolved. |
|
static |
Helper function for Table_ref::setup_materialized_derived()