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

Invariant in expression::isSubsetOf() is invalid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.3.8
    • Querying
    • None
    • Fully Compatible
    • ALL
    • Query 15 (06/03/16), Query 16 (06/24/16)
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: