1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11450 Assertion `!null_value' failed invirtual bool Item::send on json_search.

Item_func_json_search::val_str didn't set the null_value
        properly. So that affected the next record in the resultset.
This commit is contained in:
Alexey Botchkov
2016-12-03 12:11:06 +04:00
parent a8467e2fab
commit edc75c9c16
3 changed files with 18 additions and 3 deletions

View File

@ -217,6 +217,15 @@ json_search(@j, 'all', '10', NULL, '$[*]')
select json_search(@j, 'all', '10', NULL, '$[*][0].k');
json_search(@j, 'all', '10', NULL, '$[*][0].k')
"$[1][0].k"
create table t1( json_col text );
insert into t1 values
('{ "a": "foobar" }'),
('{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }');
select json_search( json_col, 'all', 'foot' ) from t1;
json_search( json_col, 'all', 'foot' )
NULL
"$.c[1]"
drop table t1;
select json_unquote('"abc"');
json_unquote('"abc"')
abc