MDEV-12324 Wrong result (phantom array value) on JSON_EXTRACT.

Fixed the path comparison.
This commit is contained in:
Alexey Botchkov
2017-08-07 13:46:45 +04:00
parent 4ff6ebf76a
commit f701ac65e9
3 changed files with 13 additions and 1 deletions

View File

@ -1756,7 +1756,7 @@ int json_path_parts_compare(
goto step_fits;
goto step_failed;
}
if (a->n_item == 0)
if ((a->type & JSON_PATH_WILD) == 0 && a->n_item == 0)
goto step_fits_autowrap;
goto step_failed;
}