<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:01:21 UTC 2024

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 append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-2844] Shell inserts integers as doubles</title>
                <link>https://jira.mongodb.org/browse/SERVER-2844</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I&apos;ve observed that whenever the shell inserts an integer, whether it be by using a $set or an $inc in an update, or by inserting a new document, the integer gets stored in Mongo as a double. This becomes a problem when you&apos;re using the new $bit modifier as it doesn&apos;t work with doubles. I&apos;ve narrowed the problem down to the Shell rather than a deeper problem, as 1.2.4 of the Ruby driver doesn&apos;t exhibit this problem.&lt;/p&gt;

&lt;p&gt;As a side issue, I&apos;d suggest having the Shell displays doubles as such, e.g. with a trailing &quot;.0&quot; such as &quot;5.0&quot; instead of just 5. This would make it more obvious to identify such problems as this one in the future. It&apos;s only through Ruby that I can actually see that the integers being inserted by the Shell are actually doubles.&lt;/p&gt;</description>
                <environment>OS X 10.6.7, Mongo 1.8.0</environment>
        <key id="15314">SERVER-2844</key>
            <summary>Shell inserts integers as doubles</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="wardrop">Tom Wardrop</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Mar 2011 11:27:51 +0000</created>
                <updated>Sun, 29 Jan 2017 01:49:14 +0000</updated>
                            <resolved>Tue, 29 Mar 2011 05:55:50 +0000</resolved>
                                    <version>1.8.0</version>
                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1152265" author="kevin.pulo@10gen.com" created="Mon, 25 Jan 2016 04:52:59 +0000"  >&lt;p&gt;Yes.&lt;/p&gt;</comment>
                            <comment id="1127099" author="nathan@softronet.com" created="Wed, 6 Jan 2016 01:47:59 +0000"  >&lt;p&gt;I solved it by adding field: NumberInt(14)&lt;br/&gt;
Is this the expected behavior?&lt;/p&gt;</comment>
                            <comment id="1127092" author="nathan@softronet.com" created="Wed, 6 Jan 2016 01:37:14 +0000"  >&lt;p&gt;This problem still exists in 3.2.0-rc6.&lt;br/&gt;
I am using it on Windows with WiredTiger Storage&lt;/p&gt;</comment>
                            <comment id="27093" author="eliot" created="Tue, 29 Mar 2011 06:17:23 +0000"  >&lt;p&gt;The solution will be using the Integer class that I linked to.&lt;br/&gt;
Then you&apos;ll be able to create Integers and use them for queries, etc...&lt;br/&gt;
That should be done for 2.0 in the next couple of months.&lt;/p&gt;</comment>
                            <comment id="27085" author="wardrop" created="Tue, 29 Mar 2011 06:03:28 +0000"  >&lt;p&gt;But by saying that, you&apos;re also saying that not being able to use the $bit modifier in the mongo shell - the learning and testing ground for most developers - is correct behavior?  I understand that Javascript only supports one number type, but surely there&apos;s something that can be done to intelligently work around this. Could the behavior of $bit not be changed to either automatically round number, or to simply drop any form of precision?&lt;/p&gt;

&lt;p&gt;Something has to be done about this (in my opinion), at some point in the future. Just seeing the issue closed and forgotten makes me uneasy.&lt;/p&gt;</comment>
                            <comment id="27082" author="eliot" created="Tue, 29 Mar 2011 05:55:50 +0000"  >&lt;p&gt;As mentioned above, numbers in javascript are doubles, so this is correct behavior.&lt;/p&gt;

&lt;p&gt;You can track &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-854&quot; title=&quot;Way to create an integer in javascript&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-854&quot;&gt;&lt;del&gt;SERVER-854&lt;/del&gt;&lt;/a&gt; which would let you create integers in the shell.&lt;/p&gt;</comment>
                            <comment id="26926" author="scotthernandez" created="Sun, 27 Mar 2011 17:05:03 +0000"  >&lt;p&gt;The default numeric, and only numeric type(&lt;a href=&quot;http://bclary.com/2004/11/07/#a-4.3.21&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bclary.com/2004/11/07/#a-4.3.21&lt;/a&gt;), in javascript is a double. This is both expected and documented. It would be nice if there was more control and help within mongodb&apos;s javascript runtime.&lt;/p&gt;</comment>
                            <comment id="26922" author="testn" created="Sun, 27 Mar 2011 15:36:21 +0000"  >&lt;p&gt;similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-854&quot; title=&quot;Way to create an integer in javascript&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-854&quot;&gt;&lt;del&gt;SERVER-854&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="11651">SERVER-854</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="14963">SERVER-2667</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 27 Mar 2011 15:36:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 3 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-854'>SERVER-854</a></s>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 3 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10021"><![CDATA[OS X]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>kevin.pulo@mongodb.com</customfieldvalue>
            <customfieldvalue>Nathan@Softronet.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>testn</customfieldvalue>
            <customfieldvalue>wardrop</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjcxz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hriegv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20996</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrx9jz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>