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

Add more query tests for updates

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Write Ops
    • Fully Compatible

    Description

      Add tests which send the extended query syntax:

      {$query:{..}, $explain:true, $hint:{...}, $showDiskLoc:true, ... }

      In an update to make sure they aren't supported as query options:

      db.a.update({$query:{}, $explain:true}, {$set:{a:1}})
      Update WriteResult({
      	"ok" : 1,
      	"nModified" : 0,
      	"n" : 0,
      	"lastOp" : Timestamp(1389888187, 1),
      	"writeErrors" : [
      		{
      			"index" : 0,
      			"code" : 17242,
      			"errmsg" : "could not canonicalize query { $query: {}, $explain: true }"
      		}
      	]
      })

      We will want to cover other query options which are not appropriate to updates if there are any.

      Attachments

        Activity

          People

            Unassigned Unassigned
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: