Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.1
Description
Hi,
I found that JSON_KEYS fails to deduplicate the same key when formatting the data with utf8mb4.
SET @plain_dup='{"a":1,"a":2}'; |
SET @escaped_quote_dup=CONVERT(X'7B22615C2262223A312C22615C2262223A327D' USING utf8mb4); |
|
|
SELECT JSON_KEYS(@plain_dup) AS plain_keys, |
JSON_LENGTH(JSON_KEYS(@plain_dup)) AS plain_key_count; -- ["a"] 1, this is correct |
|
|
SELECT JSON_KEYS(@escaped_quote_dup) AS escaped_quote_keys, |
JSON_LENGTH(JSON_KEYS(@escaped_quote_dup)) AS escaped_quote_key_count; -- ["a\"b", "a\"b"] 2, JSON_KEYS fails to deduplicate this |