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.test | |
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.test')
-rw-r--r-- | mysql-test/main/func_json.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 8d72e5afa59..4ef752e3d32 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -423,6 +423,30 @@ SHOW CREATE TABLE t1; DROP TABLE t1; --echo # +--echo # MDEV-16054 simple json functions flatline cpu on garbage input. +--echo # + +select json_array(1,uuid(),compress(5.140264e+307)); + +--echo # +--echo # MDEV-16869 String functions don't respect character set of JSON_VALUE. +--echo # + +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; +select REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC' from t1; +drop table t1; + +--echo # +--echo # MDEV-16750 JSON_SET mishandles unicode every second pair of arguments. +--echo # + +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6); +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6); +SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6'); + +--echo # --echo # End of 10.2 tests --echo # |