Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
13.1
-
Unexpected results
-
Because JSON_CONTAINS and JSON_EQUALS did not compare JSON arguments based on string semantic, the equalities of differing representations were missed; fix thanks to Geng Tian
Description
Hi,
I found that JSON_CONTAINS and JSON_EQUALS do not compare strings based on string semantics. This is an example:
SELECT JSON_CONTAINS('"A"', '"\\u0041"'); -- 0 |
SELECT JSON_CONTAINS('"\\u0041"', '"A"'); -- 0 |
SELECT JSON_OVERLAPS('"A"', '"\\u0041"'); -- 0 |
SELECT JSON_EQUALS('"A"', '"\\u0041"'); -- 0 |
SELECT JSON_UNQUOTE('"A"') = JSON_UNQUOTE('"\\u0041"'); -- 1 |
Attachments
Issue Links
- causes
-
MDEV-41796 JSON_NORMALIZE emits invalid JSON or changes object-member names containing escaped characters
-
- Confirmed
-
- is duplicated by
-
MDEV-41893 JSON_CONTAINS, JSON_EQUALS and JSON_OVERLAPS do not decode \uXXXX escapes before comparing
-
- Closed
-
- relates to
-
MDEV-40478 main.func_json_unicode_escape test unpredicatable under view protocol
-
- Closed
-