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

Re-commit in git:

MDEV-406: ANALYZE $stmt
- Ported the old patch to new explain code
- New SQL syntax (ANALYZE $stmt)
- ANALYZE UPDATE/DELETE is now supported (because EXPLAIN UPDATE/DELETE is supported)
- Basic counters are calculated for basic kinds of queries
  (still need to see what happens with join buffer, ORDER BY...LIMIT queries, etc)
This commit is contained in:
Sergei Petrunia
2014-05-27 20:13:17 +04:00
parent 5a61516afd
commit eaba1ba4a5
13 changed files with 239 additions and 58 deletions

View File

@ -2268,6 +2268,7 @@ public:
void save_explain_data(Explain_query *query);
void save_explain_data_intern(Explain_query *query, Explain_update *eu);
virtual ~Update_plan() {}
Update_plan(MEM_ROOT *mem_root_arg) :
@ -2459,6 +2460,7 @@ struct LEX: public Query_tables_list
*/
uint table_count;
uint8 describe;
bool analyze_stmt; /* TRUE<=> this is "ANALYZE $stmt" */
/*
A flag that indicates what kinds of derived tables are present in the
query (0 if no derived tables, otherwise a combination of flags
@ -2735,7 +2737,7 @@ struct LEX: public Query_tables_list
}
int print_explain(select_result_sink *output, uint8 explain_flags,
bool *printed_anything);
bool is_analyze, bool *printed_anything);
};