>Description:
         'mysqldump --allow-keywords' seems not to work using 
        mysql-3.23.38-1.alpha.rpm or mysql-3.23.41-1.alpha.rpm, i.e. 
        keyword-permissive column names are not produced. The same 
        command works properly on MySQL 3.23.22 on Linux on Intel hardware.            
                                  
>How-To-Repeat:
                The table can be created using:
 
   CREATE TABLE `GeneAnnotation` (
     `AnnotationID` int(11) unsigned NOT NULL default '0',
     `GeneID` varchar(255) default NULL,
     `Key` varchar(255) default NULL,
     `Value` varchar(255) default NULL,
     PRIMARY KEY  (`AnnotationID`)
   ) TYPE=MyISAM ;
 
   The following command:
 
        mysqldump --allow-keywords  -p -u root -d minimal_pa14 GeneAnnotation
 
   Produces the problematic output:
 
    # MySQL dump 8.14
    #
    # Host: localhost    Database: minimal_pa14
    #--------------------------------------------------------
    # Server version    3.23.41
 
    #
    # Table structure for table 'GeneAnnotation'
    #
 
    CREATE TABLE GeneAnnotation (
      AnnotationID int(11) unsigned NOT NULL default '0',
      GeneID varchar(255) default NULL,
      Key varchar(255) default NULL,
      Value varchar(255) default NULL,
      PRIMARY KEY  (AnnotationID)
    ) TYPE=MyISAM;
 
        The line beginning with 'Key' causes problems.               
########A short shell script to reproduce the problem...######
 
#!/bin/sh
 
# Creating the problematic db table with a column named 'Key'
 
echo '   CREATE TABLE `GeneAnnotation` (
     `AnnotationID` int(11) unsigned NOT NULL default '0',
     `GeneID` varchar(255) default NULL,
     `Key` varchar(255) default NULL,
     `Value` varchar(255) default NULL,
     PRIMARY KEY  (`AnnotationID`)
   ) TYPE=MyISAM ;' | mysql test
 
mysqldump --allow-keywords   -d test GeneAnnotation
 
# Cleaning up...
 
echo ' drop table test.GeneAnnotation;' | mysql test
#############End Shell Script############               


>Fix:
        Workarounds:
        Add backquotes (`) manually to the mysqldump output where the
        column name is key.
        Alternatively, the programmer could avoid using keywords in
        the first place!                           

>Submitter-Id:  <submitter ID>
>Originator:    Jonathan M. Urbach
>Organization:  Massachusetts General Hospital dept of Molecular Biology
 
>MySQL support: none 
>Synopsis:        'mysqldump --allow-keywords' produces non-keyword friendly scripts. 
>Severity:      non-critical
>Priority:      low
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.41 (Source distribution)

>Environment:
       Alpha, Linux RedHat 7.0  
System: Linux lassie.mgh.harvard.edu 2.2.17-4 #1 Mon Oct 23 15:19:13 EDT 2000 alpha 
unknown
Architecture: alpha

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
Compilation info: CC='gcc'  CFLAGS='-O2 -mieee -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE'  CXX='c++'  CXXFLAGS='-O2 -mieee -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'  LDFLAGS=''
LIBC: 
lrwxrwxrwx    1 root     root           13 Jun 14 15:14 /lib/libc.so.6.1 -> 
libc-2.2.3.so
-rwxr-xr-x    1 root     root      9927184 May 27 15:02 /lib/libc-2.2.3.so
-rw-r--r--    1 root     root     23047758 May 27 15:01 /usr/lib/libc.a
-rw-r--r--    1 root     root          180 May 27 15:01 /usr/lib/libc.so
Configure command: ./configure  alpha-redhat-linux --prefix=/usr --exec-prefix=/usr 
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec 
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --without-debug --without-readline --enable-shared 
--with-extra-charsets=complex --with-bench --localstatedir=/var/lib/mysql 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql 
--with-extra-charsets=all --disable-assember --with-thread-safe-client 
--enable-assembler


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to