It is a known problem, I saw a bug report go through about it a day or so ago.

One workaround I found is to rename the key.  I think the problem may have 
something to do with the name of the key also being column name or a 
special token.

In my case, I had:

int User,
key User(User)

and I changed it to

int USer,
key UserKey(User)

...and it fixed the problem.

So, you might try

key midkey(mid)

-bill




At 01:06 PM 3/16/2001 +0100, Kristian Köhntopp wrote:

>Short version: mysqldump seems to produce a "KEY mid(mid)"
>statement, which mysql does not understand. Using
>KEY (mid) instead of KEY mid(mid) works, though.
>
>Is this a known problem? Is this an oversight by me?
>
>Long version:
>
>kk@lenz ~ $ cat /etc/SuSE-release
>SuSE Linux 7.1 (i386)
>VERSION = 7.1
>
>including all updates from ftp.suse.com, running
>
>mysql> select version() as version;
>+-------------+
>| version     |
>+-------------+
>| 3.23.32-log |
>+-------------+
>1 row in set (0.01 sec)
>
>kk@lenz ~ $ mysqldump test_passwd dokumentation
># MySQL dump 8.12
>#
># Host: localhost    Database: test_passwd
>#--------------------------------------------------------
># Server version        3.23.32-log
>
>#
># Table structure for table 'dokumentation'
>#
>
>CREATE TABLE dokumentation (
>   did int(11) NOT NULL default '0',
>   mid int(11) NOT NULL default '0',
>   beschreibung text,
>   filename varchar(255) NOT NULL default '',
>   mimetype varchar(255) NOT NULL default '',
>   changed timestamp(14) NOT NULL,
>   PRIMARY KEY (did),
>   KEY mid(mid)
>) TYPE=MyISAM;
>
>#
># Dumping data for table 'dokumentation'
>#
>kk@lenz ~ $ mysql test_passwd
>Reading table information for completion of table and column
>names
>You can turn off this feature to get a quicker startup with -A
>
>Welcome to the MySQL monitor.  Commands end with ; or \g.
>Your MySQL connection id is 35 to server version: 3.23.32-log
>
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer
>
>mysql> drop table dokumentation;
>Query OK, 0 rows affected (0.00 sec)
>
>mysql> CREATE TABLE dokumentation (
>     ->   did int(11) NOT NULL default '0',
>     ->   mid int(11) NOT NULL default '0',
>     ->   beschreibung text,
>     ->   filename varchar(255) NOT NULL default '',
>     ->   mimetype varchar(255) NOT NULL default '',
>     ->   changed timestamp(14) NOT NULL,
>     ->   PRIMARY KEY (did),
>     ->   KEY mid(mid)
>     -> ) TYPE=MyISAM;
>ERROR 1064: You have an error in your SQL syntax near 'mid(mid)
>) TYPE=MyISAM' at line 9
>
>but
>
>mysql> CREATE TABLE dokumentation (
>     ->   did int(11) NOT NULL default '0',
>     ->   mid int(11) NOT NULL default '0',
>     ->   beschreibung text,
>     ->   filename varchar(255) NOT NULL default '',
>     ->   mimetype varchar(255) NOT NULL default '',
>     ->   changed timestamp(14) NOT NULL,
>     ->   PRIMARY KEY (did),
>     ->   KEY (mid)
>     -> ) TYPE=MyISAM;
>Query OK, 0 rows affected (0.01 sec)
>
>Kristian
>
>--
>Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel
>Tel: +49 431 386 436 00, Fax: +49 431 386 435 99
>
>---------------------------------------------------------------------
>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


---------------------------------------------------------------------
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

Reply via email to