<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://mirmodynamics.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Mirmo Dynamics - Tag - mysql</title>
  <link>http://mirmodynamics.com/</link>
  <atom:link href="http://mirmodynamics.com/feed/tag/mysql/rss2" rel="self" type="application/rss+xml"/>
  <description>Si tu kiffes pas reunoi, t'écoutes pas et puis c'est tout.</description>
  <language>en</language>
  <pubDate>Sun, 14 Mar 2010 19:59:01 +0100</pubDate>
  <copyright>2003-2009 &amp;copy; Geoffrey Bachelet</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>SQLSTATE[HY000]: General error: 1005 Can't create table '*' (errno: 150)</title>
    <link>http://mirmodynamics.com/post/2009/04/02/SQLSTATE%5BHY000%5D%3A-General-error%3A-1005-Can-t-create-table-%2A-%28errno%3A-150%29</link>
    <guid isPermaLink="false">urn:md5:d13814e8b3b075af9b6b090d2a89778c</guid>
    <pubDate>Thu, 02 Apr 2009 15:18:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Geekeries</category>
        <category>doctrine</category><category>error</category><category>foreignkey</category><category>frustration</category><category>mysql</category><category>schema</category>    
    <description>    &lt;p&gt;You may or may have not already stumbled upon this rather obscure error message (no, I'm not starting a serie on &lt;a href=&quot;http://mirmodynamics.com/post/2009/03/31/Ajax-query-failing-unexpectedly&quot;&gt;obscures error messages&lt;/a&gt;). Well the first thing to think when you encounter this is your foreign keys. This message generally denotes a failure in foreign keys creation, for example when the two columns you are trying to link are not of the &lt;strong&gt;exact&lt;/strong&gt; same type (that is, you can't link an &lt;code&gt;integer(4)&lt;/code&gt; to an &lt;code&gt;integer(11)&lt;/code&gt;).&lt;/p&gt;


&lt;p&gt;Now what if you are absolutely certain that your two columns are of the same type ? I just had the problem with this piece of doctrine schema (simplified for example purpose):&lt;/p&gt;

&lt;pre&gt;
Media:
  columns:
    image:           { type: string(255), notnull: true, unique: true }

ExplorationMission:
  columns:
    probe_image:         { type: integer, notnull: true }
  relations:
    ProbeImage:          { class: Media, local: probe_image, foreign: id, onDelete: 'SET NULL' }
&lt;/pre&gt;


&lt;p&gt;Can you spot the problem ?&lt;/p&gt;


&lt;p&gt;It's rather obvious when you know it, but I spent rather some time cursing mysql in vain. The point is that there is a major logic error in this schema. it declares the &lt;code&gt;probe_image&lt;/code&gt; as &lt;code&gt;NOT NULL&lt;/code&gt; while it gently asks the &lt;acronym&gt;FK&lt;/acronym&gt; to set it null on delete. See ?&lt;/p&gt;


&lt;p&gt;Hope it saves some frustration :-)&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2009/04/02/SQLSTATE%5BHY000%5D%3A-General-error%3A-1005-Can-t-create-table-%2A-%28errno%3A-150%29#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2009/04/02/SQLSTATE%5BHY000%5D%3A-General-error%3A-1005-Can-t-create-table-%2A-%28errno%3A-150%29#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/1190</wfw:commentRss>
      </item>
    
  <item>
    <title>PDO not throwing an exception when it should</title>
    <link>http://mirmodynamics.com/post/2007/10/01/PDO-not-throwing-an-exception-when-it-should</link>
    <guid isPermaLink="false">urn:md5:60df19dc3606fa5537a420e0bd129709</guid>
    <pubDate>Mon, 01 Oct 2007 17:40:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Coding</category>
        <category>bug</category><category>exceptions</category><category>mysql</category><category>pdo</category><category>php</category>    
    <description>    &lt;p&gt;Today I ran into an issue that I already ran into a few weeks ago when I did not have time to dig up, but today I had this time (this plus it's a really annoying issue as you'll see). The main symptom is that PDO does not throws exceptions when you'd expect it to. It's very annoying. The reason, in my case, seems to be that I am querying an old mysql (3.23.x in my case but any 4.x will do &lt;a href=&quot;http://bugs.php.net/bug.php?id=42371&quot;&gt;according to this bug report&lt;/a&gt;). I was not able to find any info from google, so I'm posting this here so that people know :-)&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2007/10/01/PDO-not-throwing-an-exception-when-it-should#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2007/10/01/PDO-not-throwing-an-exception-when-it-should#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/1054</wfw:commentRss>
      </item>
    
  <item>
    <title>dotdeb et PDO_Mysql</title>
    <link>http://mirmodynamics.com/post/2006/11/28/dotdeb-et-PDO_Mysql</link>
    <guid isPermaLink="false">urn:md5:64d2bdd89f982f4b87f845071b8a5c76</guid>
    <pubDate>Tue, 28 Nov 2006 13:38:00 +0100</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Le saviez vous ?</category>
        <category>dotdeb</category><category>mysql</category><category>pdo</category><category>php</category>    
    <description>    &lt;p&gt;Pour ceux:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;qui utilisent le repository &lt;a href=&quot;http://www.dotdeb.org/&quot;&gt;dotdeb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;qui se demandent pourquoi &lt;code&gt;php5-pdo-mysql&lt;/code&gt; a disparu&lt;/li&gt;
&lt;li&gt;qui ne lisent pas les news de dotdeb&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sachez que &lt;code&gt;php5-pdo-mysql&lt;/code&gt; a été renommé/fusionné en &lt;code&gt;php5-mysql&lt;/code&gt;.&lt;/p&gt;


&lt;p&gt;C'était l'info utile (ou pas) du jour.&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2006/11/28/dotdeb-et-PDO_Mysql#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2006/11/28/dotdeb-et-PDO_Mysql#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/727</wfw:commentRss>
      </item>
    
</channel>
</rss>