|
jstest:
var testdb = db.getSiblingDB('aaa:')
|
var t = testdb.db_server1485
|
t.insert({a:1})
|
testdb.stats()
|
db.getSiblingDB("aaa:").dropDatabase()
|
Result on Windows 2008 server (windows-64 build, 2.7.2-pre-).
2014-06-13T23:03:52.326+0100 Error: [aaa:] is not a valid database name
|
at Mongo.getDB (src/mongo/shell/mongo.js:41:12)
|
at DB.getSiblingDB (src/mongo/shell/db.js:20:28)
|
at Z:\master\db_server1485.js:3:17 at src/mongo/shell/mongo.js:41
|
failed to load: Z:\master\db_server1485.js
|
And again in Python to confirm that it is the server rejecting the invalid name:
from pymongo import MongoClient
|
from pprint import pprint
|
|
client = MongoClient('localhost', 27999)
|
|
testdb = client['aaa::']
|
t = testdb.db_server1485
|
t.insert( {"a":1} )
|
|
pprint( testdb.command("dbstats") )
|
client.drop_database('aaa::')
|
Result on same windows-64 instance
$ /cygdrive/c/Python27/python db_server1485.py
|
Traceback (most recent call last):
|
File "db_server1485.py", line 10, in <module>
|
t.insert( {"a":1} )
|
File "C:\Python27\lib\site-packages\pymongo\collection.py", line 362, in insert
|
self.database.connection)
|
File "C:\Python27\lib\site-packages\pymongo\message.py", line 248, in _do_batched_insert
|
client._send_message(_insert_message(EMPTY.join(data), safe), safe)
|
File "C:\Python27\lib\site-packages\pymongo\mongo_client.py", line 969, in _send_message
|
rv = self.__check_response_to_last_error(response)
|
File "C:\Python27\lib\site-packages\pymongo\mongo_client.py", line 884, in __check_response_to_last_error
|
response = helpers._unpack_response(response)
|
File "C:\Python27\lib\site-packages\pymongo\helpers.py", line 100, in _unpack_response
|
error_object["$err"])
|
pymongo.errors.OperationFailure: database error: Invalid ns [aaa::.$cmd]
|
|