[SERVER-27200] Comparison of the scope object in a BSON element of type CodeWScope should not respect the collation Created: 28/Nov/16 Updated: 05/Apr/17 Resolved: 06/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.1, 3.5.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Completed: | |||||||||||||
| Sprint: | Query 2016-12-12 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
When we compare the nested object representing the JavaScript scope in an element of BSONType::CodeWScope, we pass through the StringData comparator: https://github.com/mongodb/mongo/blob/r3.4.0-rc5/src/mongo/bson/bsonelement.cpp#L1005 This is incorrect, since only BSONType::String, or String nested inside Object or Array, should ever use custom string comparison semantics. This means that queries may compare CodeWScope elements incorrectly. |
| Comments |
| Comment by Githook User [ 06/Dec/16 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit 6bee18129c27a82ebcbd316c7900afb04c6f69dc) |
| Comment by Githook User [ 06/Dec/16 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |