mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-22141: JSON_REMOVE returns NULL on valid arguments
Analysis: When we scan json to get to a beginning according to the path, we end up scanning json even if we have exhausted it. When eventually returns error. Fix: Continue scanning json only if we have not exhausted it and return result accordingly.
This commit is contained in:
@ -1140,6 +1140,13 @@ DROP TABLE t;
|
||||
SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date'));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22141: JSON_REMOVE returns NULL on valid arguments
|
||||
--echo #
|
||||
|
||||
SELECT JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D');
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user