Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical - P2
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Querying
-
Backwards Compatibility:Fully Compatible
-
Operating System:ALL
-
Backport Requested:v4.0, v3.6, v3.4, v3.2
-
Sprint:Query 2018-06-18, Query 2018-07-02, Query 2018-07-16, Query 2018-07-30, Query 2018-08-13
Description
It appears that when covered index can be used, but collation isn't involved in match or sort then the strings from covered index query are returned without being looked up.
db.stringtest.insertOne({ int: 1, text: "hello world" });
|
db.stringtest.createIndex({ int: -1, text: -1 }, { collation: { locale: "en", strength: 1 }});
|
db.stringtest.find({ int: 1 }, { _id: 0, int: 1, text: 1 })
|
// expected result { int: 1, text: "hello world" }
|
// actual result
|
{"int" : 1, "text" : "71??E\u0004UEK?/" }
|