File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ json_remove(@j, '$[0]')
150
150
[ ["b", "c"], "d"]
151
151
select json_remove(@j, '$[1]');
152
152
json_remove(@j, '$[1]')
153
- ["a" "d"]
153
+ ["a", "d"]
154
154
select json_remove(@j, '$[2]');
155
155
json_remove(@j, '$[2]')
156
156
["a", ["b", "c"]]
Original file line number Diff line number Diff line change @@ -1667,9 +1667,7 @@ String *Item_func_json_remove::val_str(String *str)
1667
1667
rem_start= (const char *) (je.s .c_str - je.sav_c_len );
1668
1668
json_string_set_str (&key_name, lp->key , lp->key_end );
1669
1669
if (json_key_matches (&je, &key_name))
1670
- {
1671
1670
goto v_found;
1672
- }
1673
1671
1674
1672
if (json_skip_key (&je))
1675
1673
goto error;
@@ -1693,7 +1691,7 @@ String *Item_func_json_remove::val_str(String *str)
1693
1691
if (json_skip_key (&je) || json_scan_next (&je))
1694
1692
goto error;
1695
1693
1696
- rem_end= (je.state == JST_VALUE) ?
1694
+ rem_end= (je.state == JST_VALUE && n_item == 0 ) ?
1697
1695
(const char *) je.s .c_str : (const char *) (je.s .c_str - je.sav_c_len );
1698
1696
1699
1697
str->length (0 );
You can’t perform that action at this time.
0 commit comments