Bug #21255 | alter table varchar(255) to char don't set EndOfString character | ||
---|---|---|---|
Submitted: | 24 Jul 2006 16:12 | Modified: | 9 Aug 2006 13:51 |
Reporter: | patrick Blesson | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | MYSQL V51 (5.1.12-BETA) | OS: | Linux vm10 2.4.20-28.9 #1 Thu D |
Assigned to: | Geert Vanderkelen | CPU Architecture: | Any |
Tags: | alter, char, table, varchar |
[24 Jul 2006 16:12]
patrick Blesson
[24 Jul 2006 16:26]
Valeriy Kravchuk
Thank you for a problem report. Isn't it a duplicate of bug #21254?
[24 Jul 2006 16:56]
patrick Blesson
answer to [24 Jul 18:26] Valeriy Kravchuk > Thank you for a problem report. Isn't it a duplicate of bug #21254? No: there is a bit difference, we try both altering table : CHAR to varchar, and varchar to CHAR in both tests there is some problem, but not exactly the same! -by altering char to varchar we expected that mysql sets correctly size attribut of new varchar string -by altering varchar to char, we expected that mysql adds an EndOfString char ('\0') at old size position in new fixed length string Best regards Patrick
[9 Aug 2006 13:51]
Geert Vanderkelen
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 Additional info: Trailing spaces are kept for CHAR fields and no \0 will be put in to denote the end of the string. This is expected behaviour. Removing of trailing spaces should be done in the NDB API application or using VARCHAR.