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

Ban $in queries for allPaths indices which contain unsupported values

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Query 2018-09-24

      Example:

      db.c.drop();
      
      assert.commandWorked(db.adminCommand({setParameter: 1, internalQueryAllowAllPathsIndexes: true}));
      
      db.c.insert({a: 1});
      db.c.insert({a: {b: 1}});
      
      assert.commandWorked(db.c.createIndex({"$**":1}));
      
      const query = {a: {$in: [1, {b: 1}]}};
      printjson(db.c.find(query).toArray());
      printjson(db.c.explain("allPlansExecution").find(query).finish());
      

      This query will attempt to use an allPaths index. We should make sure that it doesn't.

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: