[CXX-1072] database::create_collection() sends invalid request to server when "no_padding" option is set to true Created: 06/Oct/16  Updated: 19/Oct/16  Resolved: 07/Oct/16

Status: Closed
Project: C++ Driver
Component/s: Implementation
Affects Version/s: None
Fix Version/s: 3.0.3

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


 Description   

When database::create_collection() is passed an options::create_collection object with the "no_padding" set to true, the driver adds the invalid option "{noPadding: true}" to the create command request. This value is ignored on older server versions, and rejected with an error on newer server versions (as of SERVER-25459).

The correct option to send to the server when "no_padding" is requested is "{flags: 0x10}", per the create command reference.



 Comments   
Comment by Githook User [ 07/Oct/16 ]

Author:

{u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}

Message: CXX-1072 create_collection::to_document(): serialize _no_padding fix

Previously, options::create_collection::_no_padding was always
serialized incorrectly.
Branch: 3.1-dev
https://github.com/mongodb/mongo-cxx-driver/commit/6480a7c276206b4042f86d5eddf55e825750f470

Comment by Githook User [ 07/Oct/16 ]

Author:

{u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}

Message: CXX-1072 create_collection::to_document(): serialize _no_padding fix

Previously, options::create_collection::_no_padding was always
serialized incorrectly.
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/6480a7c276206b4042f86d5eddf55e825750f470

Comment by J Rassi [ 06/Oct/16 ]

https://github.com/mongodb/mongo-cxx-driver/pull/557

Generated at Wed Feb 07 22:01:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.