mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-17018 JSON_SEARCH and User-Defined Variables.
Item_func_json_search needs a member to store the path.
This commit is contained in:
@ -455,3 +455,11 @@ SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6');
|
||||
|
||||
select json_array_append('[ ]', '$', 'aue');
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17018 JSON_SEARCH and User-Defined Variables.
|
||||
--echo #
|
||||
|
||||
SET @`json` := '["A", [{"B": "1"}], {"C": "AB"}, {"D": "BC"}]', @`value` := 'AB';
|
||||
SELECT JSON_SEARCH(@`json`, 'one', @`value`);
|
||||
SET @`json` := NULL, @`value` := NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user