Apparently a very rare issue, but IMO extremely annoying and WRONG: Trailing whitespace in MySQL aren't used in comparison:
mysql> SELECT "A" = "A ";
+------------+
| "A" = "A " |
+------------+
|          1 |
+------------+
1 row in set (0.00 sec)
This is especially problematic in the following scenario:
mysql> SELECT COUNT(*) FROM eq WHERE name != TRIM(name);
+------------+
| COUNT(*)   |
+------------+
|          0 |
+------------+
1 row in set (0.00 sec)
mysql> UPDATE eq SET name=TRIM(name);
Query OK, 866 row affected (0.01 sec)
Rows matched: 650907  Changed: 866  Warnings: 0
Is there a way to configure MySQL to treat whitespace properly?
 
     
     
     
    