1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MWL#182: Explain running statements

- Merge with 5.3-main
This commit is contained in:
Sergey Petrunya
2011-10-27 21:41:19 +04:00
25 changed files with 1365 additions and 126 deletions

View File

@ -958,7 +958,7 @@ public:
const char *zero_result_cause; ///< not 0 if exec must return zero result
bool union_part; ///< this subselect is part of union
bool optimized; ///< flag to avoid double optimization in EXPLAIN
int optimized; ///< flag to avoid double optimization in EXPLAIN
bool initialized; ///< flag to avoid double init_execution calls
/*
@ -1069,9 +1069,11 @@ public:
SELECT_LEX_UNIT *unit);
bool prepare_stage2();
int optimize();
int optimize_inner();
int reinit();
int init_execution();
void exec();
void exec_inner();
int destroy();
void restore_tmp();
bool alloc_func_list();
@ -1162,6 +1164,10 @@ public:
{
return (unit->item && unit->item->is_in_predicate());
}
int print_explain(select_result_sink *result, bool on_the_fly,
bool need_tmp_table, bool need_order,
bool distinct,const char *message);
private:
/**
TRUE if the query contains an aggregate function but has no GROUP
@ -1454,6 +1460,9 @@ inline bool optimizer_flag(THD *thd, uint flag)
return (thd->variables.optimizer_switch & flag);
}
int print_fake_select_lex_join(select_result_sink *result, bool on_the_fly,
SELECT_LEX *select_lex, uint8 select_options);
/* Table elimination entry point function */
void eliminate_tables(JOIN *join);