<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Daniel Tome's blog &#187; Errors</title>
	<atom:link href="http://www.danieltome.com/blog/category/errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danieltome.com/blog</link>
	<description>Flash, PHP, Open Source, Actionscript, Australia and Argentina stuff.</description>
	<lastBuildDate>Tue, 18 Nov 2008 00:48:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL (errno: 150)</title>
		<link>http://www.danieltome.com/blog/2008/01/17/mysql-errno-150/</link>
		<comments>http://www.danieltome.com/blog/2008/01/17/mysql-errno-150/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 06:02:11 +0000</pubDate>
		<dc:creator>Danno</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[alter table]]></category>
		<category><![CDATA[errno: 150]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.danieltome.com/blog/2008/01/17/mysql-errno-150/</guid>
		<description><![CDATA[Just quick note for anyone getting this error. It took me a little while to figure out.
In my case I was trying to add a foreign key with delete on cascade:
ALTER TABLE table_one
ADD CONSTRAINT name_fk FOREIGN KEY (iTable1ID)
EFERENCES table_two(iTable2ID) ON DELETE CASCADE;
And HeidiSQL was spitting out this error msg:
SQL Error: Can&#8217;t create table &#8216;.\database_name\#sql-72c_fb.frm&#8217; (errno: [...]]]></description>
			<content:encoded><![CDATA[<p>Just quick note for anyone getting this error. It took me a little while to figure out.<br />
In my case I was trying to add a foreign key with delete on cascade:</p>
<pre><code language="sql">ALTER TABLE table_one
</code>ADD CONSTRAINT name_fk FOREIGN KEY (iTable1ID)
EFERENCES table_two(iTable2ID) ON DELETE CASCADE;</pre>
<p>And <a href="http://www.heidisql.com" title="Opensource Mysql client" target="_blank">HeidiSQL</a> was spitting out this error msg:</p>
<p>SQL Error: Can&#8217;t create table &#8216;.\database_name\#sql-72c_fb.frm&#8217; (errno: 150)</p>
<p><strong>How to resolve this error:</strong><br />
Make sure your fields datatype match.<br />
They both should have exactly the same datatype and length.<br />
Eg. INT(4) Unsigned isn&#8217;t the same as INT(11)</p>
<p>Also make sure if you have data in the table, the foreign keys will not fail.<br />
Eg. If you have an value in one table and not in the other table, it will fail.</p>
<p>This may be common knowledge to most of you but it might come in handy to someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danieltome.com/blog/2008/01/17/mysql-errno-150/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
