mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-16869 String functions don't respect character set of JSON_VALUE.
Item_func_json_value::val_str() produced string of wrong charset.
This commit is contained in:
@ -766,3 +766,15 @@ DROP TABLE t1;
|
||||
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;
|
||||
|
Reference in New Issue
Block a user