ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 8.3.0, 9.0.0
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • Hide

      I added the following test case to jstests/core/index/express_write.js:

       

      // Even if there is an $eq, if there is another field, it should not be eligible for the express path
      runExpressTest({
          command: {delete: collName, deletes: [{q: {_id: {a:0, $eq: 1}}, limit: 1}]},
          usesExpress: false,
          expectedDocs: [docs[0], docs[1], docs[2], docs[3]],});
      

       

      Show
      I added the following test case to jstests/core/index/express_write.js:   // Even if there is an $eq, if there is another field, it should not be eligible for the express path runExpressTest({ command: {delete: collName, deletes: [{q: {_id: {a:0, $eq: 1}}, limit: 1}]}, usesExpress: false , expectedDocs: [docs[0], docs[1], docs[2], docs[3]],});  
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If you have a query of the form '{_id: {a: 0, $eq: 2}}', isSimpleIdQuery in query_utils.cpp will return true and it will get sent to the express executor path where 
      getQueryFilterMaybeUnwrapEq will unwrap it to '{_id: 2}' and ignore the 'a: 0' entirely.  It should never get sent to the express path in the first place because isSimpleIdQuery should return false when there are multiple fields in the object.

            Assignee:
            Unassigned
            Reporter:
            Logan Karbiner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: