Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24392

Invariant in expression::isSubsetOf() is invalid

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.8
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
    • Fully Compatible
    • ALL
    • Query 15 (06/03/16), Query 16 (06/24/16)
    • 0

      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.

            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            0 Vote for this issue
            4 Start watching this issue