<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: MySQL: Error 1005 Can’t create table (errno: 150)</title>
	<link>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/</link>
	<description>Utterly random, incoherent and disjointed rants and ramblings...</description>
	<pubDate>Tue, 02 Dec 2008 20:19:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Luke</title>
		<link>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5146</link>
		<pubDate>Mon, 09 Jul 2007 23:52:40 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5146</guid>
					<description>Oh, btw - I updated the post with two more tips:

MySQL 5.0 creates the index on a foreign key field automatically - just like for primary key, so this issue does not occur.

Also

&lt;pre lang="sql"&gt;SHOW InnoDB STATUS&lt;/pre&gt;

is very useful when debugging. Among other things it will let you know what was the last foreign key constraint error.

Maybe you could add these tips to your site as well. :)</description>
		<content:encoded><![CDATA[<p>Oh, btw - I updated the post with two more tips:</p>
<p>MySQL 5.0 creates the index on a foreign key field automatically - just like for primary key, so this issue does not occur.</p>
<p>Also</p>

<div class="wp_syntax"><div class="code"><pre class="sql"><span style="color: #993333; font-weight: bold;">SHOW</span> InnoDB <span style="color: #993333; font-weight: bold;">STATUS</span></pre></div></div>

<p>is very useful when debugging. Among other things it will let you know what was the last foreign key constraint error.</p>
<p>Maybe you could add these tips to your site as well. <img src="http://www.terminally-incoherent.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=")" class="wp-smiley" />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Luke</title>
		<link>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5145</link>
		<pubDate>Mon, 09 Jul 2007 23:38:30 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5145</guid>
					<description>[quote comment="5143"]Thanks for letting me know and hopefully it will save somebody from losing more hair![/quote]

I hope so. This is one of the least helpful error messages I ever got from MySQL. I almost gave up on having foreign key constraints on these tables.</description>
		<content:encoded><![CDATA[<p><span style="padding-left: 10px;"><strong>Jason</strong> said:</span></p>
<blockquote cite="http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5143"><p>
Thanks for letting me know and hopefully it will save somebody from losing more hair!</p>
</blockquote>
<p>I hope so. This is one of the least helpful error messages I ever got from MySQL. I almost gave up on having foreign key constraints on these tables.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jason</title>
		<link>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5143</link>
		<pubDate>Mon, 09 Jul 2007 22:36:59 +0000</pubDate>
		<guid>http://www.terminally-incoherent.com/blog/2007/07/09/mysql-error-1005-can%e2%80%99t-create-table-errno-150/#comment-5143</guid>
					<description>Thanks for stopping by - I pushed up this no-index situation to the #2 spot on my troubleshooting list and added your tip that you do have to have an index on both fields.  Thanks for letting me know and hopefully it will save somebody from losing more hair!</description>
		<content:encoded><![CDATA[<p>Thanks for stopping by - I pushed up this no-index situation to the #2 spot on my troubleshooting list and added your tip that you do have to have an index on both fields.  Thanks for letting me know and hopefully it will save somebody from losing more hair!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.630 seconds -->
