<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 17:31:54 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-231/DBAL-231.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-231] Doctrine\DBAL\SQLParserUtils::getPlaceholderPositions() - regex</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-231</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Running the following SQL (note the named parameter &quot;:account_id&quot;):&lt;br/&gt;
===================&lt;br/&gt;
SELECT count(&apos;*&apos;) as cnt FROM feed f INNER JOIN orders_accounts oa ON oa.order_id = f.feed_id INNER JOIN users u ON u.id = f.user_id WHERE oa.account_id = :account_id AND f.feed_type=&apos;order&apos; ORDER BY f.create_date DESC &lt;br/&gt;
===================&lt;/p&gt;

&lt;p&gt;ends up in a thrown exception.&lt;br/&gt;
This SQL was generated by using the Query Builder&lt;/p&gt;

&lt;p&gt;        $qb = $this-&amp;gt;_em-&amp;gt;getConnection()-&amp;gt;createQueryBuilder();&lt;br/&gt;
        $qb-&amp;gt;select(&apos;count(\&apos;*\&apos;) as cnt&apos;);//I know this is bad&lt;br/&gt;
        $qb-&amp;gt;from(&apos;feed&apos;, &apos;f&apos;);&lt;br/&gt;
        $qb-&amp;gt;innerJoin(&apos;f&apos;, &apos;orders_accounts&apos;, &apos;oa&apos;, &apos;oa.order_id = f.feed_id&apos;);&lt;br/&gt;
        $qb-&amp;gt;innerJoin(&apos;f&apos;, &apos;users&apos;, &apos;u&apos;, &apos;u.id = f.user_id&apos;);&lt;br/&gt;
        $qb-&amp;gt;where(&apos;oa.account_id = :account_id AND f.feed_type=\&apos;order\&apos;&apos;);&lt;br/&gt;
        $qb-&amp;gt;setParameter(&apos;account_id&apos;, $accountId, \PDO::PARAM_INT);&lt;/p&gt;

&lt;p&gt;        $stmt = $qb-&amp;gt;execute();&lt;br/&gt;
        $res = $stmt-&amp;gt;fetchAll(\PDO::FETCH_COLUMN);&lt;/p&gt;



&lt;p&gt;===================&lt;br/&gt;
string(82) &quot;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S22&amp;#93;&lt;/span&gt;: Column not found: 1054 Unknown column &apos;NULL_id&apos; in &apos;where clause&apos;&quot;&lt;br/&gt;
string(3168) &quot;#0 /var/www/cake_to_zf/library/Doctrine/DBAL/Connection.php(628): PDOStatement-&amp;gt;execute()&lt;br/&gt;
#1 /var/www/cake_to_zf/library/Doctrine/DBAL/Query/QueryBuilder.php(185): Doctrine\DBAL\Connection-&amp;gt;executeQuery(&apos;SELECT count(&apos;*...&apos;, Array, Array)&lt;br/&gt;
#2 /var/www/cake_to_zf/library/of/doctrine/SqlQueryBuilderPaginatorAdapter.php(69): Doctrine\DBAL\Query\QueryBuilder-&amp;gt;execute()&lt;br/&gt;
#3 /var/www/cake_to_zf/library/Zend/Paginator.php(1060): of\doctrine\SqlQueryBuilderPaginatorAdapter-&amp;gt;count()&lt;br/&gt;
.......&lt;/p&gt;


&lt;p&gt;Suggested Fix:&lt;/p&gt;

&lt;p&gt;Regex on line 64 in preg_match becomes &apos;#(&lt;span class=&quot;error&quot;&gt;&amp;#91;:a-zA-Z0-9_&amp;#93;&lt;/span&gt;&lt;/p&gt;
{1}
&lt;p&gt;)#&apos; &lt;br/&gt;
Added was an &quot;_&quot; ...&lt;/p&gt;

&lt;p&gt;===================&lt;/p&gt;</description>
                <environment>Fedora-16, Zend Serve CE, PHP 5.3.5</environment>
            <key id="13494">DBAL-231</key>
            <summary>Doctrine\DBAL\SQLParserUtils::getPlaceholderPositions() - regex</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="ivolator">Ivo Mandalski</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Mar 2012 16:31:56 +0000</created>
                <updated>Sat, 19 Jan 2013 18:27:29 +0000</updated>
                    <resolved>Wed, 14 Mar 2012 19:38:48 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.3.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17569" author="beberlei" created="Wed, 14 Mar 2012 19:38:48 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="17570" author="beberlei" created="Wed, 14 Mar 2012 19:39:07 +0000"  >&lt;p&gt;Merged in 2.1.x and 2.2 branches.&lt;/p&gt;</comment>
                    <comment id="17644" author="avit" created="Sat, 24 Mar 2012 20:54:14 +0000"  >&lt;p&gt;I already fixed this in my reworking of the SqlParserUtils last month. See pull request and confirm that this issue was fixed there, together with other parsing problems:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/pull/113&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/113&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19338" author="beberlei" created="Sat, 19 Jan 2013 18:27:29 +0000"  >&lt;p&gt;Fixed in 2.3.3&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>