diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2016-08-25 19:47:38 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2016-08-25 19:47:38 +0300 |
commit | 2d65679384c36ae2e46b2f62538223c3d71fb00a (patch) | |
tree | b0bffaac8c9063ed1b0e68fb775e13ea98352fd6 /sql/my_json_writer.cc | |
parent | 2024cddaa412e7c4a2aff8bb50907868155019da (diff) | |
download | mariadb-git-2d65679384c36ae2e46b2f62538223c3d71fb00a.tar.gz |
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).
Diffstat (limited to 'sql/my_json_writer.cc')
-rw-r--r-- | sql/my_json_writer.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/my_json_writer.cc b/sql/my_json_writer.cc index e97db210da7..d36fdd1192a 100644 --- a/sql/my_json_writer.cc +++ b/sql/my_json_writer.cc @@ -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; } |