Bug #20551 fill_help_tables.sql Lacks Character Encoding Declaration
Submitted: 20 Jun 2006 5:31 Modified: 20 Jun 2006 19:02
Reporter: imacat . (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.22 OS:Linux (Linux 2.6.16.14)
Assigned to: Paul DuBois CPU Architecture:Any

[20 Jun 2006 5:31] imacat .
Description:
    Hi.  This is imacat from Taiwan.

    Continue from Bug#20542.  The just-updated fill_help_tables.sql seems to lack the character encoding declaration.  I tried it and failed:

# gunzip -c fill_help_tables-5.0.sql.gz | mysql mysql
Enter password:
ERROR 1406 (22001) at line 276: Data too long for column 'description' at row 1

    I digged into the issue for some time and found that fill_help_tables-5.0.sql is in UTF-8 and my console is set with default-character-set=big5.  I think a line at the beginning

set names 'utf8';

    should solve the problem.

    Please tell me if there is any problem.

How to repeat:
In my.cnf

[mysql]
default-character-set=big5

then run

# gunzip -c fill_help_tables-5.0.sql.gz | mysql mysql
Enter password:
ERROR 1406 (22001) at line 276: Data too long for column 'description' at row 1

Suggested fix:
The patch is below.  Hope this helps.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --- fill_help_tables-5.0.sql.orig     2006-06-20 13:17:58.000000000 +0800
+++ fill_help_tables-5.0.sql    2006-06-20 13:16:04.000000000 +0800
@@ -22,6 +22,7 @@

 --     mysql -u root -p mysql < file_name

+set names 'utf8';
 delete from help_topic;
 delete from help_category;
 delete from help_keyword;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEl4dbi9gubzC5S1wRApKyAJ4kU+ugVhCxZLP1eV+QaBXwj5Cc6gCgh989
Rq/A/z/bexq94V3XgwYiNNs=
=/n49
-----END PGP SIGNATURE-----
[20 Jun 2006 11:08] Valeriy Kravchuk
Thank you for a problem report and a patch. Yes, there is not SET NAMES statement in fill_help_tables.sql. It is a bug.
[20 Jun 2006 19:02] imacat .
I have downloaded the updated fill_help_tables-5.0.sql.gz from http://dev.mysql.com/doc/ .  I think the problem is fixed.  Thank you. *^_^*
[20 Jun 2006 19:20] Paul DuBois
Noted in 4.1.21, 5.0.23, 5.1.12 changelogs.

The fill_help_tables.sql file did not contain a SET NAMES 'utf8'
statement to indicate its encoding. This caused problems for some
settings of the MySQL character set such as big5.