Changes between Version 1 and Version 2 of Ticket #39768, comment 9
- Timestamp:
- 12/22/2019 06:25:01 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39768, comment 9
v1 v2 8 8 It looks like that could introduce some unintended regressions when dealing with accented characters, or if the column charset doesn't match the session charset, e.g. `latin1` vs. `utf8mb4`. 9 9 10 Using `CONVERT()` appears to be a better option. While `utf8mb4` should be available on any modern install, that may not always be the case, so we have to check for it specifically, and fall back to the current query otherwise. This option also has someperformance difference from the queries above in my testing:10 Using `CONVERT()` appears to be a better option. While `utf8mb4` should be available on any modern install, that may not always be the case, so we have to check for it specifically, and fall back to the current query otherwise. This option also has a minor performance difference from the queries above in my testing: 11 11 {{{ 12 12 SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = CONVERT( '2009/03/myimage.jpg' USING utf8mb4 ) COLLATE utf8mb4_bin