[SERVER-34974] Dup key value is not readable in error message when unique index is created with collation Created: 14/May/18 Updated: 18/May/18 Resolved: 18/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vasily Kopyl | Assignee: | Asya Kamsky |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | collation | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | db.createCollection('people') db.people.createIndex({userName: 1}, {unique: true, collation: { locale: 'en', strength: 2}}) db.people.insert({userName: 'BOB'})
The last method throws the error: WriteResult({WriteResult({ "nInserted" : 0, "writeError" : { "code" : 11000, "errmsg" : "E11000 duplicate key error collection: members.people index: userName_1 dup key: { : \"E\u0001\u0007\" }" }})
Expected: WriteResult({WriteResult({ "nInserted" : 0, "writeError" : { "code" : 11000, "errmsg" : "E11000 duplicate key error collection: members.people index: userName_1 dup key: { : \"BOB\" }" }})
|
||||||||
| Participants: | |||||||||
| Description |
|
Duplicate key error message reports the key value in unreadable form. This occurs if an index created with collation.
|
| Comments |
| Comment by Asya Kamsky [ 18/May/18 ] |
|
This seems to be a duplicate of SERVER-26050 |