1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00

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).
This commit is contained in:
Sergei Petrunia
2016-08-25 19:47:38 +03:00
parent 2024cddaa4
commit 2d65679384

View File

@@ -330,6 +330,8 @@ void Single_line_formatting_helper::flush_on_one_line()
ptr++;
}
owner->output.append(']');
/* We've printed out the contents of the buffer, mark it as empty */
buf_ptr= buffer;
}