1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-12774 JSON_EXTRACT fails with some escaped unicode as key.

Tests added.
This commit is contained in:
Alexey Botchkov
2017-09-12 17:30:46 +04:00
parent 30db4e1fc7
commit 825c8d793d
2 changed files with 21 additions and 0 deletions

View File

@ -686,3 +686,13 @@ JSON_SET('{}', '$.age', 87)
SELECT JSON_MERGE('[]', '{"c":"d"}');
JSON_MERGE('[]', '{"c":"d"}')
[{"c": "d"}]
SET @str = "{\"\\u00e4\\u00f6\":\"yes\"}";
SET @path = "$.\"\\u00e4\\u00f6\"";
select @str, @path, JSON_EXTRACT(@str, @path);
@str @path JSON_EXTRACT(@str, @path)
{"\u00e4\u00f6":"yes"} $."\u00e4\u00f6" "yes"
SET @str = "{\"\\u00e4\":\"yes\"}";
SET @path = "$.\"\\u00e4\"";
select @str, @path, JSON_EXTRACT(@str, @path);
@str @path JSON_EXTRACT(@str, @path)
{"\u00e4":"yes"} $."\u00e4" "yes"