diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-01-25 00:13:15 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-01-25 00:13:15 +0400 |
commit | 35760c00004615dfa44ba5735dc1f8f9abe24483 (patch) | |
tree | ec0ffef8f0370d06ff7b4b9c88706fa1bd9c2c29 /sql/item_jsonfunc.cc | |
parent | 1782102d978caeea282147ff6ca89e325a3da512 (diff) | |
download | mariadb-git-35760c00004615dfa44ba5735dc1f8f9abe24483.tar.gz |
MDEV-11557 Port MySQL-5.7 JSON tests to MariaDB.
more fixes.
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r-- | sql/item_jsonfunc.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index e97f00dae8e..fc146427bc1 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -605,6 +605,9 @@ String *Item_func_json_extract::val_str(String *str) } c_path->parsed= c_path->constant; } + + if (args[n_arg]->null_value) + goto return_null; } possible_multiple_values= arg_count > 2 || @@ -666,7 +669,6 @@ String *Item_func_json_extract::val_str(String *str) error: report_json_error(js, &je, 0); return_null: - /* TODO: launch error messages. */ null_value= 1; return 0; } @@ -1958,6 +1960,9 @@ String *Item_func_json_insert::val_str(String *str) json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), (const uchar *) js->ptr() + js->length()); + if (c_path->p.last_step < c_path->p.steps) + goto v_found; + c_path->cur_step= c_path->p.steps; if (c_path->p.last_step >= c_path->p.steps && @@ -2572,7 +2577,6 @@ end: js_error: report_json_error(js, &je, 0); null_return: - /* TODO: launch error messages. */ null_value= 1; return 0; } |