1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- sql/server_component/mysql_json_encode_imp.cc.orig 2026-07-10 11:18:36 UTC
+++ sql/server_component/mysql_json_encode_imp.cc
@@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include "mysql_json_encode_imp.h"
+#include <cstdio>
#include "my_inttypes.h"
#include "mysql/strings/m_ctype.h"
@@ -116,7 +117,7 @@ DEFINE_METHOD(const unsigned char *, mysql_json_encode
/*
Control characters must be escaped in JSON.
*/
- int r = sprintf(reinterpret_cast<char *>(dst), "\\u%04x",
+ int r = std::sprintf(reinterpret_cast<char *>(dst), "\\u%04x",
static_cast<unsigned char>(wc));
dst += r;
} else if (wc < 0x80) {
|