<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Fri May 24 14:10:18 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DBAL-34/DBAL-34.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DBAL-34] MySql getListTableForeignKeysSQL doesn&apos;t work for 5.0.xx</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-34</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;The sql contains mysql specific code. And for the mysql 5.0.xxx the sql statement has syntax error.&lt;/p&gt;


&lt;p&gt;in /Doctrine/DBAL/Platforms/MySqlPlatform.php:&lt;br/&gt;
    public function getListTableForeignKeysSQL($table, $database = null)&lt;br/&gt;
    {&lt;br/&gt;
        $sql = &quot;SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, &quot;.&lt;br/&gt;
               &quot;k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ &quot;.&lt;br/&gt;
               &quot;FROM information_schema.key_column_usage k /*!50116 &quot;.&lt;br/&gt;
               &quot;INNER JOIN information_schema.referential_constraints c ON &quot;.&lt;br/&gt;
               &quot;  c.constraint_name = k.constraint_name AND &quot;.&lt;br/&gt;
               &quot;  c.table_name = &apos;$table&apos; */ WHERE k.table_name = &apos;$table&apos;&quot;;&lt;/p&gt;

&lt;p&gt;        if ($database) &lt;/p&gt;
{
            $sql .= &quot; AND k.table_schema = &apos;$database&apos; AND c.constraint_schema = &apos;$database&apos;&quot;;
        }

&lt;p&gt;        $sql .= &quot; AND `REFERENCED_COLUMN_NAME` is not NULL&quot;;&lt;/p&gt;

&lt;p&gt;        return $sql;&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;For the mysql lower as 5.1.16 the SQL could be as the following:&lt;/p&gt;

&lt;p&gt; SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` FROM information_schema.key_column_usage k WHERE k.table_name = &apos;some_table&apos; AND k.table_schema = &apos;some database&apos; AND c.constraint_schema = &apos;some database&apos; AND `REFERENCED_COLUMN_NAME` is not NULL&lt;/p&gt;

&lt;p&gt;In this statement there is no reference of c&lt;/p&gt;
</description>
                <environment>MySQL Server version: 5.0.51a-24+lenny4 (Debian)&lt;br/&gt;
</environment>
            <key id="11639">DBAL-34</key>
            <summary>MySql getListTableForeignKeysSQL doesn&apos;t work for 5.0.xx</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tiw">Ting Wang</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Jul 2010 04:36:06 +0000</created>
                <updated>Mon, 15 Aug 2011 10:00:48 +0000</updated>
                    <resolved>Tue, 27 Jul 2010 16:36:58 +0000</resolved>
                            <version>2.0.0-BETA2</version>
                                <fixVersion>2.0.0-BETA3</fixVersion>
                                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13715" author="beberlei" created="Tue, 27 Jul 2010 16:36:58 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="16336" author="gedrox" created="Mon, 15 Aug 2011 08:55:14 +0000"  >&lt;p&gt;Pity that because of this the Doctrine schema-tool update action reports incorrect change list.&lt;br/&gt;
It tries to drop/add foreign keys because &quot;ON DELETE CASCADE&quot; option isn&apos;t read from the database at all.&lt;/p&gt;</comment>
                    <comment id="16338" author="beberlei" created="Mon, 15 Aug 2011 10:00:48 +0000"  >&lt;p&gt;5.0.x has no way to export the CASCADE details. Its just not possible to get this data in 5.0&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>