Reputation: 22386
The structure of table 'textconstraint' (collation utf8_general_ci) is as follows:
+-----+---------+
| id | pattern |
+-----+---------+
| 11 | Ä |
| 27 | A |
+-----+---------+
When I query
SELECT * FROM textconstraint WHERE pattern = 'A' LIMIT 1;
The following rows are selected
+----+---------+
| id | pattern |
+----+---------+
| 11 | Ä |
+----+---------+
Why A-umlaut
is selected instead of A
?
P.S. I do SET NAMES UTF8
Upvotes: 2
Views: 94
Reputation: 49049
You can try this:
SELECT *
FROM textconstraint
WHERE pattern = BINARY 'A'
See this fiddle.
Upvotes: 1