Bug #3323 --no-set-names option for mysqldump is problematic
Submitted: 29 Mar 2004 6:48 Modified: 30 Mar 2004 18:40
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:4.1 OS:
Assigned to: CPU Architecture:Any

[29 Mar 2004 6:48] Paul DuBois
In MySQL 4.1.0, a --no-set-names option was added to

  {"no-set-names", 'N',
   "'SET NAMES charset_name' will not be put in the output.",
   (gptr*) &opt_set_names, (gptr*) &opt_set_names, 0, GET_BOOL, NO_ARG, 0, 0,
   0, 0, 0, 0},

There are two problematic aspects to this option:

1) In MySQL 4.1.1, mysqldump was changed so that SET NAMES
does not appear in the output, whether or not the option is
used.  So its description is a bit misleading now.

2) The option is boolean, which means that to disable it, you
use --skip-no-set-names, which means "don't don't set names".
Ugh. :-)  It'd probably be better to use an option of --set-names
so that the disabling form would be simply --skip-set-names.

How to repeat:
See above.
[30 Mar 2004 6:55] Dean Ellis
As the current behavior sets CHARACTER_SET_CLIENT by default, perhaps the option should be --set-charset or something similar.  This seems like a something that might also be considered for inclusing in the --opt set of options.
[30 Mar 2004 18:40] Jani Tolonen
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Changeset number 1.1752