summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-06-19 18:10:32 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-06-19 18:10:32 +0400
commit6eb2ce58635dded450953bf18123fbd7d9dbfaea (patch)
treed95484e850366c0b5930c350c6dc22b9a698e6a2 /sql/sql_class.h
parent1ce0c706b39018c09994ef133fdeeb93d750903c (diff)
downloadmariadb-git-6eb2ce58635dded450953bf18123fbd7d9dbfaea.tar.gz
SHOW EXPLAIN: better comments
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 345216dcdea..bfbc9e86611 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1522,16 +1522,29 @@ extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
class select_result_explain_buffer;
+
+/*
+ SHOW EXPLAIN request object.
+
+ The thread that runs SHOW EXPLAIN statement creates a Show_explain_request
+ object R, and then schedules APC call of
+ Show_explain_request::get_explain_data((void*)&R).
+
+*/
+
class Show_explain_request
{
public:
- THD *target_thd;
- THD *request_thd;
+ 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;
static void get_explain_data(void *arg);
@@ -2414,11 +2427,11 @@ public:
/*
- This is what allows this thread to serve as a target for others to
- schedule Async Procedure Calls on.
+ Allows this thread to serve as a target for others to schedule Async
+ Procedure Calls on.
- It's possible to schedule arbitrary C function call but currently this
- facility is used only by SHOW EXPLAIN code (See Show_explain_request)
+ It's possible to schedule arbitrary C++ function calls. Currently, only
+ Show_explain_request uses this.
*/
Apc_target apc_target;