0

I have a foreign key problem that makes absolutely no sense. All conventional reason is unable to solve the problem, and I am at a loss. I think the crux of the problem lies in the fact that one of the error messages is reporting the table '#sql-44a5_1bc'. Does anyone know what this is? What created it? Is this just a hidden name for an actual table?

Here is my foreign key problem too, if you feel like helping with that. It's still unsolved and this is a big problem because this is on a production database:

Problem adding Foreign Key using Alter Table with existing MYSQL Database - can't add it! Help!

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
egervari
  • 22,372
  • 32
  • 121
  • 175
  • Suggestion: start **Bounty** for your Question of [FK](http://goo.gl/GdBpb) .you'll surely get the answer – xkeshav Apr 15 '11 at 08:40

1 Answers1

2

I guess it is the temporary table created during ALTER TABLE. I've seen something similar when I tried to add a fk constraint to a table. The data present in the table violated the constraint I've tried to add, and the error message referenced a table name similar to the one you mention.

See MySQL-Docs:

In most cases, ALTER TABLE makes a temporary copy of the original table. MySQL incorporates the alteration into the copy, then deletes the original table and renames the new one.

titanoboa
  • 2,548
  • 15
  • 12
  • Yeah, I've had the same errors. I usually just have a little cry and start over. This explains why though, thanks. – Johan Apr 15 '11 at 10:22