<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 10:04:25 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/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=labels+%3D+mysql&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=labels+%3D+mysql</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="7" total="7"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2188] DQL arithmetic priority is not considered in expression &apos;a/(b*c)&apos;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2188</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;A DQL query that contains an arithmetic expression like &apos;a/(b*c)&apos; will be compiled to &apos;a/b*c&apos; in SQL and therefore the result of &apos;100/(2*2)&apos; will be 100, instead of 25.&lt;/p&gt;

&lt;p&gt;Note: I have tested it by mysql only&lt;/p&gt;</description>
                <environment></environment>
            <key id="14295">DDC-2188</key>
            <summary>DQL arithmetic priority is not considered in expression &apos;a/(b*c)&apos;</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>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="mdehghani">Mahdi Dehghani</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>mysql</label>
                    </labels>
                <created>Wed, 5 Dec 2012 22:48:22 +0000</created>
                <updated>Sat, 6 Apr 2013 14:57:57 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 14:57:57 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19866" author="ocramius" created="Sat, 16 Mar 2013 19:06:16 +0000"  >&lt;p&gt;Being handled in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2355&quot; title=&quot;[GH-618] [DDC-2188] Fix arithmetic priority&quot;&gt;&lt;del&gt;DDC-2355&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2161] Moving entity relationship doesn&apos;t move foreign key in mysql table</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2161</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Edit: moved the bug to the dbal project, please delete this or set as invalid, new bug:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-392&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-392&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;------------------------------------------------------&lt;/p&gt;

&lt;p&gt;These are the steps I&apos;ve tried to reproduce the problem:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;composer create-project symfony/framework-standard-edition path/ 2.1.3&lt;/li&gt;
	&lt;li&gt;edited parameters for mysql db&lt;/li&gt;
	&lt;li&gt;created attached &apos;Post&apos; entity (note the parent/children fields)&lt;/li&gt;
	&lt;li&gt;updated schema with doctrine:schema:create&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I see that the foreign key in phpmyadmin is correctly set to Post.id which is correct.&lt;/p&gt;

&lt;p&gt;Now:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;created another entity &apos;Argument&apos;&lt;/li&gt;
	&lt;li&gt;moving the children field from &apos;Post&apos; to &apos;Argument&apos; removing setters getters into &apos;Post&apos; and changing target entity field accordingly&lt;/li&gt;
	&lt;li&gt;Updated DB schema (doctrine:schema:update --force)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The situation is now the one you can find in Post2 and Argument attachments.&lt;/p&gt;

&lt;p&gt;The problem is that now, the foreign key in Post field it&apos;s still on Post.id and not on Argument.id and schema:update says the DB is in sync with the metadata.&lt;/p&gt;

&lt;p&gt;Manually deleting the foreign key and running schema:update makes the key being correctly created into Argument.id&lt;/p&gt;</description>
                <environment>Mac OSX, mysql 5.5.28, php 5.4.8, fresh symfony install with doctrine/orm 77d060ab74212919f1eaace72842ea43bf420f43</environment>
            <key id="14257">DDC-2161</key>
            <summary>Moving entity relationship doesn&apos;t move foreign key in mysql table</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="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="alex88">Alessandro Tagliapietra</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>mysql</label>
                    </labels>
                <created>Thu, 22 Nov 2012 15:26:54 +0000</created>
                <updated>Sun, 25 Nov 2012 12:09:06 +0000</updated>
                    <resolved>Sun, 25 Nov 2012 12:08:58 +0000</resolved>
                            <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19042" author="beberlei" created="Sat, 24 Nov 2012 00:23:52 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-234&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/234&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/234&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19049" author="beberlei" created="Sun, 25 Nov 2012 12:08:58 +0000"  >&lt;p&gt;On wrong project, see &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-392&quot; title=&quot;Moving entity relationship doesn&amp;#39;t move foreign key in mysql table&quot;&gt;&lt;del&gt;DBAL-392&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="14266">DBAL-392</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11352" name="Argument.php" size="1841" author="alex88" created="Thu, 22 Nov 2012 15:26:54 +0000" />
                    <attachment id="11351" name="Post.php" size="2395" author="alex88" created="Thu, 22 Nov 2012 15:26:54 +0000" />
                    <attachment id="11353" name="Post2.php" size="1622" author="alex88" created="Thu, 22 Nov 2012 15:26:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2139] Table collate/charset doesn&apos;t inherits from database</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2139</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Using symfony2 command doctrine:schema:create the tables and Varchar fields are Collate/Charset are not inherited from database. I changed MySQL defaults to latin1/latin1_general_ci; The doctrine:database:create works; but tables and fields don&apos;t. So I found there is a code on MySqlPlataform.php:&lt;/p&gt;

&lt;p&gt;if ( ! isset($options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;charset&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
  $options[&apos;charset&apos;] = &apos;utf8&apos;;
}

&lt;p&gt;if ( ! isset($options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;collate&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
  $options[&apos;collate&apos;] = &apos;utf8_unicode_ci&apos;;
}

&lt;p&gt;$query .= &apos;DEFAULT CHARACTER SET &apos; . $options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;charset&amp;#39;&amp;#93;&lt;/span&gt;;&lt;br/&gt;
$query .= &apos; COLLATE &apos; . $options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;collate&amp;#39;&amp;#93;&lt;/span&gt;;&lt;/p&gt;

&lt;p&gt;So if you don&apos;t pass collate and charset as entity options, it will put utf8 and utf8_unicode_ci instead of dabatase default charset.&lt;/p&gt;

&lt;p&gt;My suggestion is to change a little bit to:&lt;/p&gt;

&lt;p&gt;if (isset($options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;charset&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
  $query .= &apos;DEFAULT CHARACTER SET &apos; . $options[&apos;charset&apos;];
}

&lt;p&gt;if (isset($options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;collate&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
  $query .= &apos; COLLATE &apos; . $options[&apos;collate&apos;];        
}
</description>
                <environment>Symfony2</environment>
            <key id="14217">DDC-2139</key>
            <summary>Table collate/charset doesn&apos;t inherits from database</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="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="williamk">William Knak</reporter>
                        <labels>
                        <label>charset</label>
                        <label>collate</label>
                        <label>collation</label>
                        <label>mysql</label>
                        <label>utf</label>
                        <label>utf8</label>
                    </labels>
                <created>Mon, 12 Nov 2012 15:29:22 +0000</created>
                <updated>Sun, 25 Nov 2012 12:25:30 +0000</updated>
                    <resolved>Sun, 25 Nov 2012 12:25:30 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19053" author="beberlei" created="Sun, 25 Nov 2012 12:25:30 +0000"  >&lt;p&gt;If we change it, then it will be like before and users disliked that very much. The decision is to use UTF-8 as default and everybody else has to change the information instead of the other way around.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1274] there is no way to set collate of the table charset !</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1274</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;i searched a lot for this&lt;/p&gt;

&lt;p&gt;there is no way to set the collate of table fields to for ex. utf8_persian_ci in doctrine settings&lt;/p&gt;</description>
                <environment>zend frame work 1.10 with doctrine orm 2 and dbal</environment>
            <key id="12819">DDC-1274</key>
            <summary>there is no way to set collate of the table charset !</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="placebo">sina miandashti</reporter>
                        <labels>
                        <label>charset</label>
                        <label>collate</label>
                        <label>collation</label>
                        <label>mysql</label>
                    </labels>
                <created>Wed, 13 Jul 2011 07:08:07 +0000</created>
                <updated>Mon, 12 Nov 2012 16:54:22 +0000</updated>
                    <resolved>Wed, 13 Jul 2011 17:06:20 +0000</resolved>
                            <version>2.0.6</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16171" author="beberlei" created="Wed, 13 Jul 2011 17:06:20 +0000"  >&lt;p&gt;This is not a supported feature, if you set the collation in the CREATE DATABASE statement this will inherit to all fields automatically.&lt;/p&gt;</comment>
                    <comment id="18972" author="williamk" created="Mon, 12 Nov 2012 16:53:08 +0000"  >&lt;p&gt;Actually Doctrine 2.3.0 does not allow inheritance. Please look at Issue #&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2139&quot; title=&quot;Table collate/charset doesn&amp;#39;t inherits from database&quot;&gt;&lt;del&gt;DDC-2139&lt;/del&gt;&lt;/a&gt; . At least, if there&apos;s an option to set a global default collation (wich I didn&apos;t find), the problem will occurs every time a table of string/varchar field was created by Symfony2 Doctrine Command.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-477] Just doublequote all schema names and field names in PostgreSQL sql command generation, and the same for MySQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-477</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Generation of any SQL command to the database (From entities or migration versions) does not quote all the reserved keywords (For example a fieldname `right`.&lt;/p&gt;

&lt;p&gt;Simple fix that always works: double-quote dbname, schemaname and fieldname&lt;/p&gt;

&lt;p&gt;e.g   &quot;dbsecurity&quot;.&quot;userschema&quot;.&quot;users&quot; or &quot;tblusers&quot;&lt;/p&gt;

&lt;p&gt;MySQL : use the ` sign.&lt;/p&gt;

&lt;p&gt;e.g   `security`.`users` or `tblusers` (No support for schemas since I last checked some time ago)&lt;/p&gt;</description>
                <environment>Any PostgreSQL environment</environment>
            <key id="14740">DBAL-477</key>
            <summary>Just doublequote all schema names and field names in PostgreSQL sql command generation, and the same for MySQL</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                        <label>mysql</label>
                        <label>postgresql</label>
                    </labels>
                <created>Thu, 28 Mar 2013 22:11:56 +0000</created>
                <updated>Thu, 28 Mar 2013 22:11:56 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-442] Break the query building with multiple from parts</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-442</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;For example:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$queryBuilder
    -&amp;gt;select(&apos;DISTINCT c.id&apos;)
    -&amp;gt;from(&apos;Campaigns&apos;, &apos;c&apos;)
    -&amp;gt;leftJoin(&apos;c&apos;, &apos;CampaignOperations&apos;, &apos;od&apos;, &apos;od.campaignId = c.id AND od.operation = :operation&apos;)
    -&amp;gt;from(&apos;BannerGroups&apos;, &apos;bg&apos;)
    -&amp;gt;innerJoin(&apos;bg&apos;, &apos;BannerGroupStrategies&apos;, &apos;bgs&apos;, &apos;bgs.groupId = bg.id AND bgs.advSystem = :system&apos;)
    -&amp;gt;where(&apos;bg.campaignId = c.id&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Builded the query:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; DISTINCT c.id &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Campaigns s 
  LEFT JOIN CampaignOperations od ON (od.campaignId = c.id AND od.operation = :operation)
  INNER JOIN BannerGroupStrategies bgs ON (bgs.groupId = bg.id AND bgs.advSystem = :system), 
  BannerGroups bg
  &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; (bg.campaignId = c.id)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this query execute on mysql, we get error: &lt;br/&gt;
SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S22&amp;#93;&lt;/span&gt;: Column not found: 1054 Unknown column &apos;bg.id&apos; in &apos;on clause&apos;&lt;/p&gt;

&lt;p&gt;Expected result:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; DISTINCT c.id &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Campaigns s 
  LEFT JOIN CampaignOperations od ON (od.campaignId = c.id AND od.operation = :operation),
  BannerGroups bg
  INNER JOIN BannerGroupStrategies bgs ON (bgs.groupId = bg.id AND bgs.advSystem = :system)
  &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; (bg.campaignId = c.id)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Regression after patch &lt;a href=&quot;https://github.com/doctrine/dbal/pull/175&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/175&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14472">DBAL-442</key>
            <summary>Break the query building with multiple from parts</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="yethee">Denis Vasilev</reporter>
                        <labels>
                        <label>mysql</label>
                    </labels>
                <created>Sun, 10 Feb 2013 10:25:02 +0000</created>
                <updated>Mon, 22 Apr 2013 14:51:48 +0000</updated>
                    <resolved>Mon, 22 Apr 2013 14:51:48 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19523" author="yethee" created="Sun, 10 Feb 2013 14:59:51 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/pull/270&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/270&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20089" author="fabio.bat.silva" created="Mon, 22 Apr 2013 14:51:48 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/dbal/commit/99574240f332a814ec193b6e7a88abb6a457f061&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/commit/99574240f332a814ec193b6e7a88abb6a457f061&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-398] Native query does not allow mysql assignment operator :=</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-398</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;When trying to use the mysql assignment operator in a native query one gets an exception as SqlParserUtils does not qualify the character after the : as being part of a valid parameter value.&lt;/p&gt;

&lt;p&gt;Undefined index: in vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php line 156 (uncaught exception)&lt;/p&gt;


&lt;p&gt;A simple example is&lt;br/&gt;
$rsm = new ResultSetMapping();&lt;br/&gt;
$rsm-&amp;gt;addScalarResult(&apos;rank&apos;, &apos;rank&apos;);&lt;br/&gt;
$qry = $em-&amp;gt;createNativeQuery(&quot;&lt;br/&gt;
  SELECT (@rank := 1) AS rank&lt;br/&gt;
&quot;);&lt;br/&gt;
$result = $qry-&amp;gt;getResult(Query::HYDRATE_ARRAY);&lt;/p&gt;


&lt;p&gt;Or a more complicated example is (similar to actual use):&lt;/p&gt;

&lt;p&gt;$rsm = new ResultSetMapping();&lt;br/&gt;
$rsm-&amp;gt;addScalarResult(&apos;rank&apos;, &apos;rank&apos;);&lt;br/&gt;
$qry = $em-&amp;gt;createNativeQuery(&quot;&lt;br/&gt;
  SELECT rank FROM&lt;br/&gt;
    (SELECT (@rank := @rank +1) AS rank FROM (SELECT @rank :=0) rnk2) rnk1&lt;br/&gt;
&quot;);&lt;br/&gt;
$result = $qry-&amp;gt;getResult(Query::HYDRATE_ARRAY);&lt;/p&gt;


&lt;p&gt;I have attached quick-fix patch, but it looks like the getPlaceholderPositions method is wanting something better overall (due to the TODO comment in it).&lt;/p&gt;</description>
                <environment>Using Doctrine within Symfony 2.1.x</environment>
            <key id="14322">DBAL-398</key>
            <summary>Native query does not allow mysql assignment operator :=</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dward">David Ward</reporter>
                        <labels>
                        <label>mysql</label>
                    </labels>
                <created>Tue, 18 Dec 2012 19:40:18 +0000</created>
                <updated>Thu, 3 Jan 2013 22:38:50 +0000</updated>
                    <resolved>Sat, 22 Dec 2012 13:24:23 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.3.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19156" author="dward" created="Tue, 18 Dec 2012 20:38:25 +0000"  >&lt;p&gt;A pull request has been added at &lt;a href=&quot;https://github.com/doctrine/dbal/pull/237&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/237&lt;/a&gt; which also has tests added.&lt;/p&gt;</comment>
                    <comment id="19213" author="brysonarmstrong" created="Thu, 3 Jan 2013 22:36:42 +0000"  >&lt;p&gt;I ran into this error and the fix caused other queries to have errors. &lt;/p&gt;

&lt;p&gt;I fixed it by changing line 57 in vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($statement[$i] == $match &amp;amp;&amp;amp; !$inLiteral &amp;amp;&amp;amp; (!$isPositional &amp;amp;&amp;amp; $statement[$i+1] != &apos;=&apos;)) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;to: &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($statement[$i] == $match &amp;amp;&amp;amp; !$inLiteral &amp;amp;&amp;amp; ($isPositional || $statement[$i+1] != &apos;=&apos;)) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </comment>
                </comments>
                    <attachments>
                    <attachment id="11365" name="FixNativeAssignmentOperator.patch" size="613" author="dward" created="Tue, 18 Dec 2012 19:40:18 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>