Commit 84d7dda4 authored by A. Jesse Jiryu Davis's avatar A. Jesse Jiryu Davis
Browse files

CDRIVER-2558 prohibit per-operation options in txn

Users cannot pass read concern, write concern, or read preference to
"with_opts" functions in a transaction. To prevent this, keep the user's
read preference separate from the inherited read preference until it can
be checked in _mongoc_client_command_with_opts().

Most drivers don't allow these 3 options to be set per-operation, so the Transactions Spec doesn't test that setting them is prohibited in a
transaction. The new test file opts.yml uses the Transaction Spec's test
format for C Driver-specific tests of this scenario.

Also implement CDRIVER-2704, included upsertedCount in replies from mongoc_collection_update_one, update_many, and replace_one: it's useful
and allows us to use standard CRUD test specifications. Update our test
runner to use CRUD functions like mongoc_collection_insert_one instead
of using mongoc_bulk_operation_t for all writes.
parent 5ba19869
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment