mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@ -767,6 +767,30 @@ select json_array(1,uuid(),compress(5.140264e+307));
|
||||
json_array(1,uuid(),compress(5.140264e+307))
|
||||
NULL
|
||||
#
|
||||
# MDEV-16869 String functions don't respect character set of JSON_VALUE.
|
||||
#
|
||||
create table t1(json_col TEXT) DEFAULT CHARSET=latin1;
|
||||
insert into t1 values (_latin1 X'7B226B657931223A2253EC227D');
|
||||
select JSON_VALUE(json_col, '$.key1')= _latin1 X'53EC' from t1;
|
||||
JSON_VALUE(json_col, '$.key1')= _latin1 X'53EC'
|
||||
1
|
||||
select REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC' from t1;
|
||||
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>"}
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
Reference in New Issue
Block a user