Bug #20542 fill_help_tables.sql Does Not Work With ANSI_QUOTES
Submitted: 19 Jun 2006 17:24 Modified: 20 Jun 2006 19:03
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 x86_64)
Assigned to: Paul DuBois CPU Architecture:Any

[19 Jun 2006 17:24] imacat .
Description:
Hi.  This is imacat from Taiwan.  I found that fill_help_tables.sql does not work with ANSI_QUOTES.  With ANSI_QUOTES turned on in my.cnf, mysql_install_db only successfully inserts the help_relation table.  All other tables (help_category, help_topic and help_keyword) fail.  If I import fill_help_tables.sql manually by

mysql -u root mysql < scripts/fill_help_tables.sql

Then it stops with:

ERROR 1054 (42S22) at line 30: Unknown column 'Geographic' in 'field list'

I believe it's because in fill_help_tables.sql the double-quoted "Geographic" is treated as a column name, according to the ANSI SQL standard.

I can fix it, but since this file is maintained by you (the notice "DO NOT EDIT THIS FILE. It is generated automatically." in the file), I think it's better that you can fix it.

How to repeat:
Add this to my.cnf:

[mysqld]
sql-mode = ANSI_QUOTES

and run

# mysql_install_db

or

# mysql -u root mysql < scripts/fill_help_tables.sql

Suggested fix:
Fix the quotes in fill_help_tables.sql with ANSI SQL standard.  Use single quote instead of double quote.
[20 Jun 2006 0:52] Paul DuBois
I've fixed the script in the mysqldoc repository
(tools/fill_help_tables2.pl) that generates the
fill_help_tables.sql file.  The corrected files will
be part of future MySQL releases, but you can get
the corrected file now from:

http://dev.mysql.com/doc/
[20 Jun 2006 19:03] 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:19] Paul DuBois
Noted in 4.1.21, 5.0.23, 5.1.12 changelogs.

The fill_help_tables.sql file did not load properly if the ANSI_QUOTES
SQL mode was enabled.