Browse Source

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).
pull/236/head
Sergei Petrunia 9 years ago
parent
commit
2d65679384
  1. 2
      sql/my_json_writer.cc

2
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;
}

Loading…
Cancel
Save