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

Ban $in queries for allPaths indices which contain unsupported values

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • Query 2018-09-24

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: