Commit 2cba9e0c authored by Sergey Petrunya's avatar Sergey Petrunya

MDEV-407: Print EXPLAIN [ANALYZE] in the slow query log

- Address input from the mail list: change how EXPLAIN is 
  formatted in the slow query log.
parent e0d9a256
...@@ -2447,10 +2447,10 @@ void select_result_text_buffer::save_to(String *res) ...@@ -2447,10 +2447,10 @@ void select_result_text_buffer::save_to(String *res)
{ {
List_iterator<char*> it(rows); List_iterator<char*> it(rows);
char **row; char **row;
res->append("## <explain>\n"); res->append("#\n");
while ((row= it++)) while ((row= it++))
{ {
res->append("## "); res->append("# explain: ");
for (int i=0; i < n_columns; i++) for (int i=0; i < n_columns; i++)
{ {
if (i) if (i)
...@@ -2459,7 +2459,7 @@ void select_result_text_buffer::save_to(String *res) ...@@ -2459,7 +2459,7 @@ void select_result_text_buffer::save_to(String *res)
} }
res->append("\n"); res->append("\n");
} }
res->append("## </explain>\n"); res->append("#\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment