1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-11938 json.json_no_table crashes or fails with valgrind warnings in json_find_path / Item_func_json_length::val_int.

Paths with quoted keynames handled improperly.
This commit is contained in:
Alexey Botchkov
2017-02-02 18:56:15 +04:00
parent 650ffcd3a0
commit d123ed852a
5 changed files with 76 additions and 39 deletions

View File

@@ -494,3 +494,12 @@ json_set('{"a":12}', '$[0][1].a', 100)
NULL
Warnings:
Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_set'
select json_value('{"\\"key1":123}', '$."\\"key1"');
json_value('{"\\"key1":123}', '$."\\"key1"')
123
select json_value('{"\\"key1\\"":123}', '$."\\"key1\\""');
json_value('{"\\"key1\\"":123}', '$."\\"key1\\""')
123
select json_value('{"key 1":123}', '$."key 1"');
json_value('{"key 1":123}', '$."key 1"')
123