-
Type: Bug
-
Resolution: Unresolved
-
Priority: Critical - P2
-
None
-
Affects Version/s: 3.4.0-rc5
-
Component/s: Querying
-
Query Execution
-
v3.4
The original design for the collation feature specified that collation-aware string comparison would only apply to BSONType::String. However, in all existing versions, String and Symbol have been considered the same canonical type, meaning that String "a" == Symbol "a", String "a" < Symbol "b" and Symbol "a" < String "b".
As currently implemented, we only translate String (not Symbol) to the corresponding ICU comparison key. Therefore, translated String comparison keys will be compared directly to raw, untranslated Symbols in indexes with a collation. Such indexes are broken. Furthermore, comparisons between Symbol and String may not have a total order, since we only use the collator in the comparison if String is on the left-hand side. There may also be places in the query planner which are incorrect if the query involves the combination of Symbol and Collation.
- is related to
-
SERVER-27197 Code BSON type should not be compared using a collation-aware string comparator
- Closed
- related to
-
SERVER-27200 Comparison of the scope object in a BSON element of type CodeWScope should not respect the collation
- Closed
-
SERVER-27300 Disallow indexing of BSONType::Symbol with a non-simple collation
- Closed