1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-11469 JSON_SEARCH returns incorrect results.

Support for '**' in json path expressions added.
This commit is contained in:
Alexey Botchkov
2016-12-09 12:26:32 +04:00
parent 0f7864a9b8
commit 04aa31c70b
6 changed files with 125 additions and 55 deletions

View File

@ -117,11 +117,11 @@ test_path_parsing()
if (json_path_setup(&p, ci, s_e(p0)))
return;
ok(p.last_step - p.steps == 4 &&
p.steps[0].type == JSON_PATH_ARRAY && p.steps[0].wild == 1 &&
p.steps[1].type == JSON_PATH_KEY && p.steps[1].wild == 0 &&
p.steps[0].type == JSON_PATH_ARRAY_WILD &&
p.steps[1].type == JSON_PATH_KEY &&
p.steps[2].type == JSON_PATH_ARRAY && p.steps[2].n_item == 12 &&
p.steps[3].type == JSON_PATH_KEY && p.steps[3].wild == 1 &&
p.steps[4].type == JSON_PATH_ARRAY && p.steps[4].wild == 1,
p.steps[3].type == JSON_PATH_KEY_WILD &&
p.steps[4].type == JSON_PATH_ARRAY_WILD,
"path");
}