[SERVER-12396] Add more query tests for updates Created: 17/Jan/14  Updated: 21/Jan/16  Resolved: 21/Jan/16

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 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.


Generated at Thu Feb 08 03:28:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.