<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:54:44 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-636] MapReduce in PHP crashes server</title>
                <link>https://jira.mongodb.org/browse/SERVER-636</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Following PHP script will crash mongod&lt;/p&gt;

&lt;p&gt;$connection = new Mongo(); // connects to localhost:27017&lt;br/&gt;
$game = $connection-&amp;gt;test-&amp;gt;game;&lt;br/&gt;
$start = new MongoDate(strtotime(&quot;2009-12-01 00:00:00&quot;));&lt;br/&gt;
$end = new MongoDate(strtotime(&quot;2010-01-01 00:00:00&quot;));&lt;br/&gt;
$game_id = &apos;wxxz0xu4hdcm7ob4ps47rf89&apos;;&lt;/p&gt;

&lt;p&gt;$map = new MongoCode(&quot;function() { emit(this.g_id,&lt;/p&gt;
{c: 2, d: this}
&lt;p&gt;); }&quot;);&lt;br/&gt;
$reduce = new MongoCode(&apos;function(k, vals) {&lt;br/&gt;
    var sum = 0;&lt;br/&gt;
    for (var i in vals) &lt;/p&gt;
{
        sum += 1;
    }
&lt;p&gt;    return sum;&lt;br/&gt;
        }&lt;br/&gt;
&apos;);&lt;/p&gt;

&lt;p&gt;$where = array(&quot;dt&quot; =&amp;gt; array(&apos;$gt&apos; =&amp;gt; $start, &apos;$lte&apos; =&amp;gt; $end));&lt;/p&gt;

&lt;p&gt;$sales = $connection-&amp;gt;casino-&amp;gt;command(array(&lt;br/&gt;
    &quot;mapreduce&quot; =&amp;gt; &quot;game&quot;,&lt;br/&gt;
    &quot;map&quot; =&amp;gt; $map,&lt;br/&gt;
    &quot;reduce&quot; =&amp;gt; $reduce,&lt;br/&gt;
    &quot;query&quot; =&amp;gt; $where&lt;br/&gt;
    ));&lt;/p&gt;

&lt;p&gt;$cursor = $connection-&amp;gt;casino-&amp;gt;selectCollection($sales&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;result&amp;#39;&amp;#93;&lt;/span&gt;)&lt;del&gt;&amp;gt;find()&lt;/del&gt;&amp;gt;limit(-100);&lt;br/&gt;
foreach ($cursor as $obj){&lt;br/&gt;
        print_r($obj);&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>db version: 1.3.2-  PHP 5.2.9 - mongodb-linux-x86_64-v8-2010-02-14; Linux linux-bkk.geoadmin.com 2.6.27.5-117.fc10.x86_64</environment>
        <key id="11306">SERVER-636</key>
            <summary>MapReduce in PHP crashes server</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="vladaman">Vladimir Vlach</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Feb 2010 01:49:19 +0000</created>
                <updated>Tue, 6 Apr 2010 13:31:24 +0000</updated>
                            <resolved>Tue, 6 Apr 2010 13:31:24 +0000</resolved>
                                    <version>1.3.2</version>
                                                    <component>JavaScript</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="13471" author="eliot" created="Tue, 6 Apr 2010 13:31:24 +0000"  >&lt;p&gt;if you have a way to reproduce, comment and we can re-open&lt;/p&gt;</comment>
                            <comment id="13017" author="eliot" created="Mon, 15 Mar 2010 17:24:24 +0000"  >&lt;p&gt;waiting for help reproducing&lt;/p&gt;</comment>
                            <comment id="12967" author="eliot" created="Sun, 14 Mar 2010 00:22:10 +0000"  >&lt;p&gt;Cant&apos; manage to reproduce - can you send log file?&lt;/p&gt;</comment>
                            <comment id="12315" author="vladaman" created="Mon, 15 Feb 2010 10:49:45 +0000"  >&lt;p&gt;I figured out how to replicate this.&lt;/p&gt;

&lt;p&gt;This line works correctly:&lt;br/&gt;
$map = new MongoCode(&quot;function() { emit(this.g_id,&lt;/p&gt;
{c: 2}
&lt;p&gt;); }&quot;); &lt;/p&gt;

&lt;p&gt;but this one crashes server (see , d: this):&lt;br/&gt;
$map = new MongoCode(&quot;function() { emit(this.g_id,&lt;/p&gt;
{c: 2, d: this}
&lt;p&gt;); }&quot;); &lt;/p&gt;
</comment>
                            <comment id="12314" author="eliot" created="Mon, 15 Feb 2010 09:19:35 +0000"  >&lt;p&gt;Can you send the mongod log file and a sample object&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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 15 Feb 2010 09:19:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 46 weeks, 1 day 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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 46 weeks, 1 day 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>vladaman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrprrr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22439</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|ht0jsv:</customfieldvalue>

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