[CDRIVER-1751] mongoc_collection_find_with_opts() should return error if collation specified and connection does not support read commands Created: 17/Oct/16  Updated: 15/Nov/16  Resolved: 28/Oct/16

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CXX-971 Support providing collation per opera... Closed
is depended on by CXX-1132 Test that collection::find(), collect... Closed
Related
related to CDRIVER-1522 Add mongoc_collection_find_with_opts Closed
is related to CDRIVER-1779 mongoc_collection_find_and_modify_wit... Closed

 Description   

mongoc_collection_find_with_opts() should return an error to the user if a collation is specified and the server does not support read commands. Currently, no error is returned to the user, and the collation is passed to the server with the invalid query modifier "$collation" (which is ignored by the server). Tested with libmongoc 1.5.0-rc2 against server version 2.6.12.

Relevant excerpt from the collation spec:

Drivers therefore MUST throw an error if a user specifies a Collation and the selected server has a maxWireVersion < 5 or if using opcode-based unacknowledged writes.



 Comments   
Comment by Githook User [ 01/Nov/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1751 fix merge error in collation test
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7ebc93a2e71134af81750bc82902a5c9e0913d11

Comment by Githook User [ 28/Oct/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1751: Error client side when find doesn't support collation
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3b0d74ff951d559791fd4715e7cf263f6993c5c8

Generated at Wed Feb 07 21:13:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.