| Bug #26438 | invalidate character result in truncated data when inserting to gbk table | ||
|---|---|---|---|
| Submitted: | 16 Feb 2007 2:18 | Modified: | 16 Mar 2007 10:22 |
| Reporter: | xuefer tinys | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
| Version: | 5.0.32 | OS: | Linux (gentoo-linux-x86_64) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | gbk, truncate | ||
[16 Feb 2007 10:22]
Sveta Smirnova
Thank you for the report. Error seems as in already fixed Bug #23619. Please try with 5.0.36, 5.1.15 or current sources and say us results. MySQL 5.1.15 you can load from http://dev.mysql.com/downloads/mysql/5.1.html MySQL 5.0.36 is not available yet. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html
[17 Mar 2007 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".

Description: u can't read the string '他\?\?test', but u may recover it with xxd -r from -- 0000000: 2327 cbfb 5cb4 285c ec2c 7465 7374 270a #'..\.(\.,test'. the string is truncated when inserted into gbk table, but i expect it to store complete data with invalidate char replcated with '?' like when i query from utf8 table/field How to repeat: connection charset is gbk =======a.sql======== USE test; DROP TABLE IF EXISTS `test`; CREATE TABLE IF NOT EXISTS `test` ( `value` varchar(10) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=gbk; INSERT INTO `test` VALUES ('他\?\?test'); -- the string after `xxd`: -- 0000000: 2327 cbfb 5cb4 285c ec2c 7465 7374 270a #'..\.(\.,test'. SELECT CHAR_LENGTH(value), LENGTH(value) FROM `test`; =============== mysql < test.sql CHAR_LENGTH(value) LENGTH(value) value 1 2 他 for CHARSET=utf8 mysql < test.sql CHAR_LENGTH(value) LENGTH(value) value 7 9 他??test