<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:25 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-1218] &quot;assertion: bad char(s) in db name&quot; when using blank space in a use db command</title>
                <link>https://jira.mongodb.org/browse/SERVER-1218</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The problem happened when I accidentally typed &quot;collection&quot; between  &quot;use&quot; and the name of the database I wanted to use. The relevant thing &lt;br/&gt;
is the blank space, of course, and not the word &quot;collection&quot;. &lt;/p&gt;

&lt;p&gt;The shell happily told me that it &quot;switched to db collection docs&quot;.  But, after I saved a document, I could no longer list the databases. I had to restart mongod to fix the problem.&lt;/p&gt;

&lt;p&gt;Here&apos;s my mongo session showing that the problem persists after restarting the shell: &lt;br/&gt;
$ mongo &lt;br/&gt;
MongoDB shell version: 1.4.3 &lt;br/&gt;
url: test &lt;br/&gt;
connecting to: test &lt;br/&gt;
type &quot;help&quot; for help &lt;br/&gt;
&amp;gt; show dbs &lt;/p&gt;

&lt;p&gt;admin &lt;br/&gt;
local &lt;br/&gt;
&amp;gt; use collection docs &lt;/p&gt;

&lt;p&gt;switched to db collection docs &lt;br/&gt;
&amp;gt; var doc1 = &lt;/p&gt;
{&quot;a&quot;:1}
&lt;p&gt; &lt;br/&gt;
&amp;gt; db.coll.save(doc1) &lt;/p&gt;

&lt;p&gt;bad char(s) in db name &lt;br/&gt;
&amp;gt; show dbs &lt;/p&gt;

&lt;p&gt;assert: assert failed : listDatabases failed:&lt;/p&gt;
{ &quot;errmsg&quot; : &quot;assertion: 
bad char(s) in db name&quot;, &quot;ok&quot; : 0 }
&lt;p&gt; &lt;br/&gt;
Thu Jun 10 23:17:39 JS Error: uncaught exception: assert failed : &lt;br/&gt;
listDatabases failed:&lt;/p&gt;
{ &quot;errmsg&quot; : &quot;assertion: bad char(s) in db name&quot;, 
&quot;ok&quot; : 0 }
&lt;p&gt; &lt;br/&gt;
&amp;gt; bye &lt;/p&gt;

&lt;p&gt;$ mongo &lt;br/&gt;
MongoDB shell version: 1.4.3 &lt;br/&gt;
url: test &lt;br/&gt;
connecting to: test &lt;br/&gt;
type &quot;help&quot; for help &lt;br/&gt;
&amp;gt; show dbs &lt;/p&gt;

&lt;p&gt;assert: assert failed : listDatabases failed:&lt;/p&gt;
{ &quot;errmsg&quot; : &quot;assertion: 
bad char(s) in db name&quot;, &quot;ok&quot; : 0 }
&lt;p&gt; &lt;br/&gt;
Thu Jun 10 23:17:50 JS Error: uncaught exception: assert failed : &lt;br/&gt;
listDatabases failed:&lt;/p&gt;
{ &quot;errmsg&quot; : &quot;assertion: bad char(s) in db name&quot;, 
&quot;ok&quot; : 0 }
&lt;p&gt; &lt;/p&gt;


&lt;p&gt;And here&apos;s the console output: &lt;/p&gt;

&lt;p&gt;$ mongod &lt;br/&gt;
mongod --help for help and startup options &lt;br/&gt;
Thu Jun 10 23:16:17 Mongo DB : starting : pid = 22524 port = 27017 &lt;br/&gt;
dbpath = /data/db/ master = 0 slave = 0  64-bit &lt;br/&gt;
Thu Jun 10 23:16:17 db version v1.4.3, pdfile version 4.5 &lt;br/&gt;
Thu Jun 10 23:16:17 git version: &lt;br/&gt;
47ffbdfd53f46edeb6ff54bbb734783db7abc8ca &lt;br/&gt;
Thu Jun 10 23:16:17 sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel &lt;br/&gt;
Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/ &lt;br/&gt;
RELEASE_I386 i386 BOOST_LIB_VERSION=1_37 &lt;br/&gt;
Thu Jun 10 23:16:17 waiting for connections on port 27017 &lt;br/&gt;
Thu Jun 10 23:16:17 web admin interface listening on port 28017 &lt;br/&gt;
Thu Jun 10 23:16:25 connection accepted from 127.0.0.1:58211 #1 &lt;br/&gt;
Thu Jun 10 23:17:36 User Exception 10031:bad char(s) in db name &lt;br/&gt;
Thu Jun 10 23:17:36    Caught Assertion in insert , continuing &lt;br/&gt;
Thu Jun 10 23:17:36 insert collection docs.coll exception &lt;br/&gt;
userassert:bad char(s) in db name 0ms &lt;br/&gt;
Thu Jun 10 23:17:39 User Exception 10031:bad char(s) in db name &lt;br/&gt;
Thu Jun 10 23:17:46 end connection 127.0.0.1:58211 &lt;br/&gt;
Thu Jun 10 23:17:48 connection accepted from 127.0.0.1:58227 #2 &lt;br/&gt;
Thu Jun 10 23:17:50 User Exception 10031:bad char(s) in db name &lt;/p&gt;

&lt;p&gt;And here&apos;s the data directory listing: &lt;br/&gt;
$ ls -l /data/db &lt;br/&gt;
total 8 &lt;br/&gt;
-rwxr-xr-x  1 rstewart  admin  6 Jun 10 23:16 mongod.lock* &lt;/p&gt;

&lt;p&gt;After restarting mongod, the issue goes away. &lt;/p&gt;</description>
                <environment>OS X 10.6&lt;br/&gt;
db version v1.4.3, pdfile version 4.5 &lt;br/&gt;
git version: 47ffbdfd53f46edeb6ff54bbb734783db7abc8ca &lt;br/&gt;
sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel</environment>
        <key id="12118">SERVER-1218</key>
            <summary>&quot;assertion: bad char(s) in db name&quot; when using blank space in a use db command</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="robertstewart">Robert Stewart</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Jun 2010 12:46:34 +0000</created>
                <updated>Tue, 12 Jul 2016 00:29:27 +0000</updated>
                            <resolved>Tue, 15 Jun 2010 01:26:14 +0000</resolved>
                                    <version>1.4.3</version>
                    <version>1.5.2</version>
                                    <fixVersion>1.5.3</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="14769" author="auto" created="Tue, 15 Jun 2010 01:26:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: better Database name check &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1218&quot; title=&quot;&amp;quot;assertion: bad char(s) in db name&amp;quot; when using blank space in a use db command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1218&quot;&gt;&lt;del&gt;SERVER-1218&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/663e59a8f4c82a0a5687ed03c2cc49239c4c3082&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/663e59a8f4c82a0a5687ed03c2cc49239c4c3082&lt;/a&gt;&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>Tue, 15 Jun 2010 01:26:21 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 36 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>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>robertstewart</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrij47:</customfieldvalue>

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

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

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