<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:13:29 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-7046] On windows, mongo.exe should be written to %HOMEDRIVE%%%HOMEPATH%\.dbshell not .\dbshell</title>
                <link>https://jira.mongodb.org/browse/SERVER-7046</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When you run mongo.exe from the command line, it makes the .dbshell file in the working director, not in your user folder (e.g c:\Users\zippy or c:\Documents and Settings\zippy). Most ports of unix utilities write their dotfiles there, and this is expected behavior.&lt;/p&gt;</description>
                <environment>Windows</environment>
        <key id="50623">SERVER-7046</key>
            <summary>On windows, mongo.exe should be written to %HOMEDRIVE%%%HOMEPATH%\.dbshell not .\dbshell</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="3">Duplicate</resolution>
                                        <assignee username="tad">Tad Marshall</assignee>
                                    <reporter username="zippy1981">Justin Dearing</reporter>
                        <labels>
                            <label>Windows</label>
                    </labels>
                <created>Sun, 16 Sep 2012 15:10:05 +0000</created>
                <updated>Fri, 15 Feb 2013 15:06:14 +0000</updated>
                            <resolved>Sun, 16 Sep 2012 15:49:28 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="164916" author="tad" created="Mon, 17 Sep 2012 09:31:21 +0000"  >&lt;p&gt;We&apos;re using the C runtime function &apos;fopen()&apos; to open the file and we&apos;re passing it &apos; C:\Users\jdearing\.dbshell&apos; (with the leading space) in your example.  I guess the CRT has some interesting logic where when the path begins with a space it prepends the current working directory.&lt;/p&gt;

&lt;p&gt;Unless this causes issues with a lot of users, we&apos;ll probably just require that %USERPROFILE% be correctly set (as it should be by default).  Thanks for testing it!&lt;/p&gt;</comment>
                            <comment id="164867" author="zippy1981" created="Mon, 17 Sep 2012 01:50:01 +0000"  >&lt;p&gt;Tad,&lt;/p&gt;

&lt;p&gt;Just some followup, I ran mongo.exe 2.0.7 in c:\Users\jdearing\Documents\deleteme with procmon running. If I dont set HOME=%USERPROFILE% it opens C:\Users\jdearing\Documents\deleteme\.dbshell:&lt;/p&gt;

&lt;p&gt;9:11:45.4172054 PM	mongo.exe	6904	CreateFile	C:\Users\jdearing\Documents\deleteme\.dbshell	mongo	NAME NOT FOUND	Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a&lt;/p&gt;

&lt;p&gt;I do SET HOME=%USERPROFILE% it opens C:\Users\jdearing\.dbshell:&lt;/p&gt;


&lt;p&gt;9:18:39.2361413 PM	mongo.exe	3872	ReadFile	C:\Users\jdearing\.dbshell	mongo	END OF FILE	Offset: 96, Length: 4,096&lt;/p&gt;

&lt;p&gt;An interesting edge case, if I do SET HOME= %USERPROFILE% then %HOME% is &quot; C:\users\jdearing&quot; (note the prepended space). Now if I run mongo it calls CreateFile on &quot;C:\Users\jdearing\Documents\deleteme\ C:\Users\jdearing\.dbshell&quot;:&lt;/p&gt;


&lt;p&gt;9:20:32.8800465 PM	mongo.exe	8784	CreateFile	C:\Users\jdearing\Documents\deleteme\ C:\Users\jdearing\.dbshell	mongo	NAME INVALID	Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a&lt;/p&gt;

&lt;p&gt;In 2.2 its using the USERPROFILE variable on my machine. for all of the cases above behavior is the same if you manually set or unset USERPROFILE.&lt;/p&gt;</comment>
                            <comment id="164813" author="scotthernandez" created="Sun, 16 Sep 2012 16:20:46 +0000"  >&lt;p&gt;HOME is not a normal windows env. var, afaik. You would need to add this manually, and that isn&apos;t really a fix for normal windows users. USERPROFILE is the standard var for this as defined by microsoft/windows and the one this patch added. It is equiv. to the unix home env. var.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/shell/shell_utils.cpp#L59&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/shell/shell_utils.cpp#L59&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164812" author="tad" created="Sun, 16 Sep 2012 16:04:43 +0000"  >&lt;p&gt;Justin, can you see if HOME is defined in your environment, and if not whether defining it fixes the problem?  Can you also verify that version 2.2.0 works correctly?&lt;/p&gt;</comment>
                            <comment id="164809" author="scotthernandez" created="Sun, 16 Sep 2012 15:49:28 +0000"  >&lt;p&gt;This is not backported to 2.0.X; if we want to backport then mark the orig. issue such.&lt;/p&gt;</comment>
                            <comment id="164808" author="tad" created="Sun, 16 Sep 2012 15:40:01 +0000"  >&lt;p&gt;Version 2.0.7 apparently is looking for HOME instead of USERPROFILE.  On my Windows 7 machine, I have both of these set.  I&apos;m not sure what determines whether or not one or the other of these is set.  They could be have been created by something I installed and not be present on a &quot;clean&quot; install, or perhaps some upgrade path (e.g. Vista to Windows 7) sets them and another doesn&apos;t.  I&apos;m happy to change the code (or take a pull request) if you figure out what the right change is.  I agree with you, .dbshell should go in your &quot;user home&quot; directory.&lt;/p&gt;</comment>
                            <comment id="164807" author="zippy1981" created="Sun, 16 Sep 2012 15:31:48 +0000"  >&lt;p&gt;I am on Windows 7 and mongo 2.0.7 (I will upgrade and test, sorry for not checking my mongo version).&lt;/p&gt;

&lt;p&gt;%USERPROFILE% is properly set, and ss64.com says that is also set in XP, &lt;a href=&quot;http://ss64.com/nt/syntax-variables.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://ss64.com/nt/syntax-variables.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Justin&lt;/p&gt;</comment>
                            <comment id="164806" author="tad" created="Sun, 16 Sep 2012 15:27:59 +0000"  >&lt;p&gt;The current code tries to use the contents of the USERPROFILE environment variable on Windows, and falls back to the behavior described above if it is not set. See shellHistoryInit() in src/mongo/shell/dbshell.cpp and getUserDir() in src/mongo/shell/shell_utils.cpp.&lt;/p&gt;

&lt;p&gt;Justin, do you have a USERPROFILE variable set?  What version of Windows are you testing this on?&lt;/p&gt;

&lt;p&gt;We should probably have a more complete fallback algorithm if USERPROFILE is not set.  There are additional ways that we could find the &quot;home&quot; directory beyond depending on a single environment variable.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="22601">SERVER-3912</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="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 16 Sep 2012 15:27:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 22 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="10022"><![CDATA[Windows]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>zippy1981</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnolr:</customfieldvalue>

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

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

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