MySql Error 150 - Foreign keys -


When I follow two questions (I've absolutely stripped them):

  mysql> Create table foo (ID INT primary key); The query is ok, affected by 0 rows (0.01 seconds) mysql & gt; Table Bar (ID INT, Ref INT, Foreign Key (Ref) Reference Fu (ID) Engine InnoDB;  

I get the following error: Error 1005 (HAA 2000): Table '. /test/bar.frm '(error: 150)

Can not create **** my error?

to

Blockquote>

If you rebuild a table that was deleted, then it should have a definition that Relevant foreign key conforms to the constraints. There should be more types, and it should be indexed on the referenced key, as previously mentioned. If they are not satisfied, MySQL returns the error number 1005 and refers to error 150 in the error message.

My embarrassment is because you did not create InnoDB as the foo , as everything looks okay.

Edit: From the same page -

InnoDB talc in both tables S should not be them temporary table


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -