Details
Description
Creating a collection with a UTF8 character out of the ASCII range can result in an unhelpful error. For example, creating a collection called '\x7f' (i.e: the delete character), results in the following error message:
WT_SESSION.create: Error parsing 'type=file,internal_page_max=16k,leaf_page_max=16k,checksum=on,prefix_compression=true,block_compressor=,,,,key_format=u,value_format=u,app_metadata=(formatVersion=8,infoObj={ "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "test." }),log=(enabled=true)' at offset 237: Unexpected character: Invalid argument |
MongoDB should handle such collection names more elegantly. Either disallowing them similar to $ and {{.}}or allowing their creation without error.