diff options
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 041a0b555d1..5d8b650b494 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->query_plan_footprint) + { + StringBuffer<128> buf; + DBUG_ASSERT(!thd->free_list); + print_qpf_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) |
