Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
3.3.12
-
Query Execution
-
QE 2023-04-03, QE 2023-04-17
-
(copied to CRM)
Description
db.numbers.ensureIndex({text: 1}, {unique: true, collation: {locale: "en", numericOrdering: true}})
|
db.numbers.insert({text: "10"})
|
db.numbers.insert({text: "10"})
|
Gives an output of:
WriteResult({
|
"nInserted" : 0,
|
"writeError" : {
|
"code" : 11000,
|
"errmsg" : "E11000 duplicate key error index: test.numbers.$text_1 dup key: { : \"\u000f\f\u0001\u0005\u0001\u0005\" }"
|
}
|
})
|
Whereas values not transformed by ICU provide a readable key:
WriteResult({
|
"nInserted" : 0,
|
"writeError" : {
|
"code" : 11000,
|
"errmsg" : "E11000 duplicate key error index: test.strings.$text_1 dup key: { : \"10\" }"
|
}
|
})
|
Attachments
Issue Links
- is duplicated by
-
SERVER-34974 Dup key value is not readable in error message when unique index is created with collation
-
- Closed
-
-
SERVER-75242 E11000 duplicate key error cannot be understood when using Swedish collation
-
- Closed
-
- related to
-
SERVER-24007 Server can return invalid UTF8 for error messages due to truncation in the middle of a code point
-
- Backlog
-
-
SERVER-46810 Broken E11000 duplicate key error when unique index contains collation
-
- Closed
-
-
SERVER-60298 Explain can include ICU collation keys encoded as strings, which can be invalid UTF-8
-
- Closed
-