In the last episode (Feb 21), Zhestkov Victor said:
> I have a table with varchar column and when I execute SELECT query like that:
> SELECT * FROM sometable WHERE somecolumn='abc '; it returns records which
> contain records with bo 'abc ' value, and which are only 'abc'.
> Thry this SELECT 'abc' = 'abc '; it returns true. I think it rather strange.
> I have mysql installed from Debian 3.0 r0.
From the docs:
* All string columns, except `BLOB' and `TEXT' columns, automatically
have all trailing spaces removed when retrieved. For `CHAR' types
this is okay, and may be regarded as a feature according to ANSI
SQL92. The bug is that in MySQL Server, `VARCHAR' columns are
treated the same way.
It's mentioned in 3 other places as well.