Commit 2d656793 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-10665: Json_writer produces extra members in output

Fix an issue in Single_line_formatting_helper: flush_on_one_line()
didn't clean up the buffered items which could cause them to be
printed for the second time.

This can't be ever observed by a user (see MDEV text for details).
parent 2024cdda
...@@ -330,6 +330,8 @@ void Single_line_formatting_helper::flush_on_one_line() ...@@ -330,6 +330,8 @@ void Single_line_formatting_helper::flush_on_one_line()
ptr++; ptr++;
} }
owner->output.append(']'); owner->output.append(']');
/* We've printed out the contents of the buffer, mark it as empty */
buf_ptr= buffer;
} }
......
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