http://bugzilla.spamassassin.org/show_bug.cgi?id=4019





------- Additional Comments From [EMAIL PROTECTED]  2004-12-06 11:11 -------
I'd swear that you read that too!

Section 4.1.3 (page 116) of the current printed Language Reference book says
that CHAR(x) values are stored right padded with spaces (to a total of x
characters).

However, trailing spaces are removed when CHAR values are retrieved.


Testing this, it does seem to go against the docs since 'test' matches what is
supposed to be 'test ' in the database.  In fact, using LIKE BINARY 'test '
doesn't match what is supposed to be 'test ' in the database, so it seems that
MySQL (4.0.17 anyway) does in fact drop the trailing spaces on INSERT and not
SELECT as the manual seems to infer.

Looking further,  http://dev.mysql.com/doc/mysql/en/Open_bugs.html  says this is
OK though (search for 'trailing').  It appears that BLOB or TEXT would have to
be used to preserve trailing spaces.

Given that they say this is OK, are you sure that ANSI SQL require trailing
spaces to be preserved for CHARs, or that Postgres (and Oracle) does this?


That aside, MySQL doesn't chop off the spaces on both sides.  Leading spaces are
preserved in matches.  So, unless null characters are valid token characters I
don't see what the problem is (other than tokens need to be re-padded when 
dumped).


Daryl



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to