Reputation: 681
There is a table with the following stucture:
Here are the data in this table:
SELECT LOWER(md5_upper_bin), LOWER(md5_upper_ge_ci), UPPER(md5_lower_bin), UPPER(md5_lower_ge_ci) FROM qwew
The result is:
The question: why the postfix _bin
have been ignored? According to MySQL manual, we can say that _bin
affects to such functions like LOWER and UPPER too (and make them not working because binary-type collaction is used in these fields). But we've got another results in practice. Why?
Upvotes: 0
Views: 123
Reputation: 30983
CHAR
and VARCHAR
store nonbinary strings, not binary strings. You have to change the actual column type to BINARY
or VARBINARY
for the _bin
collation to affect UPPER
and LOWER
functions applied to data within them.
Upvotes: 2