mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -761,6 +761,36 @@ t1 CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-16054 simple json functions flatline cpu on garbage input.
|
||||
#
|
||||
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