![]() | |
#1
| |||
| |||
|
|
#1025 - Error on rename of './Henrik4_Hartig/#sql-1ae6_123fc58' to './Henrik4_Hartig/TestMaster' (errno: 150) | |
#2
| |||
| |||
|
|
Hey ng Databaseengine: innodb In short terms: When I made two foreign keys in one Table using innodb I cannot drop index on that table. ALTER TABLE TestMaster DROP INDEX F_TestOneID I'll get the failure: |#1025 - Error on rename of './Henrik4_Hartig/#sql-1ae6_123fc58' to './Henrik4_Hartig/TestMaster' (errno: 150) | I don't know if the problem is lying in my creation of tables, therefore I will explain from scratch: |
#3
| |||
| |||
|
|
On 2011-01-06 21:08, Henrik Hartig wrote: Hey ng Databaseengine: innodb In short terms: When I made two foreign keys in one Table using innodb I cannot drop index on that table. ALTER TABLE TestMaster DROP INDEX F_TestOneID I'll get the failure: |#1025 - Error on rename of './Henrik4_Hartig/#sql-1ae6_123fc58' to './Henrik4_Hartig/TestMaster' (errno: 150) | I don't know if the problem is lying in my creation of tables, therefore I will explain from scratch: Drop the foreign key that uses the index first: mysql> ALTER TABLE TestMaster DROP foreign key TestMaster_ibfk_1; Query OK, 1 row affected (0.06 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE TestMaster DROP INDEX F_TestOneID; Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 The name of the foreign key is in your case generated by mysql and you will have to look it up in INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS. It is a whole lot easier to maintain the schema if you explicitly name your constraints, see your SHOW CREATE TABLE TestMaster for an example of the syntax. /Lennart [...] Juhuuu. That did the trick! Thanks a lot. |
#4
| |||
| |||
|
|
When I made two foreign keys in one Table using innodb I cannot drop index on that table. I'll get the failure: |#1025 - Error on rename of './Henrik4_Hartig/#sql-1ae6_123fc58' to './Henrik4_Hartig/TestMaster' (errno: 150) |
#5
| |||
| |||
|
|
Henrik Hartig <henrikhartig (AT) varmmail (DOT) dk> wrote: When I made two foreign keys in one Table using innodb I cannot drop index on that table. I'll get the failure: |#1025 - Error on rename of './Henrik4_Hartig/#sql-1ae6_123fc58' to './Henrik4_Hartig/TestMaster' (errno: 150) For future reference: Errno 150 refers to some problem inside InnoDB for DDL working on foreign key constraints. Details about that problem can be seen with SHOW ENGINE INNODB STATUS. XL ahha. Thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |