1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-18886 JSON_ARRAY() does not recognise JSON argument.

JSON_ARRAY and JSON_OBJECT functions with no arguments now get the
connection charset. Item_func_convert_charset returns the correct
is_json() flag.
This commit is contained in:
Alexey Botchkov
2019-03-12 01:09:55 +04:00
parent 28e713dc12
commit acb4a87204
4 changed files with 23 additions and 2 deletions

View File

@ -830,3 +830,15 @@ SET sql_mode=default;
select JSON_VALID( '{"a":1]' );
JSON_VALID( '{"a":1]' )
0
#
# MDEV-18886 JSON_ARRAY() does not recognise JSON argument.
#
SELECT JSON_ARRAY(_UTF8 'str', JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket'));
JSON_ARRAY(_UTF8 'str', JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket'))
["str", {"plugin": "unix_socket"}]
SELECT CHARSET(JSON_ARRAY());
CHARSET(JSON_ARRAY())
latin1
SELECT CHARSET(JSON_OBJECT());
CHARSET(JSON_OBJECT())
latin1