List:General Discussion« Previous MessageNext Message »
From:Listen Hinz Date:December 9 2002 4:49pm
Subject:Re: alter table syntax
View as plain text  
Dear Kayamboo, dear Dan,

> > mysql> alter table town_db drop primary key ;
> > ERROR 1025: Error on rename of '.\forest\#sql-cc_1' to
'.\forest\town_db'
> > (errno: 150)
> > mysql>

> The alter table failed because of error 150.  Run the command "perror
150"
> at your shell prompt (not the mysql prompt) to find out why the
> command failed.

Quite helpful advice ... perror 150 is an "unknown error" :)

I got the same kind of error with MySQL 4.0.3 / 4.0.4 on a Win2K box,
and with MyISAM tables. After changing the table type to InnoDB, I did
not get key errors anymore (because there is no .MYI file any more), but
I still got errors trying to alter the table structure (as there still
is a .frm file).

Strange enough, the problem is solved when a copy of the (broken?) table
is created, like CREATE new_table SELECT * FROM old_table. Now, no
errors occur for new_table any more.

Someone on the list told me it's a known issue with MySQL 4.0.x under
Windows, related to a default setting in the my.cnf / my.ini:

set-variable = lower_case_table_names=1

I am not sure if setting lower_case_table_names to 0 (zero) will
actually solve the problem, and whether this is regarded as a bug in
MySQL 4.0.x.

HTH!
--
  Stefan Hinz <hinz@stripped>
  Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3


----- Original Message -----
From: "Dan Nelson" <dnelson@stripped>
To: "kayamboo" <kayamboosuresh@stripped>
Cc: "list mysql" <mysql@stripped>
Sent: Monday, December 09, 2002 2:06 AM
Subject: Re: alter table syntax


> In the last episode (Dec 09), kayamboo said:
> > I don't get you.
> > But when I executed the drop table syntax fromt he command line, the
result
> > was this error
> >
> > mysql> alter table town_db drop primary key ;
> > ERROR 1025: Error on rename of '.\forest\#sql-cc_1' to
'.\forest\town_db'
> > (errno: 150)
> > mysql>
>
> The alter table failed because of error 150.  Run the command "perror
150"
> at your shell prompt (not the mysql prompt) to find out why the
> command failed.
>
> --
> Dan Nelson
> dnelson@stripped
>
> ---------------------------------------------------------------------
> 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 <mysql-thread126961@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-list_hinz=iconnect.de@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

Thread
alter table syntaxkayamboo6 Dec
  • Re: alter table syntaxR. Hannes Niedner6 Dec
    • Re: alter table syntaxkayamboo6 Dec
      • re: Re: alter table syntaxEgor Egorov6 Dec
      • Re: alter table syntaxDan Nelson6 Dec
    • Re: alter table syntaxkayamboo9 Dec
      • Re: alter table syntaxDan Nelson9 Dec
    • Re: Re: alter table syntaxkayamboo9 Dec
    • Re: alter table syntaxListen Hinz9 Dec