[SERVER-1218] "assertion: bad char(s) in db name" when using blank space in a use db command Created: 11/Jun/10 Updated: 12/Jul/16 Resolved: 15/Jun/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 1.4.3, 1.5.2 |
| Fix Version/s: | 1.5.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stewart | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS X 10.6 |
||
| Operating System: | OS X |
| Participants: |
| Description |
|
The problem happened when I accidentally typed "collection" between "use" and the name of the database I wanted to use. The relevant thing The shell happily told me that it "switched to db collection docs". But, after I saved a document, I could no longer list the databases. I had to restart mongod to fix the problem. Here's my mongo session showing that the problem persists after restarting the shell: admin switched to db collection docs bad char(s) in db name assert: assert failed : listDatabases failed: { "errmsg" : "assertion: bad char(s) in db name", "ok" : 0 } $ mongo assert: assert failed : listDatabases failed: { "errmsg" : "assertion: bad char(s) in db name", "ok" : 0 }
And here's the console output: $ mongod And here's the data directory listing: After restarting mongod, the issue goes away. |
| Comments |
| Comment by auto [ 15/Jun/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: better Database name check |