MySQL 9.5.0
Source Code Documentation
sql_derived.h File Reference
#include "sql/item.h"
#include "sql/opt_trace_context.h"
#include "sql/sql_const.h"
#include "sql/sql_lex.h"

Go to the source code of this file.

Classes

class  Condition_pushdown
 Class which handles pushing conditions down to a materialized derived table. More...
 
class  Condition_pushdown::Derived_table_info
 Used to pass information during condition pushdown. More...
 

Functions

Itemparse_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...
 

Function Documentation

◆ parse_expression()

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.

Used during condition pushdown to derived tables and during inlining of stored functions.

Parameters
thdCurrent thread.
itemItem to be reparsed to get a clone.
query_blockquery block where expression is being parsed
derived_tablederived table to which the item belongs to. "nullptr" either when cloning to make a copy of the original condition to be pushed down to a derived table that has SET operations or when the function is used for stored function inlining.
Returns
A copy of the original item (unresolved) on success else nullptr.