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

giving an empty array to a $in condition inside a $or causes a failed assertion

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.5
    • Affects Version/s: 1.5.3
    • Component/s: Querying
    • None
    • Environment:
      Centos 5.3 32-bit
    • ALL

      It works correctly when not using $or:
      > db.character.find({'_id':

      {'$in': []}

      , '_priv.lvl': 1}).count()
      0

      But when inside a $or:
      > db.character.find({'$or': [{'_id':

      {'$in': []}

      , '_priv.lvl': 1}]}).count()
      Thu Jun 24 14:47:07 uncaught exception: count failed: {
      "errmsg" : "exception: assertion db/queryutil.cpp:706",
      "code" : 0,
      "ok" : false
      }

            Assignee:
            aaron Aaron Staple
            Reporter:
            sunetos Adam R. Smith
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: