Dear Egor, thanks for your great advice, finally pointing out the reason for the problem.
> SH> mysql> ALTER TABLE auftrag CHANGE Nummer Nummer INT UNSIGNED NOT NULL > SH> PRIMARY KEY; > SH> ERROR 7: Error on rename of '.\trainee\auftrag.MYI' to > SH> '.\trainee\#sql2-648-2.MYI' (Errcode: 13) > This error can occur on Windows if you use lower_case_table_names=1. Which is turned on by default with MySQL 4.0.x. Is this a bug or a feature? ;-) Regards, -- Stefan Hinz <[EMAIL PROTECTED]> CEO / Geschäftsleitung iConnect GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3 ----- Original Message ----- From: "Egor Egorov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 7:52 PM Subject: re: Strange Error with MySQL 4.0.4 under Win2K > Stefan, > Sunday, November 17, 2002, 5:12:52 PM, you wrote: > > SH> yesterday I imported some tables from MS Access via ODBC into my brand > SH> new MySQL 4.0.4 server. Everything went fine, but the tables did not > SH> have a primary key, so I did the following: > > SH> mysql> ALTER TABLE auftrag CHANGE Nummer Nummer INT UNSIGNED NOT NULL > SH> PRIMARY KEY; > SH> ERROR 7: Error on rename of '.\trainee\auftrag.MYI' to > SH> '.\trainee\#sql2-648-2.MYI' (Errcode: 13) > > This error can occur on Windows if you use lower_case_table_names=1. > > SH> As PERROR says, 13 is "permission denied". What's that? I can do the > SH> following: > > SH> mysql> CREATE TABLE auftrag_2 SELECT * FROM auftrag; > > SH> Now, I can ALTER the auftrag_2 TABLE with no problems at all. > > SH> Trying a workaround, I switched the default-table-type to innodb. Now, > SH> all the Access tables I import become innoDB tables, and I can ALTER > SH> TABLE "auftrag" like above without getting error 13. > > SH> However, innoDB tables have a MyISAM style .frm file. I get a quite > SH> similar error when I try the following: > > SH> mysql> ALTER TABLE auftrag ADD FOREIGN KEY (Auftraggeber) REFERENCES > SH> auftraggeber(Schl); > SH> ERROR 1005: Can't create '.\trainee\#sql-6fc_2.frm'. (Error: 150) > > SH> Seems to be an (internal) temporary table problem. Does anyone know > SH> what's happening, and how to solve this prob? > > Nope. It's not the same error. This error means that your foreign key > definition is not correctly formed. > > > > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.net http://www.ensita.net/ > __ ___ ___ ____ __ > / |/ /_ __/ __/ __ \/ / Egor Egorov > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net > <___/ www.mysql.com > > > > > --------------------------------------------------------------------- > 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