diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-07-17 21:52:08 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-07-17 21:52:08 +0400 |
commit | 2368f8895d10a3d883a6a0ffe33b2b222caf7f1a (patch) | |
tree | 1f674b38702d87f5b13bbb587c8939bc842e9926 /sql/sql_show.h | |
parent | a49b4c970fe582919d89109e0cc3ebe2558269cd (diff) | |
download | mariadb-git-2368f8895d10a3d883a6a0ffe33b2b222caf7f1a.tar.gz |
MWL#182: Explain running statements
- Address feedback from the second code review.
Diffstat (limited to 'sql/sql_show.h')
-rw-r--r-- | sql/sql_show.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/sql_show.h b/sql/sql_show.h index 8ad9327c08c..6ccb6e03872 100644 --- a/sql/sql_show.h +++ b/sql/sql_show.h @@ -19,6 +19,7 @@ #include "sql_list.h" /* List */ #include "handler.h" /* enum_schema_tables */ #include "table.h" /* enum_schema_table_state */ +#include "my_apc.h" /* Forward declarations */ class JOIN; @@ -132,4 +133,28 @@ enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table); /* These functions were under INNODB_COMPATIBILITY_HOOKS */ int get_quote_char_for_identifier(THD *thd, const char *name, uint length); +class select_result_explain_buffer; +/* + SHOW EXPLAIN request object. +*/ + +class Show_explain_request : public Apc_target::Apc_call +{ +public: + THD *target_thd; /* thd that we're running SHOW EXPLAIN for */ + THD *request_thd; /* thd that run SHOW EXPLAIN command */ + + /* If true, there was some error when producing EXPLAIN output. */ + bool failed_to_produce; + + /* SHOW EXPLAIN will be stored here */ + select_result_explain_buffer *explain_buf; + + /* Query that we've got SHOW EXPLAIN for */ + String query_str; + + /* Overloaded virtual function */ + void call_in_target_thread(); +}; + #endif /* SQL_SHOW_H */ |