iling spaces are always droped, which shouldn't be.
- Original Message -
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 11:36 PM
Subject: Re: this is WEAK!
> At 15:06 -0600 11/27/
Thanks!
>
> >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.
Ach. I was misreading the original message the entire time.
The reason you see the behavior below for the second query is that
the comparisons are done without regard for trailing spaces.
If you change the column type to TEXT, the second query will
return nothing. (On the other hand, another ef
mysql> select LENGTH(contact) from options where member='me ';
+-+
| LENGTH(contact) |
+-+
| 2 |
+-+
1 row in set (0.01 sec)
On Wed, Nov 27, 2002 at 03:36:03PM -0600, Paul DuBois wrote:
> At 15:06 -0600 11/27/02, [EMAIL PROTECTED] wrot
In the last episode (Nov 27), [EMAIL PROTECTED] 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 |
At 15:06 -0600 11/27/02, [EMAIL PROTECTED] wrote:
member varchar(16) NOT NULL default '',
PRIMARY KEY (member),
Huh. That is weird, then. What does LENGTH(contact) return?
On Wed, Nov 27, 2002 at 03:28:15PM -0600, Paul DuBois wrote:
At 14:48 -0600 11/27/02, [EMAIL PROTECTED] wrote:
>Wh
member varchar(16) NOT NULL default '',
PRIMARY KEY (member),
On Wed, Nov 27, 2002 at 03:28:15PM -0600, Paul DuBois wrote:
> At 14:48 -0600 11/27/02, [EMAIL PROTECTED] wrote:
> >Why? (Note the extra space after "me" in the second select)
>
> Hardly enough information to go on. Apparently you'r
At 14:48 -0600 11/27/02, [EMAIL PROTECTED] wrote:
Why? (Note the extra space after "me" in the second select)
Hardly enough information to go on. Apparently you're using a
column type like BLOB or TEXT for which trailing spaces are not
removed?
Your MySQL connection id is 6021 to server vers
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 option