diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-08-22 14:02:43 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-08-22 14:02:43 +0300 |
commit | d65a2b7bde6f735af3669ccbf550f60b2278d816 (patch) | |
tree | 7cbdb0836e653d7c534f4f7898ef45c5ca0c0dc9 /mysql-test/main/func_json.test | |
parent | f02ca429f70c16be2b2e3d5671d9990cd3d474b6 (diff) | |
parent | 1d90d6874db367629f45d1284e9efa36557b400a (diff) | |
download | mariadb-git-d65a2b7bde6f735af3669ccbf550f60b2278d816.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/main/func_json.test')
-rw-r--r-- | mysql-test/main/func_json.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 1021ce07139..83f4bf9d1ad 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -628,6 +628,25 @@ SELECT * FROM t1 WHERE JSON_EXTRACT(j, '$.Age')=19; drop table t1; --echo # +--echo # MDEV-27151: JSON_VALUE() does not parse NULL properties properly +--echo # +--echo # +--echo # It is correct for JSON_EXTRACT() to give null instead of "NULL" because +--echo # it returns the json literal that is put inside json. +--echo # Hence it should return null as in 'null' string and not SQL NULL. +--echo # JSON_VALUE() returns the "VALUE" so it is correct for it to return SQl NULL +--echo # + +SELECT NULL; +SELECT JSON_VALUE('{"nulltest": null}', '$.nulltest'); +SELECT 1 + NULL; +SELECT 1 + JSON_VALUE('{"nulltest": null}', '$.nulltest'); + + +SELECT NULL; +SELECT JSON_EXTRACT('{"a":null, "b":10, "c":"null"}', '$.a'); + +--echo # --echo # End of 10.3 tests --echo # |