In the last episode (Nov 27), johnt@stripped said:
> Why? (Note the extra space after "me" in the second select)
>
> Your MySQL connection id is 6021 to server version: 3.23.41-log
>
> mysql> select contact from options where member='me';
> +---------+
> | contact |
> +---------+
> | me |
> +---------+
> 1 row in set (0.00 sec)
>
> mysql> select contact from options where member='me ';
> +---------+
> | contact |
> +---------+
> | me |
> +---------+
> 1 row in set (0.00 sec)
From http://www.mysql.com/doc/en/Bugs.html:
* 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 also mentioned in
http://www.mysql.com/doc/en/Differences_from_ANSI.html .
--
Dan Nelson
dnelson@stripped