MySQL 9.1.0
Source Code Documentation
query_term.cc File Reference
#include "sql/query_term.h"
#include <stdint.h>
#include <stdio.h>
#include <limits>
#include <sstream>
#include <utility>
#include "my_base.h"
#include "my_inttypes.h"
#include "mysql/udf_registration_types.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "sql/auth/auth_acls.h"
#include "sql/field.h"
#include "sql/item.h"
#include "sql/join_optimizer/access_path.h"
#include "sql/join_optimizer/cost_model.h"
#include "sql/join_optimizer/explain_access_path.h"
#include "sql/join_optimizer/materialize_path_parameters.h"
#include "sql/query_options.h"
#include "sql/query_result.h"
#include "sql/sql_executor.h"
#include "sql/sql_lex.h"
#include "sql/sql_optimizer.h"
#include "sql/sql_tmp_table.h"
#include "sql/sql_union.h"
#include "sql/table.h"
#include "template_utils.h"

Functions

static AccessPathadd_materialized_access_path (THD *thd, Query_term *qt, Mem_root_array< MaterializePathParameters::Operand > &operands, TABLE *dest, ha_rows limit=HA_POS_ERROR)
 Helper method: create a materialized access path, estimate its cost and move it to the best place, cf. More...
 
static void dumpAccessPath (int level, AccessPath *p, std::ostringstream &buf)
 Used for debugging/trace. More...
 

Function Documentation

◆ add_materialized_access_path()

static AccessPath * add_materialized_access_path ( THD thd,
Query_term qt,
Mem_root_array< MaterializePathParameters::Operand > &  operands,
TABLE dest,
ha_rows  limit = HA_POS_ERROR 
)
static

Helper method: create a materialized access path, estimate its cost and move it to the best place, cf.

doc for MoveCompositeIteratorsFromTablePath

Parameters
thdsession state
qtquery term for which we want to create a materialized access path
operandsthe constituent operands (query blocks) we want to materialize
destthe destination temporary (materialized) table
limitIf not HA_POS_ERROR, the maximum number of rows allowed in the materialized table
Returns
non-empty access path. If empty, this is an error

◆ dumpAccessPath()

static void dumpAccessPath ( int  level,
AccessPath p,
std::ostringstream &  buf 
)
static

Used for debugging/trace.

Dumps some info on access path, minion of Query_block::qbPrint.

Parameters
levellevel in tree
pthe access path to print
bufbuf the buffer to print into