mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-12774 JSON_EXTRACT fails with some escaped unicode as key.
Tests added.
This commit is contained in:
@ -686,3 +686,13 @@ JSON_SET('{}', '$.age', 87)
|
|||||||
SELECT JSON_MERGE('[]', '{"c":"d"}');
|
SELECT JSON_MERGE('[]', '{"c":"d"}');
|
||||||
JSON_MERGE('[]', '{"c":"d"}')
|
JSON_MERGE('[]', '{"c":"d"}')
|
||||||
[{"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"
|
||||||
|
@ -338,3 +338,14 @@ SELECT JSON_SET('{}', '$.age', 87);
|
|||||||
#
|
#
|
||||||
SELECT JSON_MERGE('[]', '{"c":"d"}');
|
SELECT JSON_MERGE('[]', '{"c":"d"}');
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-12774 JSON_EXTRACT fails with some escaped unicode as key.
|
||||||
|
#
|
||||||
|
|
||||||
|
SET @str = "{\"\\u00e4\\u00f6\":\"yes\"}";
|
||||||
|
SET @path = "$.\"\\u00e4\\u00f6\"";
|
||||||
|
select @str, @path, JSON_EXTRACT(@str, @path);
|
||||||
|
SET @str = "{\"\\u00e4\":\"yes\"}";
|
||||||
|
SET @path = "$.\"\\u00e4\"";
|
||||||
|
select @str, @path, JSON_EXTRACT(@str, @path);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user