Bug #90602 | WHERE statements with JSON extraction do not follow the table collation | ||
---|---|---|---|
Submitted: | 24 Apr 2018 12:00 | Modified: | 30 May 2018 14:49 |
Reporter: | Dieter Devlieghere | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: JSON | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Ubuntu |
Assigned to: | CPU Architecture: | Any | |
Tags: | EXTRACT, json |
[24 Apr 2018 12:00]
Dieter Devlieghere
[26 Apr 2018 9:09]
Jonathan Vercoutere
Data stored in a JSON field uses the utf8mb4_bin collation, so you're also going to run into unexpected disrepancies concerning case sensitivity. Preferred behaviour would see the JSON contents using the same collation as defined on the table they are in. Ultimately there are workarounds to solve this issue, but they increase code complexity and decrease performance. The inconsistency also increases the likelihood of unknowingly introducing bugs.
[30 Apr 2018 14:49]
MySQL Verification Team
Please read: https://dev.mysql.com/doc/refman/5.7/en/json.html#json-comparison "MySQL handles strings used in JSON context using the utf8mb4 character set and utf8mb4_bin collation. Strings in other character sets are converted to utf8mb4 as necessary."
[1 Jun 2018 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".