-
Type:
Bug
-
Resolution: Done
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: 2.0.3
-
Component/s: Shell
-
None
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
> db.test.ensureIndex(
{x:1},
{unique:true})
> db.test.insert(
)
> db.test.insert(
)
E11000 duplicate key error index: test.test.$x_1 dup key: { : "y
The "y\0a" string has an embedded \0, which is being inserted literally into the E11000 error, causing it to be truncated at some point later.
Error message strings from the server should probably be escaped to not contain embedded nulls, so it doesn't need to be dealt with in each driver.