Bug #43080 | A cp932 table: 2 byte character comes in INSERT to a column of CHAR(1) | ||
---|---|---|---|
Submitted: | 21 Feb 2009 15:23 | Modified: | 22 Feb 2009 13:38 |
Reporter: | Hiroyuki Nishimura | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
Version: | 5.1.29 | OS: | Windows (2003 Server) |
Assigned to: | CPU Architecture: | Any |
[21 Feb 2009 15:23]
Hiroyuki Nishimura
[22 Feb 2009 12:13]
Valeriy Kravchuk
Sorry, but this is not a bug. Please, read http://dev.mysql.com/doc/refman/5.1/en/char.html (and http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_char-length). CHAR(N) column accepts up to N chars, not bytes.
[22 Feb 2009 13:38]
Hiroyuki Nishimura
OK, I read ... http://dev.mysql.com/doc/refman/5.1/en/char.html http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_char-length http://dev.mysql.com/doc/refman/5.1/ja/storage-requirements.html >The CHAR and VARCHAR types are declared with a length that indicates > the maximum number of characters you want to store. For example, CHAR(30) > can hold up to 30 characters. Roger! I close it. # Are these specifications good by 4.1 recognition? # In cp932 environment, are NCHAR and CHAR that it is treated the same class? # When data migration from the duties system which is Japanese Legacy, these # specifications are severe. # # When there is CHAR(1 byte) or appointment such as CHAR(1 char) like Oracle, I # am glad.