mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-16750 JSON_SET mishandles unicode every second pair of arguments.
The charset of temporary storage (Item_func_json_insert::tmp_js) was not properly set.
This commit is contained in:
@ -778,3 +778,15 @@ select REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC' fro
|
||||
REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC'
|
||||
1
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-16750 JSON_SET mishandles unicode every second pair of arguments.
|
||||
#
|
||||
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6);
|
||||
JSON_SET('{}', '$.a', _utf8 0xC3B6)
|
||||
{"a": "<22>"}
|
||||
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6);
|
||||
JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6)
|
||||
{"a": "<22>", "b": "<22>"}
|
||||
SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6');
|
||||
JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6')
|
||||
{"a": "<22>", "x": 1, "b": "<22>"}
|
||||
|
Reference in New Issue
Block a user