Bug #30803 Unable to dump and re-read a mysqldump containing a latin1 146 char

Submitted: 4 Sep 2007 17:15 Modified: 4 Sep 2007 17:45
Reporter: Kristian Koehntopp Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:5.0.46 OS:Any
Assigned to: CPU Architecture:Any

[4 Sep 2007 17:15] Kristian Koehntopp
Description:
I have data in a MySQL-4.1.14-max installation that I want to dump and reload it into a MySQL-5.0.46 installation.

This is not working because of a 

Warning (Code 1366): Incorrect string value: '\xC2\x92s Wa...' for column 'NAME' at row 182

How to repeat:
Using mysql 5.0.46 client tools to talk to a 4.1.14-max:

mysql> select version(), PK, NAME, HEX(NAME) from CATALOG_ARTICLE where PK = 69153;
+----------------+-------+----------------------------------------+------------------------------------------------------------------------------+
| version()      | PK    | NAME                                   | HEX(NAME)                                                                    |
+----------------+-------+----------------------------------------+------------------------------------------------------------------------------+
| 4.1.14-Max-log | 69153 | Bogner Fire + Ice Womens Watch Impuls | 426F676E65722046697265202B2049636520576F6D656E927320576174636820496D70756C73 |
+----------------+-------+----------------------------------------+------------------------------------------------------------------------------+
1 row in set (0.00 sec)

I now dump this data using the 5.0.46 mysqldump (using the 4.1 mysqldump does not make a difference)

nvag-blade0108:~ # mysqldump --version
mysqldump  Ver 10.11 Distrib 5.0.46, for unknown-linux-gnu (x86_64)
nvag-blade0108:~ # mysqldump -h nvag-blade0107 -u kris -pg33k bogner_shop CATALOG_ARTICLE > /tmp/kris.sql

I am reading the dump into 5.0.46 mysqld:

nvag-blade0108:~ # mysql -u root -p bogner_shop
mysql> select version();
+-----------------------+
| version()             |
+-----------------------+
| 5.0.46-enterprise-log |
+-----------------------+
1 row in set (0.00 sec)

mysql> warnings
Show warnings enabled.

myql> source /tmp/kris.sql
...
Query OK, 4107 rows affected, 6 warnings (0.27 sec)
Records: 4107  Duplicates: 0  Warnings: 0

Warning (Code 1366): Incorrect string value: '\xC2\x92s Wa...' for column 'NAME' at row 1323
...

Suggested fix:
Write a dump file that can be read again.
[4 Sep 2007 17:45] Kristian Koehntopp
Workaround: use --default-character-set=latin1 when producing the dump. This will avoid triggering trhe problem in the first place.
[7 Jan 2008 12:20] Andreas Götz
Could you cross-check this bug here:
http://bugs.mysql.com/bug.php?id=33475

The workaround is nice but does not solve the actual issue.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.