mirror of
https://github.com/MariaDB/server.git
synced 2026-05-17 20:37:12 +02:00
json_unescape: don't fill unconverted characters with ?
Return an error, and handle let the caller handler the SQL error.
This commit is contained in:
parent
459dfe99d1
commit
f699010c0f
1 changed files with 1 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue