Lines Matching refs:result

38 MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest)(MYSQLND_RES * const result TSRMLS_DC)  in MYSQLND_METHOD()
41 zval **data_cursor = result->stored_data? result->stored_data->data:NULL; in MYSQLND_METHOD()
42 zval **data_begin = result->stored_data? result->stored_data->data:NULL; in MYSQLND_METHOD()
43 unsigned int field_count = result->meta? result->meta->field_count : 0; in MYSQLND_METHOD()
44 uint64_t row_count = result->stored_data? result->stored_data->row_count:0; in MYSQLND_METHOD()
48 if (!data_cursor || row_count == result->stored_data->initialized_rows) { in MYSQLND_METHOD()
53 enum_func_status rc = result->m.row_decoder( in MYSQLND_METHOD()
54 result->stored_data->row_buffers[(data_cursor - data_begin) / field_count], in MYSQLND_METHOD()
56 result->meta->field_count, in MYSQLND_METHOD()
57 result->meta->fields, in MYSQLND_METHOD()
58 result->conn->options->numeric_and_datetime_as_unicode, in MYSQLND_METHOD()
59 result->conn->options->int_and_float_native, in MYSQLND_METHOD()
60 result->conn->stats TSRMLS_CC); in MYSQLND_METHOD()
65 result->stored_data->initialized_rows++; in MYSQLND_METHOD()
66 for (i = 0; i < result->field_count; i++) { in MYSQLND_METHOD()
74 if (result->meta->fields[i].max_length < len) { in MYSQLND_METHOD()
75 result->meta->fields[i].max_length = len; in MYSQLND_METHOD()
143 MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
145 MYSQLND_RES_UNBUFFERED *unbuf = result->unbuf; in MYSQLND_METHOD()
156 MYSQLND_STATS *global_stats = result->conn? result->conn->stats:NULL; in MYSQLND_METHOD()
158 for (i = 0; i < result->field_count; i++) { in MYSQLND_METHOD()
159 … mysqlnd_rset_zval_ptr_dtor(&(unbuf->last_row_data[i]), result->type, &copy_ctor_called TSRMLS_CC); in MYSQLND_METHOD()
170 result->field_count - ctor_called_count); in MYSQLND_METHOD()
189 MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
191 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD()
192 unsigned int field_count = result->field_count; in MYSQLND_METHOD()
213 mysqlnd_rset_zval_ptr_dtor(&(current_row[col]), result->type, &copy_ctor_called TSRMLS_CC); in MYSQLND_METHOD()
246 MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
249 DBG_INF_FMT("%s", result->unbuf? "unbuffered":(result->stored_data? "buffered":"unknown")); in MYSQLND_METHOD()
251 if (result->unbuf) { in MYSQLND_METHOD()
252 result->m.unbuffered_free_last_data(result TSRMLS_CC); in MYSQLND_METHOD()
253 mnd_efree(result->unbuf); in MYSQLND_METHOD()
254 result->unbuf = NULL; in MYSQLND_METHOD()
255 } else if (result->stored_data) { in MYSQLND_METHOD()
256 result->m.free_buffered_data(result TSRMLS_CC); in MYSQLND_METHOD()
257 result->stored_data = NULL; in MYSQLND_METHOD()
260 if (result->lengths) { in MYSQLND_METHOD()
261 mnd_efree(result->lengths); in MYSQLND_METHOD()
262 result->lengths = NULL; in MYSQLND_METHOD()
265 if (result->row_packet) { in MYSQLND_METHOD()
266 PACKET_FREE(result->row_packet); in MYSQLND_METHOD()
267 result->row_packet = NULL; in MYSQLND_METHOD()
270 if (result->result_set_memory_pool) { in MYSQLND_METHOD()
271 mysqlnd_mempool_destroy(result->result_set_memory_pool TSRMLS_CC); in MYSQLND_METHOD()
272 result->result_set_memory_pool = NULL; in MYSQLND_METHOD()
282 void mysqlnd_internal_free_result_contents(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_internal_free_result_contents()
286 result->m.free_result_buffers(result TSRMLS_CC); in mysqlnd_internal_free_result_contents()
288 if (result->meta) { in mysqlnd_internal_free_result_contents()
289 result->meta->m->free_metadata(result->meta TSRMLS_CC); in mysqlnd_internal_free_result_contents()
290 result->meta = NULL; in mysqlnd_internal_free_result_contents()
300 void mysqlnd_internal_free_result(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_internal_free_result()
303 result->m.free_result_contents(result TSRMLS_CC); in mysqlnd_internal_free_result()
305 if (result->conn) { in mysqlnd_internal_free_result()
306 result->conn->m->free_reference(result->conn TSRMLS_CC); in mysqlnd_internal_free_result()
307 result->conn = NULL; in mysqlnd_internal_free_result()
310 mnd_pefree(result, result->persistent); in mysqlnd_internal_free_result()
319 MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn TS… in MYSQLND_METHOD()
329 if (result->meta) { in MYSQLND_METHOD()
330 result->meta->m->free_metadata(result->meta TSRMLS_CC); in MYSQLND_METHOD()
331 result->meta = NULL; in MYSQLND_METHOD()
334 result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC); in MYSQLND_METHOD()
335 if (!result->meta) { in MYSQLND_METHOD()
343 if (FAIL == result->meta->m->read_metadata(result->meta, conn TSRMLS_CC)) { in MYSQLND_METHOD()
344 result->m.free_result_contents(result TSRMLS_CC); in MYSQLND_METHOD()
348 result->field_count = result->meta->field_count; in MYSQLND_METHOD()
448 MYSQLND_RES * result; in mysqlnd_query_read_result_set_header() local
464result = conn->current_result = conn->m->result_init(rset_header->field_count, conn->persistent TS… in mysqlnd_query_read_result_set_header()
466 if (!stmt->result) { in mysqlnd_query_read_result_set_header()
473result = stmt->result = conn->m->result_init(rset_header->field_count, stmt->persistent TSRMLS_CC); in mysqlnd_query_read_result_set_header()
488 result = stmt->result; in mysqlnd_query_read_result_set_header()
490 if (!result) { in mysqlnd_query_read_result_set_header()
496 if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) { in mysqlnd_query_read_result_set_header()
515 result->m.free_result_contents(result TSRMLS_CC); in mysqlnd_query_read_result_set_header()
516 mnd_efree(result); in mysqlnd_query_read_result_set_header()
520 stmt->result = NULL; in mysqlnd_query_read_result_set_header()
574 mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) in mysqlnd_fetch_lengths_buffered()
578 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_lengths_buffered()
588 ((set->data_cursor - set->data) > (set->row_count * result->meta->field_count) )) in mysqlnd_fetch_lengths_buffered()
593 previous_row = set->data_cursor - result->meta->field_count; in mysqlnd_fetch_lengths_buffered()
594 for (i = 0; i < result->meta->field_count; i++) { in mysqlnd_fetch_lengths_buffered()
595 result->lengths[i] = (Z_TYPE_P(previous_row[i]) == IS_NULL)? 0:Z_STRLEN_P(previous_row[i]); in mysqlnd_fetch_lengths_buffered()
598 return result->lengths; in mysqlnd_fetch_lengths_buffered()
605 mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) in mysqlnd_fetch_lengths_unbuffered()
608 …return (!result->unbuf || result->unbuf->last_row_data || result->unbuf->eof_reached)? result->len… in mysqlnd_fetch_lengths_unbuffered()
614 PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC) in _mysqlnd_fetch_lengths()
616 return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL; in _mysqlnd_fetch_lengths()
623 mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_fetch_row_unbuffered_c()
628 field_count = result->field_count; in mysqlnd_fetch_row_unbuffered_c()
629 MYSQLND_PACKET_ROW *row_packet = result->row_packet; in mysqlnd_fetch_row_unbuffered_c()
630 unsigned long *lengths = result->lengths; in mysqlnd_fetch_row_unbuffered_c()
634 if (result->unbuf->eof_reached) { in mysqlnd_fetch_row_unbuffered_c()
638 if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { in mysqlnd_fetch_row_unbuffered_c()
639 SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, in mysqlnd_fetch_row_unbuffered_c()
654 if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { in mysqlnd_fetch_row_unbuffered_c()
655 result->unbuf->row_count++; in mysqlnd_fetch_row_unbuffered_c()
657 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
659 result->unbuf->last_row_data = row_packet->fields; in mysqlnd_fetch_row_unbuffered_c()
660 result->unbuf->last_row_buffer = row_packet->row_buffer; in mysqlnd_fetch_row_unbuffered_c()
664 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in mysqlnd_fetch_row_unbuffered_c()
667 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_unbuffered_c()
668 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_unbuffered_c()
670 enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, in mysqlnd_fetch_row_unbuffered_c()
671 result->unbuf->last_row_data, in mysqlnd_fetch_row_unbuffered_c()
674 result->conn->options->numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_unbuffered_c()
675 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_unbuffered_c()
676 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
681 retrow = mnd_malloc(result->field_count * sizeof(char *)); in mysqlnd_fetch_row_unbuffered_c()
684 zval *data = result->unbuf->last_row_data[i]; in mysqlnd_fetch_row_unbuffered_c()
705 SET_OOM_ERROR(*result->conn->error_info); in mysqlnd_fetch_row_unbuffered_c()
710 COPY_CLIENT_ERROR(*result->conn->error_info, row_packet->error_info); in mysqlnd_fetch_row_unbuffered_c()
713 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered_c()
714 result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ in mysqlnd_fetch_row_unbuffered_c()
718 result->unbuf->eof_reached = TRUE; in mysqlnd_fetch_row_unbuffered_c()
719 memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status)); in mysqlnd_fetch_row_unbuffered_c()
720 result->conn->upsert_status->warning_count = row_packet->warning_count; in mysqlnd_fetch_row_unbuffered_c()
721 result->conn->upsert_status->server_status = row_packet->server_status; in mysqlnd_fetch_row_unbuffered_c()
726 if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_fetch_row_unbuffered_c()
727 CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING); in mysqlnd_fetch_row_unbuffered_c()
729 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered_c()
731 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
741 mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetc… in mysqlnd_fetch_row_unbuffered() argument
745 MYSQLND_PACKET_ROW *row_packet = result->row_packet; in mysqlnd_fetch_row_unbuffered()
750 if (result->unbuf->eof_reached) { in mysqlnd_fetch_row_unbuffered()
754 if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { in mysqlnd_fetch_row_unbuffered()
755 …SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out… in mysqlnd_fetch_row_unbuffered()
769 if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { in mysqlnd_fetch_row_unbuffered()
770 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
772 result->unbuf->last_row_data = row_packet->fields; in mysqlnd_fetch_row_unbuffered()
773 result->unbuf->last_row_buffer = row_packet->row_buffer; in mysqlnd_fetch_row_unbuffered()
777 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in mysqlnd_fetch_row_unbuffered()
781 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_unbuffered()
782 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_unbuffered()
783 unsigned int i, field_count = result->field_count; in mysqlnd_fetch_row_unbuffered()
784 unsigned long *lengths = result->lengths; in mysqlnd_fetch_row_unbuffered()
786 enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, in mysqlnd_fetch_row_unbuffered()
787 result->unbuf->last_row_data, in mysqlnd_fetch_row_unbuffered()
790 result->conn->options->numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_unbuffered()
791 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_unbuffered()
792 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
797 zval *data = result->unbuf->last_row_data[i]; in mysqlnd_fetch_row_unbuffered()
843 result->unbuf->row_count++; in mysqlnd_fetch_row_unbuffered()
846 COPY_CLIENT_ERROR(*result->conn->error_info, row_packet->error_info); in mysqlnd_fetch_row_unbuffered()
849 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered()
850 result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ in mysqlnd_fetch_row_unbuffered()
854 result->unbuf->eof_reached = TRUE; in mysqlnd_fetch_row_unbuffered()
855 memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status)); in mysqlnd_fetch_row_unbuffered()
856 result->conn->upsert_status->warning_count = row_packet->warning_count; in mysqlnd_fetch_row_unbuffered()
857 result->conn->upsert_status->server_status = row_packet->server_status; in mysqlnd_fetch_row_unbuffered()
862 if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_fetch_row_unbuffered()
863 CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING); in mysqlnd_fetch_row_unbuffered()
865 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered()
867 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
878 MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps TSRMLS_DC) in MYSQLND_METHOD()
882 SET_EMPTY_ERROR(*result->conn->error_info); in MYSQLND_METHOD()
885 result->type = MYSQLND_RES_NORMAL; in MYSQLND_METHOD()
886 result->m.fetch_row = result->m.fetch_row_normal_unbuffered; in MYSQLND_METHOD()
887 result->m.fetch_lengths = mysqlnd_fetch_lengths_unbuffered; in MYSQLND_METHOD()
888 result->m.row_decoder = php_mysqlnd_rowp_read_text_protocol; in MYSQLND_METHOD()
889 result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); in MYSQLND_METHOD()
890 if (!result->lengths) { in MYSQLND_METHOD()
894 result->type = MYSQLND_RES_PS_UNBUF; in MYSQLND_METHOD()
895 result->m.fetch_row = NULL; in MYSQLND_METHOD()
897 result->m.fetch_lengths = NULL; /* makes no sense */ in MYSQLND_METHOD()
898 result->m.row_decoder = php_mysqlnd_rowp_read_binary_protocol; in MYSQLND_METHOD()
899 result->lengths = NULL; in MYSQLND_METHOD()
902 result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); in MYSQLND_METHOD()
903 result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); in MYSQLND_METHOD()
904 if (!result->result_set_memory_pool || !result->unbuf) { in MYSQLND_METHOD()
914result->row_packet = result->conn->protocol->m.get_row_packet(result->conn->protocol, FALSE TSRMLS… in MYSQLND_METHOD()
915 if (!result->row_packet) { in MYSQLND_METHOD()
918 result->row_packet->result_set_memory_pool = result->result_set_memory_pool; in MYSQLND_METHOD()
919 result->row_packet->field_count = result->field_count; in MYSQLND_METHOD()
920 result->row_packet->binary_protocol = ps; in MYSQLND_METHOD()
921 result->row_packet->fields_metadata = result->meta->fields; in MYSQLND_METHOD()
922 result->row_packet->bit_fields_count = result->meta->bit_fields_count; in MYSQLND_METHOD()
923 result->row_packet->bit_fields_total_len = result->meta->bit_fields_total_len; in MYSQLND_METHOD()
925 DBG_RETURN(result); in MYSQLND_METHOD()
927 SET_OOM_ERROR(*result->conn->error_info); in MYSQLND_METHOD()
935 mysqlnd_fetch_row_buffered_c(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_fetch_row_buffered_c()
938 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered_c()
944 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered_c()
947 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_buffered_c()
948 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_buffered_c()
952 uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
953 enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], in mysqlnd_fetch_row_buffered_c()
955 result->meta->field_count, in mysqlnd_fetch_row_buffered_c()
956 result->meta->fields, in mysqlnd_fetch_row_buffered_c()
957 result->conn->options->numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_buffered_c()
958 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_buffered_c()
959 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_buffered_c()
964 for (i = 0; i < result->field_count; i++) { in mysqlnd_fetch_row_buffered_c()
979 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
982 ret = mnd_malloc(result->field_count * sizeof(char *)); in mysqlnd_fetch_row_buffered_c()
984 for (i = 0; i < result->field_count; i++, field++, hash_key++) { in mysqlnd_fetch_row_buffered_c()
1007 mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetche… in mysqlnd_fetch_row_buffered() argument
1011 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered()
1018 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered()
1021 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_buffered()
1022 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_buffered()
1025 uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; in mysqlnd_fetch_row_buffered()
1026 enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], in mysqlnd_fetch_row_buffered()
1028 result->meta->field_count, in mysqlnd_fetch_row_buffered()
1029 result->meta->fields, in mysqlnd_fetch_row_buffered()
1030 result->conn->options->numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_buffered()
1031 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_buffered()
1032 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_buffered()
1037 for (i = 0; i < result->field_count; i++) { in mysqlnd_fetch_row_buffered()
1052 for (i = 0; i < result->field_count; i++, field++, hash_key++) { in mysqlnd_fetch_row_buffered()
1089 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered()
1109 …_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, in MYSQLND_METHOD()
1120 result->stored_data = set = mnd_ecalloc(1, sizeof(MYSQLND_RES_BUFFERED)); in MYSQLND_METHOD()
1143 row_packet->result_set_memory_pool = result->result_set_memory_pool; in MYSQLND_METHOD()
1255 MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, in MYSQLND_METHOD()
1264 result->conn = conn->m->get_reference(conn TSRMLS_CC); in MYSQLND_METHOD()
1265 result->type = MYSQLND_RES_NORMAL; in MYSQLND_METHOD()
1266 result->m.fetch_row = result->m.fetch_row_normal_buffered; in MYSQLND_METHOD()
1267 result->m.fetch_lengths = mysqlnd_fetch_lengths_buffered; in MYSQLND_METHOD()
1268 result->m.row_decoder = ps_protocol? php_mysqlnd_rowp_read_binary_protocol: in MYSQLND_METHOD()
1271 result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); in MYSQLND_METHOD()
1272 result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); in MYSQLND_METHOD()
1274 if (!result->result_set_memory_pool || !result->lengths) { in MYSQLND_METHOD()
1281 ret = result->m.store_result_fetch_data(conn, result, result->meta, ps_protocol TSRMLS_CC); in MYSQLND_METHOD()
1283 if (result->stored_data) { in MYSQLND_METHOD()
1284 COPY_CLIENT_ERROR(*conn->error_info, result->stored_data->error_info); in MYSQLND_METHOD()
1291 conn->upsert_status->affected_rows = result->stored_data->row_count; in MYSQLND_METHOD()
1293 DBG_RETURN(result); in MYSQLND_METHOD()
1300 MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1310 if (!result->stored_data && result->unbuf && in MYSQLND_METHOD()
1311 !result->unbuf->eof_reached && result->m.fetch_row) in MYSQLND_METHOD()
1315 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, in MYSQLND_METHOD()
1316 result->type == MYSQLND_RES_NORMAL? STAT_FLUSHED_NORMAL_SETS: in MYSQLND_METHOD()
1319 …while ((PASS == result->m.fetch_row(result, NULL, 0, &fetched_anything TSRMLS_CC)) && fetched_anyt… in MYSQLND_METHOD()
1330 MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, zend_bool implicit TSRMLS_DC) in MYSQLND_METHOD()
1334 result->m.skip_result(result TSRMLS_CC); in MYSQLND_METHOD()
1335 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
1339 result->m.free_result_internal(result TSRMLS_CC); in MYSQLND_METHOD()
1347 MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES * result, uint64_t row TSRMLS_DC) in MYSQLND_METHOD()
1352 if (!result->stored_data) { in MYSQLND_METHOD()
1357 if (row >= result->stored_data->row_count) { in MYSQLND_METHOD()
1358 result->stored_data->data_cursor = NULL; in MYSQLND_METHOD()
1360 result->stored_data->data_cursor = result->stored_data->data + row * result->meta->field_count; in MYSQLND_METHOD()
1370 MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1373 …return result->stored_data? result->stored_data->row_count:(result->unbuf && result->unbuf->eof_re… in MYSQLND_METHOD()
1380 MYSQLND_METHOD(mysqlnd_res, num_fields)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1382 return result->field_count; in MYSQLND_METHOD()
1389 MYSQLND_METHOD(mysqlnd_res, fetch_field)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1393 if (result->meta) { in MYSQLND_METHOD()
1404 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1407 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1411 DBG_RETURN(result->meta->m->fetch_field(result->meta TSRMLS_CC)); in MYSQLND_METHOD()
1421 MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fi… in MYSQLND_METHOD()
1425 if (result->meta) { in MYSQLND_METHOD()
1436 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1439 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1443 DBG_RETURN(result->meta->m->fetch_field_direct(result->meta, fieldnr TSRMLS_CC)); in MYSQLND_METHOD()
1454 MYSQLND_METHOD(mysqlnd_res, fetch_fields)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1458 if (result->meta) { in MYSQLND_METHOD()
1459 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1461 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1465 DBG_RETURN(result->meta->m->fetch_fields(result->meta TSRMLS_CC)); in MYSQLND_METHOD()
1476 MYSQLND_METHOD(mysqlnd_res, field_seek)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offs… in MYSQLND_METHOD()
1479 if (result->meta) { in MYSQLND_METHOD()
1480 return_value = result->meta->current_field; in MYSQLND_METHOD()
1481 result->meta->current_field = field_offset; in MYSQLND_METHOD()
1490 MYSQLND_METHOD(mysqlnd_res, field_tell)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1492 return result->meta? result->meta->m->field_tell(result->meta TSRMLS_CC) : 0; in MYSQLND_METHOD()
1499 MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, unsigned int flags, in MYSQLND_METHOD()
1507 if (!result->m.fetch_row) { in MYSQLND_METHOD()
1515 mysqlnd_array_init(return_value, mysqlnd_num_fields(result) * 2); in MYSQLND_METHOD()
1516 …if (FAIL == result->m.fetch_row(result, (void *)return_value, flags, &fetched_anything TSRMLS_CC))… in MYSQLND_METHOD()
1543 MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
1548 if (result->m.fetch_row) { in MYSQLND_METHOD()
1549 if (result->m.fetch_row == result->m.fetch_row_normal_buffered) { in MYSQLND_METHOD()
1550 DBG_RETURN(mysqlnd_fetch_row_buffered_c(result TSRMLS_CC)); in MYSQLND_METHOD()
1551 } else if (result->m.fetch_row == result->m.fetch_row_normal_unbuffered) { in MYSQLND_METHOD()
1552 DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result TSRMLS_CC)); in MYSQLND_METHOD()
1564 MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, unsigned int flags, zval *return_value… in MYSQLND_METHOD()
1568 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD()
1572 if ((!result->unbuf && !set)) { in MYSQLND_METHOD()
1574 if (result->conn) { in MYSQLND_METHOD()
1575 …SET_CLIENT_ERROR(*result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can b… in MYSQLND_METHOD()
1586 mysqlnd_fetch_into(result, flags, row, MYSQLND_MYSQLI); in MYSQLND_METHOD()
1601 MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES * result, unsigned int offset, zval *retu… in MYSQLND_METHOD()
1610 if (!result->m.fetch_row) { in MYSQLND_METHOD()
1619 mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, &row, MYSQLND_MYSQL); in MYSQLND_METHOD()