Hi, can someone from the mysql developers tell me what i did wrong, if this is a bug? I converted back to 3.23.42 to be on the safe side. ;) TIA
-- Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs MIPS / Institute for Bioinformatics <http://mips.gsf.de> GSF - National Research Center for Environment and Health Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany tel.: +49-89-3187 3616 , fax: +49-89-3187 3585 ---------- Forwarded message ---------- Date: Wed, 9 Jan 2002 21:08:09 +0100 From: Roger Baklund <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: Martin MOKREJŠ <[EMAIL PROTECTED]> Subject: RE: Cannot import mysql dump * Martin MOKREJŠ > I have a problem to re-import sql dump from Linux 2.2.19 running > mysql Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686) > into the same mysqld under different database. > > while running the same commandline on the source at least. > > $ mysqldump --extended-insert Bordetella_pertussis_Tohama_I > nonglob_data | mysql mmo > ERROR 1064 at line 11: You have an error in your SQL syntax near > 'PRIMARY (id), > KEY contig_data_id (contig_data_id), > KEY contig_data_id_2 (con' at line 9 > $ > > Could someone explain me where is the error? I don't know why this happens, but read below... > The dump looks like: > > $ mysqldump --extended-insert Bordetella_pertussis_Tohama_I > nonglob_data | less > # MySQL dump 8.16 > # > # Host: xxx Database: Bordetella_pertussis_Tohama_I > #-------------------------------------------------------- > # Server version 3.23.44-log > > # > # Table structure for table 'nonglob_data' > # > > CREATE TABLE nonglob_data ( > id int(11) NOT NULL default '0', > contig_data_id int(11) NOT NULL default '0', > contig_data_code varchar(100) NOT NULL default '', > code varchar(100) NOT NULL default '', > descr varchar(255) default NULL, > dat longtext, > created varchar(100) NOT NULL default '', > UNIQUE KEY PRIMARY (id), The error message suggests the problem is in the above line. From the documentation: create_definition: col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] [PRIMARY KEY] [reference_definition] or PRIMARY KEY (index_col_name,...) or KEY [index_name] (index_col_name,...) or INDEX [index_name] (index_col_name,...) or UNIQUE [INDEX] [index_name] (index_col_name,...) or FULLTEXT [INDEX] [index_name] (index_col_name,...) or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) [reference_definition] or CHECK (expr) You can have "UNIQUE", "KEY" or "PRIMARY KEY", but not all at the same time... I have no idea why mysqldump creates this statement. But there is more... > KEY contig_data_id (contig_data_id), > KEY contig_data_id_2 (contig_data_id), > KEY contig_data_code (contig_data_code), > KEY contig_data_id_3 (contig_data_id), Why are there multiple indexes for the same fields? > KEY code (code), > KEY contig_data_id_4 (contig_data_id), > KEY descr (descr), > KEY contig_data_code_2 (contig_data_code), > KEY contig_data_code_3 (contig_data_code), > KEY code_2 (code), > KEY contig_data_code_4 (contig_data_code), > KEY code_3 (code), > KEY contig_data_id_5 (contig_data_id), > KEY contig_data_id_6 (contig_data_id), > KEY code_4 (code), > KEY descr_2 (descr), > KEY descr_3 (descr), > KEY contig_data_code_5 (contig_data_code), > KEY contig_data_code_6 (contig_data_code), > KEY descr_4 (descr), > KEY contig_data_id_7 (contig_data_id), > KEY contig_data_id_8 (contig_data_id), > KEY contig_data_code_7 (contig_data_code), > KEY contig_data_code_8 (contig_data_code), > KEY code_5 (code), > KEY descr_5 (descr), > KEY code_6 (code), > KEY code_7 (code), > KEY descr_6 (descr), > KEY code_8 (code), > KEY descr_7 (descr) > ) TYPE=MyISAM; A lot of them, actually... can anyone explain this? -- Roger --------------------------------------------------------------------- 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