Bug #21152 | a char type field don't save trailing spaces | ||
---|---|---|---|
Submitted: | 19 Jul 2006 14:16 | Modified: | 19 Jul 2006 16:16 |
Reporter: | Lu Tao | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1.11beta | OS: | Solaris (Solaris) |
Assigned to: | CPU Architecture: | Any | |
Tags: | char, ending spaces |
[19 Jul 2006 14:16]
Lu Tao
[19 Jul 2006 16:01]
Hartmut Holzgraefe
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php See also http://dev.mysql.com/doc/refman/5.0/en/char.html
[19 Jul 2006 16:16]
Lu Tao
I notice The length of a CHAR column is fixed to the length that you declare when you create the table. The length can be any value from 0 to 255. When CHAR values are stored, they are right-padded with spaces to the specified length. When CHAR values are retrieved, trailing spaces ARE removed. but why retrieved values trailing spaces ARE removed?