[EMAIL PROTECTED] writes:
> >Description:
>
> As of mysql 3.23.33, a dumpfile generated with mysqldump (using the flags:
> --opt --all-databases) creates a file which will not be uploaded correctly
> using the mysql client (as in: 'mysql -u root -pXXXXXX -q -s <
>dumpfile.sql').
>
> Specifically, the problem relates to mysqldump's outputting of table keys.
> See the actual dump of mysql.db below:
>
> DROP TABLE IF EXISTS db;
> CREATE TABLE db (
> Host char(60) binary NOT NULL default '',
> Db char(64) binary NOT NULL default '',
> User char(16) binary NOT NULL default '',
> Select_priv enum('N','Y') NOT NULL default 'N',
> Insert_priv enum('N','Y') NOT NULL default 'N',
> Update_priv enum('N','Y') NOT NULL default 'N',
> Delete_priv enum('N','Y') NOT NULL default 'N',
> Create_priv enum('N','Y') NOT NULL default 'N',
> Drop_priv enum('N','Y') NOT NULL default 'N',
> Grant_priv enum('N','Y') NOT NULL default 'N',
> References_priv enum('N','Y') NOT NULL default 'N',
> Index_priv enum('N','Y') NOT NULL default 'N',
> Alter_priv enum('N','Y') NOT NULL default 'N',
> PRIMARY KEY (Host,Db,User),
> KEY User(User) <---- pukes on this line
> ) TYPE=MyISAM COMMENT='Database privileges';
>
> If a space is added (as in: "KEY User (User)"), the file will import correctly.
>
> I looked through the source file mysqldump.c and it appears that there always
> should be a space between the key name and the key columns, but my personal
> dumpfiles show that all non-primary keys have no space between the key name
> and the key column names. Go figure. :) Needless to say I don't get it.
>
> >How-To-Repeat:
> See above description.
> >Fix:
> See above description.
>
> >Submitter-Id: <submitter ID>
> >Originator: Matt Loschert
> >Organization:
>
> Matt Loschert | email: [EMAIL PROTECTED] |
> Software Engineer | web: http://www.servint.net/ |
> ServInt Internet Services | phone: (703) 847-1381 |
>
> >
> >MySQL support: none
> >Synopsis: mysqldump output file not valid as input file for mysql client
> >Severity: non-critical
> >Priority: medium
> >Category: mysql
> >Class: sw-bug
> >Release: mysql-3.23.33 (Source distribution)
>
> >Environment:
>
> System: FreeBSD delft.servint.com 4.2-STABLE FreeBSD 4.2-STABLE #0: Tue Feb 6
>11:43:35 EST 2001
>[EMAIL PROTECTED]:/disk2/cvsup/branches/releng_4/obj/disk2/cvsup/branches/releng_4/src/sys/QUICKIE
> i386
>
>
> Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
>/usr/bin/cc
> GCC: Using builtin specs.
> gcc version 2.95.2 19991024 (release)
> Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS=''
> LIBC:
> -r--r--r-- 1 root wheel 1169450 Feb 6 12:05 /usr/lib/libc.a
> lrwxr-xr-x 1 root wheel 9 Feb 6 12:05 /usr/lib/libc.so -> libc.so.4
> -r--r--r-- 1 root wheel 559516 Feb 6 12:05 /usr/lib/libc.so.4
> Configure command: ./configure --prefix=/usr/local/mysql-23.33 --with-low-memory
> Perl: This is perl, version 5.005_03 built for i386-freebsd
>
Hi!
The above happens as USER is a keyword in MySQL.
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php