[SERVER-24392] Invariant in expression::isSubsetOf() is invalid Created: 03/Jun/16  Updated: 06/Jun/16  Resolved: 03/Jun/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.3.8

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 15 (06/03/16), Query 16 (06/24/16)
Participants:
Linked BF Score: 0

 Description   

expression::isSubsetOf() uses an invariant to check that either lhs and rhs have the same collator, or lhs does not contain any string comparison, so that it is safe to compare lhs and rhs using either collator. This is expected to be the case when isSubsetOf() is called from index selection because an index will only be selected if the index and the query have the same collator, or the query does not contain string comparison. However, PlanCacheIndexabilityState::processPartialIndex() calls isSubsetOf() for every partial index, regardless of whether it would be chosen by index selection. Instead of using an invariant to test that either lhs and rhs have the same collator or lhs does not contain string comparison, isSubsetOf() should return false if this does not hold.



 Comments   
Comment by Githook User [ 03/Jun/16 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-24392 Remove invalid invariant in expression::isSubsetOf()
Branch: master
https://github.com/mongodb/mongo/commit/10e662cad7fe15581c6c499b934b7d4fd3a1e83d

Generated at Thu Feb 08 04:06:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.