-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Shell
-
None
-
ALL
The drivers allow null to be inserted into strings for values. The shell doesn't properly interpret the value and truncates at the null for strings.
This creates problems with values inserted by the java driver for instance that are then examined in the shell.
mongos> db.test.insert({_id:'y\u0000z'}) mongos> db.test.insert({_id:'y\u0000a'}) mongos> db.test.find() { "_id" : "y" } { "_id" : "y" }
It's extremely confusing to users to see unique indexes apparently not operating as such. Not to mention inserting these documents into another collection is also not possible using the shell as they have the "same" unique index value.
- duplicates
-
SERVER-6646 Strings with NUL bytes don't round-trip correctly from BSON <-> JavaScript
- Closed