MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE

- When showing EXPLAIN output in the slow query log, 
  format it so that one could use grep or other tool
  to get the output.
This commit is contained in:
Sergey Petrunya 2013-10-15 13:21:06 +04:00
parent 282ff783b1
commit 7be365ea9c

View File

@ -2442,10 +2442,10 @@ void select_result_text_buffer::save_to(String *res)
{
List_iterator<char*> it(rows);
char **row;
res->append("#\n");
res->append("## <explain>\n");
while ((row= it++))
{
res->append("# ");
res->append("## ");
for (int i=0; i < n_columns; i++)
{
if (i)
@ -2454,7 +2454,7 @@ void select_result_text_buffer::save_to(String *res)
}
res->append("\n");
}
res->append("#\n");
res->append("## </explain>\n");
}