Bug #7997 Add implicit --skip-set-charset when mysqldump from 4.0 server w/ 4.1 client
Submitted: 19 Jan 2005 0:16 Modified: 1 Mar 2005 20:30
Reporter: Lachlan Mulcahy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:4.1.x OS:
Assigned to: Alexander Barkov CPU Architecture:Any

[19 Jan 2005 0:16] Lachlan Mulcahy
Description:
Would it be possible to set --skip-set-charset when dumping out of a MySQL 4.0 database with a MySQL 4.1 mysqldump binary? 

This way "/*!40101 SET NAMES utf8 */;" isn't output at the top which can cause problems loading this data into a MySQL 4.1 database.

How to repeat:
See Desc.

Suggested fix:
See Desc.
[21 Jan 2005 17:38] Timothy Smith
Exact instructions on repeating this bug:

On a MySQL 4.0 server (e.g., 4.0.24), running with latin1 character set:

use test;
create table dump_me (v varchar(255));
insert into dump_me (v) values (0xa9);  -- copyright symbol

With a MySQL 4.1 version of mysqldump (e.g. Ver 10.9 Distrib 4.1.10):

./bin/mysqldump test dump_me

Notice two facts.  1) it issues "SET NAMES utf8" at the top; and 2) the insert statement encodes the string in latin1 (a single byte with value 0xa9).  That's not valid UTF-8.
[21 Jan 2005 17:41] Timothy Smith
Output from ./bin/mysqldump -S~/m/40/m/data/mysql.sock test dump_me

Attachment: dump_me.sql.gz (application/gzip, text), 515 bytes.

[1 Mar 2005 20:30] Paul DuBois
Noted in 4.1.11, 5.0.3 changelogs.