Prevent invalid type conversion during match expression serialization

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • 8.2.13, 8.0.29, 7.0.40, 8.3.8, 9.0.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • v9.0, v8.3, v8.2, v8.0, v7.0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In expression_tree.cpp a static_cast into type `PathMatchExpression` is attempted on type `MatchExpression::INTERNAL_SCHEMA_MAX_PROPERTIES`, which is not a descendant of `PathMatchExpression`. This type mismatch causes the mongod instance to crash. This can occur when any valid query containing shape {$jsonSchema:

      {not: Properties: N}

      }}` is run.  

      Fix this issue by moving `INTERNAL_SCHEMA_MAX_PROPERTIES` into the correct section of the switch statement (where `INTERNAL_SCHEMA_MIN_PROPERTIES` already is) so that the problematic cast will no longer.

            Assignee:
            Natalie Hill
            Reporter:
            Natalie Hill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: