diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-16 10:08:30 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-16 10:08:30 +0300 |
commit | 734db318ac69f60959bcd0d6c9116a3681449a38 (patch) | |
tree | cb8ccd4ecfebe752ec559834d3bf083efb9c8cd4 /mysql-test/main/func_json.result | |
parent | b151cc2b0b1fc938de91035fbafc46667d9019e3 (diff) | |
parent | 8716bb3b72b7f5fed69b6dde413c2138f6d175b2 (diff) | |
download | mariadb-git-734db318ac69f60959bcd0d6c9116a3681449a38.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/func_json.result')
-rw-r--r-- | mysql-test/main/func_json.result | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index a7e8b5c9e59..cc3764c9ed2 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -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": "ö"} +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6); +JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6) +{"a": "ö", "b": "ö"} +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": "ö", "x": 1, "b": "ö"} +# # End of 10.2 tests # # |