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.
This commit is contained in:
parent
ac54df04d8
commit
7d60030c02
@ -20,3 +20,9 @@ Error 1146 Table 'test.nonexisting' doesn't exist
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
#
|
||||
# MDEV-5060 Server crashes on EXPLAIN EXTENDED or EXPLAIN PARTITIONS with explain in slow_log
|
||||
#
|
||||
EXPLAIN PARTITIONS SELECT 1 ;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
|
@ -28,3 +28,10 @@ SHOW WARNINGS;
|
||||
--disconnect con1
|
||||
--connection default
|
||||
SELECT 1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5060 Server crashes on EXPLAIN EXTENDED or EXPLAIN PARTITIONS with explain in slow_log
|
||||
--echo #
|
||||
EXPLAIN PARTITIONS SELECT 1 ;
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user