[SERVER-4372] Creating a DB with a name containing a colon creates two DBs Created: 24/Nov/11  Updated: 11/Jul/16  Resolved: 06/May/12

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.0.1
Fix Version/s: 2.1.2

Type: Bug Priority: Major - P3
Reporter: Daniel Betz Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: Windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 32bit


Operating System: Windows
Participants:

 Description   

Creating a DB with a name containing a colon creates two DBs

steps to reproduce

Type following statements into a mongo shell:

> use D:B
switched to db D:B
> db.c.save({1:1})
> show dbs
D:B     (empty)
D_B     0.03125GB

expected result

One database is created.

actual result

Two databases where created. The one with the colon replaced by underline
has no collections - but a size is shown by show dbs.

The database which is shown empty by show dbs, has collections c and
system.indexes.



 Comments   
Comment by Tad Marshall [ 06/May/12 ]

Cannot reproduce in latest 2.1.2-pre- code.

2.1.2-pre- mongod.exe and mongo.exe

> use D:B
Sun May 06 17:16:30 Error: [D:B] is not a valid database name shell/mongo.js:40

2.1.2-pre- mongod.exe and 2.0.0 mongo.exe

> use D:B
switched to db D:B
> db.foo.insert({a:1})
invalid db name: D:B.foo

Comment by Eliot Horowitz (Inactive) [ 25/Nov/11 ]

Can you send the mongod log?

Comment by Daniel Betz [ 25/Nov/11 ]

After stopping the server, the data is corrupt and repairing is needed.
However, after the repair the affected databases are disappeared.
I did not use journaling.

Comment by Daniel Betz [ 24/Nov/11 ]

Only windows is affected.

Generated at Thu Feb 08 03:05:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.