<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 18 18:32:58 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=project+%3D+DBAL+AND+fixVersion+%3D+%222.0.5%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC&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=project+%3D+DBAL+AND+fixVersion+%3D+%222.0.5%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="4" total="4"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DBAL-121] Mapping, decimal returns float.</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-121</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;I have a Doctrine 2 entity and the value is mapped like this (with regular getter/setter):&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; 
/**
 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;decimal&quot;&lt;/span&gt;, precision=40, scale=30)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $someValue;

/**
 * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; decimal
 */
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSomeValue()
{
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;someValue;
}

/**
 * @param decimal $someValue
 */
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setSomeValue($someValue)
{
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;someValue = $someValue;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;When I set that value from my code, the value gets written into the database correctly. But, and that is my problem, when I get the value (via getter or \Doctrine\Common\Util\Debug::dump()), it always gives me a number with maximum 14 digits, and it rounds the value. I read the record with the default findById().&lt;/p&gt;

&lt;p&gt;eg: with value 1234567890.012345678901234567890123456789 I have 1234567890.0123&lt;br/&gt;
eg: with value 890.0123456789012345678901234567890123456 I have 890.01234567890&lt;/p&gt;

&lt;p&gt;I of course want all digits, not just 14. The field in MySQL is declared like this:&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; 
    someValue decimal(40,30) NOT NULL,
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;When I get the value with raw PHP and mysql_query(), it returns correctly.&lt;/p&gt;

&lt;p&gt;It seems like the problem is that Doctrine returns a float: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;someValue&amp;quot;:protected&amp;#93;&lt;/span&gt;=&amp;gt; float(234567890.01235)&lt;/p&gt;

&lt;p&gt;What&apos;s wrong, what should I check next, how to fix, any clues?&lt;br/&gt;
(also posted on &lt;a href=&quot;http://stackoverflow.com/questions/5635500/doctrine-2-decimal-can-only-contain-14-digits&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/5635500/doctrine-2-decimal-can-only-contain-14-digits&lt;/a&gt;)&lt;/p&gt;</description>
                <environment>Linux Ubuntu 10.10 x86_64, PHP 5.3.3-1ubuntu9.3, mysql  Ver 14.14 Distrib 5.1.49</environment>
            <key id="12556">DBAL-121</key>
            <summary>Mapping, decimal returns float.</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="tvlooy">Tom Van Looy</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Apr 2011 09:24:17 +0000</created>
                <updated>Sat, 14 May 2011 10:23:46 +0000</updated>
                    <resolved>Sat, 14 May 2011 10:23:46 +0000</resolved>
                            <version>2.0.3</version>
                                <fixVersion>2.0.5</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15724" author="beberlei" created="Tue, 12 Apr 2011 10:12:29 +0000"  >&lt;p&gt;ah yes, this is a bug.&lt;/p&gt;</comment>
                    <comment id="15851" author="beberlei" created="Sat, 14 May 2011 10:23:46 +0000"  >&lt;p&gt;fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-111] MySQL Driver possibly subject to sql injections with PDO::quote()</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-111</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Prior to 5.3.6, the MySQL PDO driver ignored the character set parameter to options.  Due to MySQL&apos;s C api (and MySQLND), this is required for the proper function of mysql_real_escape_string() (the C API call).  Since PDO uses the mres() C call for PDO::quote(), this means that the quoted string does not take into account the connection character set.&lt;/p&gt;

&lt;p&gt;Starting with 5.3.6, that was fixed.  So now if you pass the proper character set to PDO via driver options, sql injection is impossible while using the PDO::quote() api call.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;PDO proof of concept&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$dsn = &apos;mysql:dbname=INFORMATION_SCHEMA;host=127.0.0.1;charset=GBK;&apos;;
$pdo = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; PDO($dsn, $user, $pass);
$pdo-&amp;gt;exec(&apos;SET NAMES GBK&apos;);
$string = chr(0xbf) . chr(0x27) . &apos; OR 1 = 1; /*&apos;;
$sql = &quot;SELECT TABLE_NAME
            FROM INFORMATION_SCHEMA.TABLES
            WHERE TABLE_NAME LIKE &lt;span class=&quot;code-quote&quot;&gt;&quot;.$pdo-&amp;gt;quote($string).&quot;&lt;/span&gt; LIMIT 1;&quot;;
$stmt = $pdo-&amp;gt;query($sql);
var_dump($stmt-&amp;gt;rowCount());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Expected Result: `int(0)`.&lt;br/&gt;
Actual Result: `int(1)`.&lt;/p&gt;

&lt;p&gt;There are 2 issues to fix.  First, the documentation does not indicate that you can pass the `charset` option to the MySQL Driver.  This should be fixed so that users are given the proper option to set character sets.&lt;/p&gt;

&lt;p&gt;Secondly, `Connection::setCharset()` should be modified for MySQL to throw an exception, since the character set is only safely setable using the DSN with PDO.  This is a limitation of the driver and could be asked as a feature request for the PHP core.  Either that, or a big warning should be put on the documentation of the API to indicate the unsafe character set change&lt;/p&gt;</description>
                <environment>MySQL Drivers</environment>
            <key id="12569">DBAL-111</key>
            <summary>MySQL Driver possibly subject to sql injections with PDO::quote()</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="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ircmaxell">Anthony Ferrara</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Apr 2011 18:52:18 +0000</created>
                <updated>Sat, 14 May 2011 07:24:48 +0000</updated>
                    <resolved>Sat, 14 May 2011 07:24:48 +0000</resolved>
                            <version>2.0.0-BETA2</version>
                <version>2.0.0-BETA3</version>
                <version>2.0.0-BETA4</version>
                <version>2.0.0-RC1-RC3</version>
                <version>2.0-RC4</version>
                <version>2.0-RC5</version>
                <version>2.0</version>
                <version>2.0.1</version>
                <version>2.0.2</version>
                <version>2.0.3</version>
                <version>2.0.4</version>
                <version>2.0.5</version>
                <version>2.1</version>
                                <fixVersion>2.0.4</fixVersion>
                <fixVersion>2.0.5</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15740" author="ircmaxell" created="Tue, 19 Apr 2011 13:30:41 +0000"  >&lt;p&gt;Note: issued same bug report for Doctrine1 as it&apos;s also affected: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-998&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DC-998&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15753" author="ircmaxell" created="Fri, 29 Apr 2011 20:39:41 +0000"  >&lt;p&gt;Also note that prepared statements in PDO will suffer the same bug since PDO always emulates prepared statements for the mysql driver (even though it fully supports them in the source).  See: &lt;a href=&quot;http://bugs.php.net/bug.php?id=54638&quot; class=&quot;external-link&quot;&gt;http://bugs.php.net/bug.php?id=54638&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15845" author="beberlei" created="Sat, 14 May 2011 07:24:48 +0000"  >&lt;p&gt;Fixed, updated the docs&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-119] Outdated Console component</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-119</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;The DBAL submodule uses an outdated version of the Console component (before the switch to private properties). But the Migrations project defines its command using the latest interface which means that it cannot be used with the DBAL out-of-the-box as it calls the getApplication method which does not exist in the old version of the component.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12632">DBAL-119</key>
            <summary>Outdated Console component</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="stof">Christophe Coevoet</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 May 2011 22:51:24 +0000</created>
                <updated>Sat, 14 May 2011 06:26:41 +0000</updated>
                    <resolved>Sat, 14 May 2011 06:26:41 +0000</resolved>
                            <version>2.0.4</version>
                                <fixVersion>2.0.5</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15842" author="beberlei" created="Sat, 14 May 2011 06:26:41 +0000"  >&lt;p&gt;Fixed for 2.0.x aswell&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-118] When speaking about security do not rely on default link in mysql_*  function calls</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-118</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;The documentation about escaping reads:&lt;/p&gt;

&lt;p&gt;&quot;Consider the previous query, now parameterized to fetch only a single article by id. Using ext/mysql (still the primary choice of MySQL access for many developers) you had to escape every value passed into the query using mysql_real_escape_string() to avoid SQL injection:&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br/&gt;
$sql = &quot;SELECT * FROM articles WHERE id = &apos;&quot; . mysql_real_escape_string($id) . &quot;&apos;&quot;;&lt;br/&gt;
$rs = mysql_query($sql);&quot;,&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/docs/dbal/2.0/en/reference/data-retrieval-and-manipulation.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/dbal/2.0/en/reference/data-retrieval-and-manipulation.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please, do not rely on MySQL default links when discussing security issues. One of major differences between the mysql and the later mysqli extension is that mysqli forces users to explicitly specify a connection handle. There is no concept of default links and magical global connection handles in mysqli any more. The convenience of not having to specify a connection handle has been removed from mysqli. This was done to increase security, for example, when escaping strings. Escaping needs to take the current charset of the connection into account. Thus, it is recommended to explicitly specify the connection and so not use default connection.&lt;/p&gt;

&lt;p&gt;&quot;string mysql_real_escape_string ( string $unescaped_string &lt;span class=&quot;error&quot;&gt;&amp;#91;, resource $link_identifier &amp;#93;&lt;/span&gt; )&quot;,&lt;br/&gt;
&lt;a href=&quot;http://de.php.net/mysql_real_escape_string&quot; class=&quot;external-link&quot;&gt;http://de.php.net/mysql_real_escape_string&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please, change the example:&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br/&gt;
$sql = &quot;SELECT * FROM articles WHERE id = &apos;&quot; . mysql_real_escape_string($id, $link) . &quot;&apos;&quot;;&lt;br/&gt;
$rs = mysql_query($sql);&quot;,&lt;/p&gt;

&lt;p&gt;($link added)&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
                <environment></environment>
            <key id="12628">DBAL-118</key>
            <summary>When speaking about security do not rely on default link in mysql_*  function calls</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</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="nixnutz">Ulf Wendel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 May 2011 12:38:35 +0000</created>
                <updated>Sat, 14 May 2011 06:20:30 +0000</updated>
                    <resolved>Sat, 14 May 2011 06:20:30 +0000</resolved>
                                            <fixVersion>2.0.5</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15841" author="beberlei" created="Sat, 14 May 2011 06:20:30 +0000"  >&lt;p&gt;Changed, the new docs will be rolled up sometime this weekend.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>