Bug #2750 | select right(foo, 1) from varchar column returns right most-non space | ||
---|---|---|---|
Submitted: | 12 Feb 2004 8:40 | Modified: | 22 Mar 2004 10:02 |
Reporter: | Keith Gabryelski | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.1a-alpha-nt | OS: | Windows (xp) |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[12 Feb 2004 8:40]
Keith Gabryelski
[16 Feb 2004 9:24]
Brian Aker
The behavior is correct by current design. In one example you have a fixed string and in the other you have a varchar (which is packed).
[22 Mar 2004 8:23]
Paul DuBois
Trailing spaces are removed when values are stored in a VARCHAR column. This is documented at: http://www.mysql.com/doc/en/Column_types.html and: http://www.mysql.com/doc/en/CHAR.html