Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
10.5 1b12e251 |
MariaDB [test]> SELECT JSON_REMOVE('{"a":"b"}','$[0][1].a'); |
+--------------------------------------+ |
| JSON_REMOVE('{"a":"b"}','$[0][1].a') | |
+--------------------------------------+ |
| NULL | |
+--------------------------------------+ |
1 row in set, 1 warning (0.000 sec) |
|
MariaDB [test]> SHOW WARNINGS;
|
+---------+------+---------------------------------------------------------------------+ |
| Level | Code | Message | |
+---------+------+---------------------------------------------------------------------+ |
| Warning | 4037 | Unexpected end of JSON text in argument 1 to function 'json_remove' | |
+---------+------+---------------------------------------------------------------------+ |
1 row in set (0.000 sec) |
MySQL returns the untouched JSON document instead:
MySQL [test]> SELECT JSON_REMOVE('{"a":"b"}','$[0][1].a'); |
+--------------------------------------+ |
| JSON_REMOVE('{"a":"b"}','$[0][1].a') | |
+--------------------------------------+ |
| {"a": "b"} | |
+--------------------------------------+ |
1 row in set (0.000 sec) |
Attachments
Issue Links
- duplicates
-
MDEV-22141 JSON_REMOVE returns NULL on valid arguments.
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | JSON_REMOVE returns wrong result after not finding element to remove | JSON_REMOVE returns wrong result and ER_JSON_EOS after not finding element to remove |
Workflow | MariaDB v3 [ 117876 ] | MariaDB v4 [ 142473 ] |
Assignee | Alexey Botchkov [ holyfoot ] | Rucha Deodhar [ rucha174 ] |
Fix Version/s | 10.2 [ 14601 ] |
Link |
This issue duplicates |
Fix Version/s | 10.3 [ 22126 ] |
Fix Version/s | 10.4 [ 22408 ] |