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

Improve error message for invalid hint

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.5.5
    • 2.5.4
    • Querying
    • None
    • Fully Compatible

    Description

      When hinting on a non-existent index, the new query framework error message is difficult to parse and needs at least punctuation between the message and the query details. Ideally it would tell the reason as in 2.4

      In 2.4.8

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

      In 2.5.5-pre:

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

      Attachments

        Activity

          People

            benety.goh@mongodb.com Benety Goh
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: