<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:11:01 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-26056] MongoDb $where clause returning incorrect results</title>
                <link>https://jira.mongodb.org/browse/SERVER-26056</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;$where clause producing inconsistent results&lt;/p&gt;

&lt;p&gt;Please refer the steps to reproduce section for detailed description.&lt;/p&gt;</description>
                <environment>{&lt;br/&gt;
	&amp;quot;version&amp;quot; : &amp;quot;3.2.8&amp;quot;,&lt;br/&gt;
	&amp;quot;gitVersion&amp;quot; : &amp;quot;ed70e33130c977bda0024c125b56d159573dbaf0&amp;quot;,&lt;br/&gt;
	&amp;quot;targetMinOS&amp;quot; : &amp;quot;Windows Vista/Windows Server 2008&amp;quot;,&lt;br/&gt;
	&amp;quot;modules&amp;quot; : [ ],&lt;br/&gt;
	&amp;quot;allocator&amp;quot; : &amp;quot;tcmalloc&amp;quot;,&lt;br/&gt;
	&amp;quot;javascriptEngine&amp;quot; : &amp;quot;mozjs&amp;quot;,&lt;br/&gt;
	&amp;quot;sysInfo&amp;quot; : &amp;quot;deprecated&amp;quot;,&lt;br/&gt;
	&amp;quot;versionArray&amp;quot; : [&lt;br/&gt;
		3,&lt;br/&gt;
		2,&lt;br/&gt;
		8,&lt;br/&gt;
		0&lt;br/&gt;
	],&lt;br/&gt;
	&amp;quot;openssl&amp;quot; : {&lt;br/&gt;
		&amp;quot;running&amp;quot; : &amp;quot;disabled&amp;quot;,&lt;br/&gt;
		&amp;quot;compiled&amp;quot; : &amp;quot;disabled&amp;quot;&lt;br/&gt;
	},&lt;br/&gt;
	&amp;quot;buildEnvironment&amp;quot; : {&lt;br/&gt;
		&amp;quot;distmod&amp;quot; : &amp;quot;&amp;quot;,&lt;br/&gt;
		&amp;quot;distarch&amp;quot; : &amp;quot;i386&amp;quot;,&lt;br/&gt;
		&amp;quot;cc&amp;quot; : &amp;quot;cl: Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86&amp;quot;,&lt;br/&gt;
		&amp;quot;ccflags&amp;quot; : &amp;quot;/nologo /EHsc /W3 /wd4355 /wd4800 /wd4267 /wd4244 /wd4290 /wd4068 /wd4351 /we4013 /we4099 /we4930 /Z7 /errorReport:none /MT /O2 /Oy- /Gw /Gy /Zc:inline&amp;quot;,&lt;br/&gt;
		&amp;quot;cxx&amp;quot; : &amp;quot;cl: Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86&amp;quot;,&lt;br/&gt;
		&amp;quot;cxxflags&amp;quot; : &amp;quot;/TP&amp;quot;,&lt;br/&gt;
		&amp;quot;linkflags&amp;quot; : &amp;quot;/nologo /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /OPT:REF&amp;quot;,&lt;br/&gt;
		&amp;quot;target_arch&amp;quot; : &amp;quot;i386&amp;quot;,&lt;br/&gt;
		&amp;quot;target_os&amp;quot; : &amp;quot;windows&amp;quot;&lt;br/&gt;
	},&lt;br/&gt;
	&amp;quot;bits&amp;quot; : 32,&lt;br/&gt;
	&amp;quot;debug&amp;quot; : false,&lt;br/&gt;
	&amp;quot;maxBsonObjectSize&amp;quot; : 16777216,&lt;br/&gt;
	&amp;quot;storageEngines&amp;quot; : [&lt;br/&gt;
		&amp;quot;devnull&amp;quot;,&lt;br/&gt;
		&amp;quot;ephemeralForTest&amp;quot;,&lt;br/&gt;
		&amp;quot;mmapv1&amp;quot;&lt;br/&gt;
	],&lt;br/&gt;
	&amp;quot;ok&amp;quot; : 1&lt;br/&gt;
}</environment>
        <key id="315473">SERVER-26056</key>
            <summary>MongoDb $where clause returning incorrect results</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="5">Cannot Reproduce</resolution>
                                        <assignee username="kelsey.schubert@mongodb.com">Kelsey Schubert</assignee>
                                    <reporter username="ArockiAnto">Arockia Anto [X]</reporter>
                        <labels>
                            <label>query</label>
                    </labels>
                <created>Sun, 11 Sep 2016 17:30:30 +0000</created>
                <updated>Mon, 12 Sep 2016 19:25:39 +0000</updated>
                            <resolved>Mon, 12 Sep 2016 19:25:39 +0000</resolved>
                                    <version>3.2.8</version>
                                                    <component>Stability</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1382347" author="thomas.schubert" created="Mon, 12 Sep 2016 19:25:39 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ArockiAnto&quot; class=&quot;user-hover&quot; rel=&quot;ArockiAnto&quot;&gt;ArockiAnto&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the detailed report. Please be aware that &lt;a href=&quot;https://docs.mongodb.com/manual/installation/#deprecation-of-32-bit-versions&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this build of MongoDB is deprecated&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Unfortunately, we were unable to reproduce this behavior with the same 32-bit build. For MongoDB-related support discussion please post on the &lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-users group&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com/questions/tagged/mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stack Overflow with the &lt;tt&gt;mongodb&lt;/tt&gt; tag&lt;/a&gt;. A question like this involving more discussion would be best posted on the mongodb-users group.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 12 Sep 2016 13:03:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 22 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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>kelsey.schubert@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 22 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ArockiAnto</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjwdz:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Create collection (EMPLOYEES) and insert the below doc.&lt;/p&gt;
    {&quot;_id&quot; : ObjectId(&quot;57d1a113666f6fc012f2708f&quot;),
	&quot;employee_id&quot; : 107,
	&quot;first_name&quot; : &quot;Diana&quot;,
	&quot;last_name&quot; : &quot;Lorentz&quot;,
	&quot;email&quot; : &quot;DLORENTZ&quot;,
	&quot;phone_number&quot; : &quot;590.423.5567&quot;,
	&quot;hire_date&quot; : &quot;07-FEB-99&quot;,
	&quot;job_id&quot; : &quot;IT_PROG&quot;,
	&quot;salary&quot; : 4200,
	&quot;manager_id&quot; : 103,
	&quot;department_id&quot; : 60}


&lt;p&gt;Now execute the below 2 query and compare the results&lt;/p&gt;

&lt;p&gt;db.EMPLOYEES.find({$where: &quot; return false &quot;});`&lt;/p&gt;

&lt;p&gt;if i execute the the same logic in other way using the below query, its returning records from EMPLOYEES collection which is incorrect.&lt;/p&gt;

&lt;p&gt;    `db.EMPLOYEES.find({$where: function(){return false}});`&lt;/p&gt;</customfieldvalue>

                        </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>
                                    <customfieldvalue><![CDATA[kelsey.schubert@mongodb.com]]></customfieldvalue>
    

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

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