Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2276

Change in error message for invalid "hint"s

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • mongodb-2.6
    • None
    • manual

    Description

      The error message for using $hint with an index that doesn't exist has changed between versions 2.4 and 2.5.

      2.4.9-pre-

      > db.smalltest.find({}).hint({notAnIndex:1})
      error: { "$err" : "bad hint", "code" : 10113 }

      2.5.5-pre-

      > db.smalltest.find({}).hint({notAnIndex:1})
      error: {
      	"$err" : "Couldn't get runner for query because: No query solutions query is ns=qry.smalltest limit=0 skip=0\nTree: $and\nSort: {}\nProj: {}\n",
      	"code" : 17007
      }

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            luke.lovett Luke Lovett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 12 weeks, 6 days ago