Skip to content

Commit 5f8d990

Browse files
committed
PHPC-24 PHPC-77 PHPC-69 Provide a functioning Server object
1 parent 7a3bf33 commit 5f8d990

22 files changed

+223
-213
lines changed

php_phongo.c

Lines changed: 88 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@
3939
#include <php.h>
4040
#include <php_ini.h>
4141
#include <ext/standard/info.h>
42-
#include "Zend/zend_hash.h"
43-
#include "Zend/zend_interfaces.h"
44-
#include "Zend/zend_exceptions.h"
45-
#include "ext/spl/spl_iterators.h"
46-
#include "ext/spl/spl_exceptions.h"
42+
#include <ext/standard/file.h>
43+
#include <Zend/zend_hash.h>
44+
#include <Zend/zend_interfaces.h>
45+
#include <Zend/zend_exceptions.h>
46+
#include <ext/spl/spl_iterators.h>
47+
#include <ext/spl/spl_exceptions.h>
4748
/* For formating timestamp in the log */
4849
#include <ext/date/php_date.h>
4950
/* Stream wrapper */
@@ -243,7 +244,7 @@ php_phongo_stream_logger phongo_stream_logger = {
243244
/* }}} */
244245

245246
/* {{{ Init objects */
246-
void phongo_result_init(zval *return_value, mongoc_cursor_t *cursor, const bson_t *bson, int server_hint, zend_bool is_command_cursor TSRMLS_DC) /* {{{ */
247+
void phongo_result_init(zval *return_value, mongoc_cursor_t *cursor, const bson_t *bson, mongoc_client_t *client, int server_id, zend_bool is_command_cursor TSRMLS_DC) /* {{{ */
247248
{
248249
php_phongo_result_t *result;
249250

@@ -252,23 +253,24 @@ void phongo_result_init(zval *return_value, mongoc_cursor_t *cursor, const bson_
252253
result = (php_phongo_result_t *)zend_object_store_get_object(return_value TSRMLS_CC);
253254
if (cursor) {
254255
result->cursor = cursor;
255-
result->hint = mongoc_cursor_get_hint(cursor);
256+
result->server_id = mongoc_cursor_get_hint(cursor);
256257
} else {
257-
result->hint = server_hint;
258+
result->server_id = server_id;
258259
}
260+
result->client = client;
259261
result->is_command_cursor = is_command_cursor;
260262
result->firstBatch = bson ? bson_copy(bson) : NULL;
261263
} /* }}} */
262264

263-
void phongo_server_init(zval *return_value, int hint, mongoc_host_list_t *host TSRMLS_DC) /* {{{ */
265+
void phongo_server_init(zval *return_value, mongoc_client_t *client, int server_id TSRMLS_DC) /* {{{ */
264266
{
265267
php_phongo_server_t *server;
266268

267269
object_init_ex(return_value, php_phongo_server_ce);
268270

269271
server = (php_phongo_server_t *)zend_object_store_get_object(return_value TSRMLS_CC);
270-
server->hint = hint;
271-
server->host = host;
272+
server->client = client;
273+
server->server_id = server_id;
272274
}
273275
/* }}} */
274276

@@ -346,14 +348,15 @@ zend_bool phongo_writeerror_init(zval *return_value, bson_t *bson TSRMLS_DC) /*
346348
return true;
347349
} /* }}} */
348350

349-
php_phongo_writeresult_t *phongo_writeresult_init(zval *return_value, mongoc_write_result_t *write_result, int server_hint TSRMLS_DC) /* {{{ */
351+
php_phongo_writeresult_t *phongo_writeresult_init(zval *return_value, mongoc_write_result_t *write_result, mongoc_client_t *client, int server_id TSRMLS_DC) /* {{{ */
350352
{
351353
php_phongo_writeresult_t *writeresult;
352354

353355
object_init_ex(return_value, php_phongo_writeresult_ce);
354356

355357
writeresult = (php_phongo_writeresult_t *)zend_object_store_get_object(return_value TSRMLS_CC);
356-
writeresult->hint = server_hint;
358+
writeresult->client = client;
359+
writeresult->server_id = server_id;
357360

358361
/* Copy write_results or else it'll get destroyed with the bulk destruction */
359362
#define SCP(field) writeresult->write_result.field = write_result->field
@@ -422,22 +425,22 @@ void phongo_unwrap_exception(bool retval, zval *return_value TSRMLS_DC)
422425
}
423426
}
424427

425-
int phongo_execute_single_insert(mongoc_client_t *client, const char *namespace, const bson_t *doc, const mongoc_write_concern_t *write_concern, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
428+
int phongo_execute_single_insert(mongoc_client_t *client, const char *namespace, const bson_t *doc, const mongoc_write_concern_t *write_concern, int server_id, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
426429
{
427430
bool retval = false;
428431
mongoc_bulk_operation_t *bulk;
429432

430433
bulk = phongo_bulkwrite_init(true);
431434
mongoc_bulk_operation_insert(bulk, doc);
432435

433-
retval = phongo_execute_write(client, namespace, bulk, write_concern, 0, return_value, return_value_used TSRMLS_CC);
436+
retval = phongo_execute_write(client, namespace, bulk, write_concern, server_id, return_value, return_value_used TSRMLS_CC);
434437
mongoc_bulk_operation_destroy(bulk);
435438

436439
phongo_unwrap_exception(retval, return_value TSRMLS_CC);
437440
return retval;
438441
} /* }}} */
439442

440-
int phongo_execute_single_update(mongoc_client_t *client, const char *namespace, const bson_t *query, const bson_t *update, const mongoc_write_concern_t *write_concern, mongoc_update_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
443+
int phongo_execute_single_update(mongoc_client_t *client, const char *namespace, const bson_t *query, const bson_t *update, const mongoc_write_concern_t *write_concern, int server_id, mongoc_update_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
441444
{
442445
bool retval = false;
443446
mongoc_bulk_operation_t *bulk;
@@ -448,14 +451,14 @@ int phongo_execute_single_update(mongoc_client_t *client, const char *namespace,
448451
} else {
449452
mongoc_bulk_operation_update(bulk, query, update, !!(flags & MONGOC_UPDATE_UPSERT));
450453
}
451-
retval = phongo_execute_write(client, namespace, bulk, write_concern, 0, return_value, return_value_used TSRMLS_CC);
454+
retval = phongo_execute_write(client, namespace, bulk, write_concern, server_id, return_value, return_value_used TSRMLS_CC);
452455
mongoc_bulk_operation_destroy(bulk);
453456

454457
phongo_unwrap_exception(retval, return_value TSRMLS_CC);
455458
return retval;
456459
} /* }}} */
457460

458-
int phongo_execute_single_delete(mongoc_client_t *client, const char *namespace, const bson_t *query, const mongoc_write_concern_t *write_concern, mongoc_delete_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
461+
int phongo_execute_single_delete(mongoc_client_t *client, const char *namespace, const bson_t *query, const mongoc_write_concern_t *write_concern, int server_id, mongoc_delete_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
459462
{
460463
bool retval = false;
461464
mongoc_bulk_operation_t *bulk;
@@ -467,19 +470,19 @@ int phongo_execute_single_delete(mongoc_client_t *client, const char *namespace,
467470
mongoc_bulk_operation_remove(bulk, query);
468471
}
469472

470-
retval = phongo_execute_write(client, namespace, bulk, write_concern, 0, return_value, return_value_used TSRMLS_CC);
473+
retval = phongo_execute_write(client, namespace, bulk, write_concern, server_id, return_value, return_value_used TSRMLS_CC);
471474
mongoc_bulk_operation_destroy(bulk);
472475

473476
phongo_unwrap_exception(retval, return_value TSRMLS_CC);
474477
return retval;
475478
} /* }}} */
476479

477-
bool phongo_execute_write(mongoc_client_t *client, const char *namespace, mongoc_bulk_operation_t *bulk, const mongoc_write_concern_t *write_concern, int server_hint, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
480+
bool phongo_execute_write(mongoc_client_t *client, const char *namespace, mongoc_bulk_operation_t *bulk, const mongoc_write_concern_t *write_concern, int server_id, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
478481
{
479482
bson_error_t error;
480483
char *dbname;
481484
char *collname;
482-
int hint;
485+
int success;
483486
php_phongo_writeresult_t *writeresult;
484487

485488
if (!phongo_split_namespace(namespace, &dbname, &collname)) {
@@ -502,14 +505,14 @@ bool phongo_execute_write(mongoc_client_t *client, const char *namespace, mongoc
502505
efree(dbname);
503506
efree(collname);
504507

505-
if (server_hint) {
506-
mongoc_bulk_operation_set_hint(bulk, server_hint);
508+
if (server_id > 0) {
509+
mongoc_bulk_operation_set_hint(bulk, server_id);
507510
}
508511

509-
hint = mongoc_bulk_operation_execute(bulk, NULL, &error);
512+
success = mongoc_bulk_operation_execute(bulk, NULL, &error);
510513

511514
/* Write succeeded and the user doesn't care for the results */
512-
if (hint && !return_value_used) {
515+
if (success && !return_value_used) {
513516
return true;
514517
}
515518

@@ -518,11 +521,11 @@ bool phongo_execute_write(mongoc_client_t *client, const char *namespace, mongoc
518521
return false;
519522
}
520523

521-
writeresult = phongo_writeresult_init(return_value, &bulk->result, server_hint TSRMLS_CC);
524+
writeresult = phongo_writeresult_init(return_value, &bulk->result, client, bulk->hint TSRMLS_CC);
522525
writeresult->write_concern = mongoc_write_concern_copy(write_concern);
523526

524527
/* The Write failed */
525-
if (!hint) {
528+
if (!success) {
526529
/* The Command itself failed */
527530
if (
528531
bson_empty0(&writeresult->write_result.writeErrors)
@@ -541,7 +544,7 @@ bool phongo_execute_write(mongoc_client_t *client, const char *namespace, mongoc
541544
return true;
542545
} /* }}} */
543546

544-
int phongo_execute_query(mongoc_client_t *client, const char *namespace, const php_phongo_query_t *query, const mongoc_read_prefs_t *read_preference, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
547+
int phongo_execute_query(mongoc_client_t *client, const char *namespace, const php_phongo_query_t *query, const mongoc_read_prefs_t *read_preference, int server_id, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
545548
{
546549
const bson_t *doc = NULL;
547550
mongoc_cursor_t *cursor;
@@ -566,6 +569,7 @@ int phongo_execute_query(mongoc_client_t *client, const char *namespace, const p
566569
return false;
567570
}
568571

572+
cursor->hint = server_id;
569573
if (!mongoc_cursor_next(cursor, &doc)) {
570574
bson_error_t error;
571575

@@ -583,11 +587,11 @@ int phongo_execute_query(mongoc_client_t *client, const char *namespace, const p
583587
return true;
584588
}
585589

586-
phongo_result_init(return_value, cursor, doc, 0, 0 TSRMLS_CC);
590+
phongo_result_init(return_value, cursor, doc, client, server_id, 0 TSRMLS_CC);
587591
return true;
588592
} /* }}} */
589593

590-
int phongo_execute_command(mongoc_client_t *client, const char *db, const bson_t *command, const mongoc_read_prefs_t *read_preference, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
594+
int phongo_execute_command(mongoc_client_t *client, const char *db, const bson_t *command, const mongoc_read_prefs_t *read_preference, int server_id, zval *return_value, int return_value_used TSRMLS_DC) /* {{{ */
591595
{
592596
mongoc_cursor_t *cursor;
593597
const bson_t *doc;
@@ -596,6 +600,7 @@ int phongo_execute_command(mongoc_client_t *client, const char *db, const bson_t
596600

597601

598602
cursor = mongoc_client_command(client, db, MONGOC_QUERY_NONE, 0, 1, 0, command, NULL, read_preference);
603+
cursor->hint = server_id;
599604

600605
if (!mongoc_cursor_next(cursor, &doc)) {
601606
bson_error_t error;
@@ -633,15 +638,15 @@ int phongo_execute_command(mongoc_client_t *client, const char *db, const bson_t
633638
_mongoc_cursor_cursorid_init(cursor);
634639
cursor->limit = 0;
635640
cursor->is_command = false;
636-
phongo_result_init(return_value, cursor, &first_batch, mongoc_cursor_get_hint(cursor), 1 TSRMLS_CC);
641+
phongo_result_init(return_value, cursor, &first_batch, client, mongoc_cursor_get_hint(cursor), 1 TSRMLS_CC);
637642
return true;
638643
}
639644
}
640645
}
641646
}
642647
}
643648

644-
phongo_result_init(return_value, cursor, doc, mongoc_cursor_get_hint(cursor), 0 TSRMLS_CC);
649+
phongo_result_init(return_value, cursor, doc, client, mongoc_cursor_get_hint(cursor), 0 TSRMLS_CC);
645650
return true;
646651
} /* }}} */
647652

@@ -762,8 +767,7 @@ mongoc_stream_t* phongo_stream_get_base_stream(mongoc_stream_t *stream) /* {{{ *
762767
return (mongoc_stream_t *) stream;
763768
} /* }}} */
764769

765-
ssize_t
766-
phongo_stream_poll (mongoc_stream_poll_t *streams, size_t nstreams, int32_t timeout)
770+
ssize_t phongo_stream_poll (mongoc_stream_poll_t *streams, size_t nstreams, int32_t timeout) /* {{{ */
767771
{
768772
php_pollfd *fds = NULL;
769773
size_t i;
@@ -791,7 +795,7 @@ phongo_stream_poll (mongoc_stream_poll_t *streams, size_t nstreams, int32_t time
791795
efree(fds);
792796

793797
return rval;
794-
}
798+
} /* }}} */
795799

796800
mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_host_list_t *host, void *user_data, bson_error_t *error) /* {{{ */
797801
{
@@ -1188,12 +1192,59 @@ void php_phongo_result_to_zval(zval *retval, php_phongo_result_t *result) /* {{{
11881192
} else {
11891193
add_assoc_null_ex(retval, ZEND_STRS("firstBatch"));
11901194
}
1191-
add_assoc_long_ex(retval, ZEND_STRS("hint"), result->hint);
1195+
add_assoc_long_ex(retval, ZEND_STRS("server_id"), result->server_id);
11921196
add_assoc_bool_ex(retval, ZEND_STRS("is_command_cursor"), result->is_command_cursor);
11931197

11941198
} /* }}} */
11951199

11961200

1201+
mongoc_client_t *php_phongo_make_mongo_client(const char *uri, zval *driverOptions) /* {{{ */
1202+
{
1203+
php_stream_context *ctx = NULL;
1204+
mongoc_client_t *client = mongoc_client_new(uri);
1205+
1206+
if (driverOptions) {
1207+
zval **tmp;
1208+
1209+
if (zend_hash_find(Z_ARRVAL_P(driverOptions), "context", strlen("context") + 1, (void**)&tmp) == SUCCESS) {
1210+
ctx = php_stream_context_from_zval(*tmp, PHP_FILE_NO_DEFAULT_CONTEXT);
1211+
} else if (FG(default_context)) {
1212+
ctx = FG(default_context);
1213+
}
1214+
1215+
if (ctx) {
1216+
const mongoc_uri_t *muri = mongoc_client_get_uri(client);
1217+
const char *mech = mongoc_uri_get_auth_mechanism(muri);
1218+
1219+
/* Check if we are doing X509 auth, in which case extract the username (subject) from the cert if no username is provided */
1220+
if (mech && !strcasecmp(mech, "MONGODB-X509") && !mongoc_uri_get_username(muri)) {
1221+
zval **pem;
1222+
1223+
if (SUCCESS == php_stream_context_get_option(ctx, "ssl", "local_cert", &pem)) {
1224+
char filename[MAXPATHLEN];
1225+
1226+
convert_to_string_ex(pem);
1227+
if (VCWD_REALPATH(Z_STRVAL_PP(pem), filename)) {
1228+
mongoc_ssl_opt_t ssl_options;
1229+
1230+
ssl_options.pem_file = filename;
1231+
mongoc_client_set_ssl_opts(client, &ssl_options);
1232+
}
1233+
}
1234+
}
1235+
}
1236+
1237+
if (zend_hash_find(Z_ARRVAL_P(driverOptions), "debug", strlen("debug") + 1, (void**)&tmp) == SUCCESS) {
1238+
convert_to_string(*tmp);
1239+
1240+
zend_alter_ini_entry_ex((char *)"phongo.debug_log", sizeof("phongo.debug_log") , Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
1241+
}
1242+
}
1243+
1244+
mongoc_client_set_stream_initiator(client, phongo_stream_initiator, ctx);
1245+
1246+
return client;
1247+
} /* }}} */
11971248

11981249
void php_phongo_new_utcdatetime_from_epoch(zval *object, int64_t msec_since_epoch TSRMLS_DC) /* {{{ */
11991250
{
@@ -1204,6 +1255,7 @@ void php_phongo_new_utcdatetime_from_epoch(zval *object, int64_t msec_since_epoc
12041255
intern = (php_phongo_utcdatetime_t *)zend_object_store_get_object(object TSRMLS_CC);
12051256
intern->milliseconds = msec_since_epoch;
12061257
} /* }}} */
1258+
12071259
void php_phongo_new_datetime_from_utcdatetime(zval *object, int64_t milliseconds TSRMLS_DC) /* {{{ */
12081260
{
12091261
php_date_obj *datetime_obj;

php_phongo.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ PHONGO_API zval* phongo_throw_exception(php_phongo_error_domain_t domain TSRMLS_
102102

103103
PHONGO_API zend_object_handlers *phongo_get_std_object_handlers(void);
104104

105-
void phongo_server_init (zval *return_value, int server_hint, mongoc_host_list_t *host TSRMLS_DC);
105+
void phongo_server_init (zval *return_value, mongoc_client_t *client, int server_id TSRMLS_DC);
106106
bool phongo_query_init (php_phongo_query_t *query, zval *filter, zval *options TSRMLS_DC);
107107
mongoc_bulk_operation_t* phongo_bulkwrite_init (zend_bool ordered);
108-
bool phongo_execute_write (mongoc_client_t *client, const char *namespace, mongoc_bulk_operation_t *bulk, const mongoc_write_concern_t *write_concern, int server_hint, zval *return_value, int return_value_used TSRMLS_DC);
109-
int phongo_execute_command (mongoc_client_t *client, const char *db, const bson_t *command, const mongoc_read_prefs_t *read_preference, zval *return_value, int return_value_used TSRMLS_DC);
110-
int phongo_execute_query (mongoc_client_t *client, const char *namespace, const php_phongo_query_t *query, const mongoc_read_prefs_t *read_preference, zval *return_value, int return_value_used TSRMLS_DC);
111-
int phongo_execute_single_insert(mongoc_client_t *client, const char *namespace, const bson_t *doc, const mongoc_write_concern_t *write_concern, zval *return_value, int return_value_used TSRMLS_DC);
112-
int phongo_execute_single_update(mongoc_client_t *client, const char *namespace, const bson_t *query, const bson_t *update, const mongoc_write_concern_t *write_concern, mongoc_update_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC);
113-
int phongo_execute_single_delete(mongoc_client_t *client, const char *namespace, const bson_t *query, const mongoc_write_concern_t *write_concern, mongoc_delete_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC);
108+
bool phongo_execute_write (mongoc_client_t *client, const char *namespace, mongoc_bulk_operation_t *bulk, const mongoc_write_concern_t *write_concern, int server_id, zval *return_value, int return_value_used TSRMLS_DC);
109+
int phongo_execute_command (mongoc_client_t *client, const char *db, const bson_t *command, const mongoc_read_prefs_t *read_preference, int server_id, zval *return_value, int return_value_used TSRMLS_DC);
110+
int phongo_execute_query (mongoc_client_t *client, const char *namespace, const php_phongo_query_t *query, const mongoc_read_prefs_t *read_preference, int server_id, zval *return_value, int return_value_used TSRMLS_DC);
111+
int phongo_execute_single_insert(mongoc_client_t *client, const char *namespace, const bson_t *doc, const mongoc_write_concern_t *write_concern, int server_id, zval *return_value, int return_value_used TSRMLS_DC);
112+
int phongo_execute_single_update(mongoc_client_t *client, const char *namespace, const bson_t *query, const bson_t *update, const mongoc_write_concern_t *write_concern, int server_id, mongoc_update_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC);
113+
int phongo_execute_single_delete(mongoc_client_t *client, const char *namespace, const bson_t *query, const mongoc_write_concern_t *write_concern, int server_id, mongoc_delete_flags_t flags, zval *return_value, int return_value_used TSRMLS_DC);
114114

115115
mongoc_stream_t* phongo_stream_initiator (const mongoc_uri_t *uri, const mongoc_host_list_t *host, void *user_data, bson_error_t *error);
116116
zend_object_iterator* phongo_result_get_iterator (zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
@@ -123,6 +123,7 @@ void php_phongo_read_preference_to_zval(zval *retval, const mongoc_read_prefs_t
123123
void php_phongo_write_concern_to_zval(zval *retval, const mongoc_write_concern_t *write_concern);
124124
void php_phongo_result_to_zval(zval *retval, php_phongo_result_t *result);
125125

126+
mongoc_client_t *php_phongo_make_mongo_client(const char *uri, zval *driverOptions);
126127
void php_phongo_objectid_new_from_oid(zval *object, const bson_oid_t *oid TSRMLS_DC);
127128
void php_phongo_cursor_new_from_result(zval *object, php_phongo_result_t *result TSRMLS_DC);
128129
void php_phongo_cursor_id_new_from_id(zval *object, int64_t cursorid TSRMLS_DC);

php_phongo_classes.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ typedef struct {
5050
zend_object std;
5151
mongoc_cursor_t *cursor;
5252
bson_t *firstBatch;
53-
int hint;
53+
mongoc_client_t *client;
54+
int server_id;
5455
zend_bool is_command_cursor;
5556
zend_class_entry *ce_get_iterator;
5657
php_phongo_bson_state visitor_data;
@@ -95,9 +96,8 @@ typedef struct {
9596

9697
typedef struct {
9798
zend_object std;
98-
mongoc_host_list_t *host;
9999
mongoc_client_t *client;
100-
int hint;
100+
int server_id;
101101
} php_phongo_server_t;
102102

103103
typedef struct {
@@ -127,9 +127,10 @@ typedef struct {
127127

128128
typedef struct {
129129
zend_object std;
130-
mongoc_write_result_t write_result;
131-
int hint;
132130
mongoc_write_concern_t *write_concern;
131+
mongoc_write_result_t write_result;
132+
mongoc_client_t *client;
133+
int server_id;
133134
} php_phongo_writeresult_t;
134135

135136
typedef struct {

src/MongoDB/BulkWrite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ HashTable *php_phongo_bulkwrite_get_debug_info(zval *object, int *is_temp TSRMLS
313313

314314
add_assoc_bool_ex(&retval, ZEND_STRS("ordered"), intern->bulk->ordered);
315315
add_assoc_bool_ex(&retval, ZEND_STRS("executed"), intern->bulk->executed);
316-
add_assoc_long_ex(&retval, ZEND_STRS("hint"), intern->bulk->hint);
316+
add_assoc_long_ex(&retval, ZEND_STRS("server_id"), intern->bulk->hint);
317317

318318
if (intern->bulk->write_concern) {
319319
zval *write_concern = NULL;

0 commit comments

Comments
 (0)