Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.8.8, 2.9.2
-
MySQL
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-51052_master -
Description
I've encountered the following use case in my testing environment:
- I'm using mysql
- My default collation is set to utf8_bin in order to resolve various database collation unit testing issues
- I'm building a query which is both case insensitive and accent insensitive
The case insensitive + accent sensitive lowercases the strings and then sets the utf8_bin collation. Case insensitive + accent insensitive does neither; probably because with either utf8_general_ci or utf8_unicode_ci this query will work as expected.
The unit test coverage doesn't include this use case (false, false) but it probably should. One way to fix this would be to explicitly declare one of the two standard collations. This isn't a big deal, but if anyone's running on utf8_bin or using a test system for development it's an unexpected gotcha.