MySQL  8.0.27
Source Code Documentation
sql_test.h File Reference
#include <sys/types.h>
#include "sql/enum_query_type.h"
#include "sql/mem_root_array.h"
#include "sql/sql_lex.h"
#include "sql/sql_select.h"
#include "thr_lock.h"

Go to the source code of this file.

Typedefs

typedef Mem_root_array< Key_useKey_use_array
 

Functions

void print_where (const THD *thd, const Item *cond, const char *info, enum_query_type query_type)
 
void TEST_join (JOIN *join)
 
void print_plan (JOIN *join, uint idx, double record_count, double read_time, double current_read_time, const char *info)
 Print the current state during query optimization. More...
 
void dump_TABLE_LIST_graph (Query_block *query_block, TABLE_LIST *tl)
 
void print_keyuse_array (THD *thd, Opt_trace_context *trace, const Key_use_array *keyuse_array)
 

Variables

const char * lock_descriptions [TL_WRITE_ONLY+1]
 

Typedef Documentation

◆ Key_use_array

Function Documentation

◆ dump_TABLE_LIST_graph()

void dump_TABLE_LIST_graph ( Query_block query_block,
TABLE_LIST tl 
)

◆ print_keyuse_array()

void print_keyuse_array ( THD thd,
Opt_trace_context trace,
const Key_use_array keyuse_array 
)

◆ print_plan()

void print_plan ( JOIN join,
uint  idx,
double  record_count,
double  read_time,
double  current_read_time,
const char *  info 
)

Print the current state during query optimization.

Parameters
joinpointer to the structure providing all context info for the query
idxlength of the partial QEP in 'join->positions' also an index in the array 'join->best_ref'
record_countestimate for the number of records returned by the best partial plan
read_timethe cost of the best partial plan. If a complete plan is printed (join->best_read is set), this argument is ignored.
current_read_timethe accumulated cost of the current partial plan
infocomment string to appear above the printout

This function prints to the log file DBUG_FILE the members of 'join' that are used during query optimization (join->positions, join->best_positions, and join->best_ref) and few other related variables (read_time, record_count). Useful to trace query optimizer functions.

◆ print_where()

void print_where ( const THD thd,
const Item cond,
const char *  info,
enum_query_type  query_type 
)

◆ TEST_join()

void TEST_join ( JOIN join)

Variable Documentation

◆ lock_descriptions

const char* lock_descriptions[TL_WRITE_ONLY+1]
extern