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

Commands wrapped in $query reports wrong error message for unrecognized commands

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.3.2
    • 2.3.1
    • Sharding
    • None
    • ALL

    Description

      db.$cmd.find({ $query: { count: 'user' }}).limit(-1).next()

      works ok

      db.$cmd.find({ secretCommand: 1 }).limit(-1).next()

      gives you:

      { "$err" : "unrecognized command: secretCommand", "code" : 13390 }

      , which is expected.

      while:

      db.$cmd.find({ $query: { secretCommand: 1 }}).limit(-1).next()

      gives you:

      { "$err" : "unrecognized command: $query", "code" : 13390 }

      , which is wrong

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: