diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-09-25 19:18:02 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-09-25 19:18:02 +0400 |
commit | 7d60030c0200b982c13a4c6a9023cf7190b2510a (patch) | |
tree | f313048b860d010e7d50e7fa08a517f864d02ce3 /sql | |
parent | ac54df04d80781ea243cfbc8865bfe080b44f4e2 (diff) | |
download | mariadb-git-7d60030c0200b982c13a4c6a9023cf7190b2510a.tar.gz |
MDEV-5060 Server crashes on EXPLAIN EXTENDED or EXPLAIN PARTITIONS with explain in slow_log
- If we're running explain with flags, use the same set of flags to make EXPLAIN columns
and contents.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/opt_qpf.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_qpf.cc b/sql/opt_qpf.cc index 0f047f05ba0..152c55c98cb 100644 --- a/sql/opt_qpf.cc +++ b/sql/opt_qpf.cc @@ -122,11 +122,13 @@ int QPF_query::print_explain(select_result_sink *output, } } + bool print_qpf_query(LEX *lex, THD *thd, String *str) { return lex->query_plan_footprint->print_explain_str(thd, str); } + bool QPF_query::print_explain_str(THD *thd, String *out_str) { List<Item> fields; @@ -134,7 +136,7 @@ bool QPF_query::print_explain_str(THD *thd, String *out_str) select_result_text_buffer output_buf(thd); output_buf.send_result_set_metadata(fields, thd->lex->describe); - if (print_explain(&output_buf, 0)) + if (print_explain(&output_buf, thd->lex->describe)) return true; output_buf.save_to(out_str); return false; |