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

StageBuilder::build() should fail when given query solution created from "no op" expression

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.0
    • None
    • Querying
    • None
    • Fully Compatible
    • QuInt E (01/11/16)

    Description

      StageBuilder::build() should return an error (or trip an invariant) when given a QuerySolution created from a match predicate that includes a TextNoOpMatchExpression or a WhereNoOpMatchExpression. The query execution logic does not expect query solution nodes created from these expressions, and the execution tree created from such a query solution could generate incorrect results or crash the server.

      There are currently no known ways to currently trigger this condition, but it is easy to introduce a regression by accident that triggers this (for example, by mistakenly passing an ExtensionsCallbackNoop object instead of a ExtensionsCallbackReal object to CanonicalQuery::canonicalize() in the wrong place).

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: