diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-10-15 11:51:41 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-10-15 11:51:41 +0400 |
commit | 1e36cbfa391ac80297958a4cc72d676e15eb1b37 (patch) | |
tree | 2304f70f5fd0d810ae7690360c65283015f08b5c /sql/log.cc | |
parent | eb2c6f451392396ef2ca74f1dba761fc4459d171 (diff) | |
parent | 25d0175fde2bff7397628d91c30aac8ba9d56301 (diff) | |
download | mariadb-git-1e36cbfa391ac80297958a4cc72d676e15eb1b37.tar.gz |
MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE
- Merge with 10.0-base
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index f882cd5d64c..d9d8224357c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2825,6 +2825,15 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time, "Yes" : "No"), thd->query_plan_fsort_passes) == (size_t) -1) tmp_errno= errno; + if (thd->variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_EXPLAIN && + thd->lex->explain) + { + StringBuffer<128> buf; + DBUG_ASSERT(!thd->free_list); + if (!print_explain_query(thd->lex, thd, &buf)) + my_b_printf(&log_file, "%s", buf.c_ptr_safe()); + thd->free_items(); + } if (thd->db && strcmp(thd->db, db)) { // Database changed if (my_b_printf(&log_file,"use %s;\n",thd->db) == (size_t) -1) |