@@ -589,7 +589,7 @@ request_from_query (request_t *request,
589
589
int32_t len ;
590
590
bson_t * query ;
591
591
bson_iter_t iter ;
592
- bson_string_t * query_as_str = bson_string_new ("" );
592
+ bson_string_t * query_as_str = bson_string_new ("OP_QUERY " );
593
593
char * str ;
594
594
595
595
memcpy (& len , rpc -> query .query , 4 );
@@ -651,7 +651,7 @@ request_from_insert (request_t *request,
651
651
{
652
652
uint8_t * pos = (uint8_t * )request -> request_rpc .insert .documents -> iov_base ;
653
653
uint8_t * end = request -> data + request -> data_len ;
654
- bson_string_t * insert_as_str = bson_string_new ("" );
654
+ bson_string_t * insert_as_str = bson_string_new ("OP_INSERT " );
655
655
bson_t * doc ;
656
656
size_t n_documents ;
657
657
size_t i ;
@@ -667,7 +667,7 @@ request_from_insert (request_t *request,
667
667
668
668
n_documents = request -> docs .len ;
669
669
670
- bson_string_append_printf (insert_as_str , "%d " , (int )n_documents );
670
+ bson_string_append_printf (insert_as_str , " %d " , (int )n_documents );
671
671
672
672
for (i = 0 ; i < n_documents ; i ++ ) {
673
673
str = bson_as_json (request_get_doc (request , (int ) i ), NULL );
@@ -736,7 +736,7 @@ request_from_update (request_t *request,
736
736
{
737
737
int32_t len ;
738
738
bson_t * doc ;
739
- bson_string_t * update_as_str = bson_string_new ("" );
739
+ bson_string_t * update_as_str = bson_string_new ("OP_UPDATE " );
740
740
char * str ;
741
741
742
742
memcpy (& len , rpc -> update .selector , 4 );
@@ -788,7 +788,7 @@ request_from_delete (request_t *request,
788
788
{
789
789
int32_t len ;
790
790
bson_t * doc ;
791
- bson_string_t * delete_as_str = bson_string_new ("" );
791
+ bson_string_t * delete_as_str = bson_string_new ("OP_DELETE " );
792
792
char * str ;
793
793
794
794
memcpy (& len , rpc -> delete_ .selector , 4 );
0 commit comments