Implemented support for surrogate users, defined in a seperate database then currently using. Also fixed a memory leak when switching between databases with credentials. Added support for the authSource connection string option, as well as future compatability support for authMechanism.
Previously, tagset would not be freed if it contained no tags. Since it is always allocated, we should free it regardless of whether tags were added to it.
We need to use "%s", error_message when passing to the varargs function mongo_cursor_throw. The explanation for why this is important is well described at http://en.wikipedia.org/wiki/Uncontrolled_format_string
Also update the errormessage which seems to be have improved in certain cenarios in 2.3.x The first and the last connection hashes were actually identical and therefore pretty meaningless, so made sure all 3 are unique
milliseconds uhh, no. The default was never 1000 seconds The caller used to send 1000 *ms* as the default, not seconds. Since the caller was hardcoded this check never kicked in until now
…recv_header(). Keeping our APIs consistent since 2012 :-)
Previous fix to PHP-356 fixed the timeout for creating the actual connection, while this fix deals with timeout for the ping/pong game we need to play with mongod when bootstrapping the connection. Note: These are two (three) different options! connectTimeoutMS is exclusively used for connecting to the server socketTimeoutMS is used for data transmissions and the 3rd one wTimeoutMS is _server side_ replication timeout The socketTimeoutMS can be adjusted per-query, while connectTimeoutMS can only be set in the ctor. The connectTimeoutMS is is also used when attempting to reestablish connection to the server after f.e. query timeout (socketTimeoutMS). To make things consistent we should probably consider allowing "socketTimeoutMS" as a query options, today it is simply called "timeout" which is a littlebit ambiguous
* pull-request/282: Replace ambiguous variable names in read preference tests Fixed PHP-680: Don't free null pointers in read preference dtors Fixed PHP-679 PHP-681: Make setReadPreference() consistent Fixed PHP-668: Allow empty setReadPreference() tags param for primary mode Refactor existing get/setReadPreference() tests Fix whitespace CS in get/setReadPreference() tests
If not tags are provided, the read preference tagsets should be cleared out. If an error is encountered (either bad mode or invalid tagsets), the read preference should not be modified at all.
… mode See doctrine/mongodb#92 for why this was helpful.
Made tests consistent across classes, and added getReadPreference() inheritance tests where appropriate. All classes use the same C implementation for setReadPreference(), so perhaps there's a more elegant way to ensure we test the same functionality against each class.