From f699010c0fc570786f6fe271f4dc3b2c84f8521d Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 12 Dec 2024 14:48:09 +1100 Subject: [PATCH] json_unescape: don't fill unconverted characters with ? Return an error, and handle let the caller handler the SQL error. --- strings/json_lib.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/strings/json_lib.c b/strings/json_lib.c index 31d5807418a..4d9a9aac594 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1656,15 +1656,7 @@ int json_unescape(CHARSET_INFO *json_cs, } if (c_len == MY_CS_ILUNI) { - /* - Result charset doesn't support the json's character. - Let's replace it with the '?' symbol. - */ - if ((c_len= my_ci_wc_mb(res_cs, '?', res, res_end)) > 0) - { - res+= c_len; - continue; - } + return -1; } /* Result buffer is too small. */ return -1;