summaryrefslogtreecommitdiff
path: root/sql/my_json_writer.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-09-29 20:11:48 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 18:10:11 +0300
commit61cd4f441210aa7d140831236598df28f3d03d5e (patch)
treef7ea4098aef5421d2efee9c6bc84d18019257781 /sql/my_json_writer.h
parentd03daaf8a8b1088085e3ba5fd28320b5d2652700 (diff)
downloadmariadb-git-61cd4f441210aa7d140831236598df28f3d03d5e.tar.gz
MDEV-26711: Values in JSON histograms are not properly quoted
Escape values when serializing to JSON. Un-escape when reading back.
Diffstat (limited to 'sql/my_json_writer.h')
-rw-r--r--sql/my_json_writer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/my_json_writer.h b/sql/my_json_writer.h
index 9e7081c96d1..7840476b878 100644
--- a/sql/my_json_writer.h
+++ b/sql/my_json_writer.h
@@ -238,6 +238,8 @@ public:
Json_writer& add_member(const char *name, size_t len);
/* Add atomic values */
+
+ /* Note: the add_str methods do not do escapes. Should this change? */
void add_str(const char* val);
void add_str(const char* val, size_t num_bytes);
void add_str(const String &str);