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->int_and_float_native, in MYSQLND_METHOD()
59 result->conn->stats TSRMLS_CC); in MYSQLND_METHOD()
64 result->stored_data->initialized_rows++; in MYSQLND_METHOD()
65 for (i = 0; i < result->field_count; i++) { in MYSQLND_METHOD()
73 if (result->meta->fields[i].max_length < len) { in MYSQLND_METHOD()
74 result->meta->fields[i].max_length = len; in MYSQLND_METHOD()
132 MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
134 MYSQLND_RES_UNBUFFERED *unbuf = result->unbuf; in MYSQLND_METHOD()
145 MYSQLND_STATS *global_stats = result->conn? result->conn->stats:NULL; in MYSQLND_METHOD()
147 for (i = 0; i < result->field_count; i++) { in MYSQLND_METHOD()
148 … mysqlnd_rset_zval_ptr_dtor(&(unbuf->last_row_data[i]), result->type, ©_ctor_called TSRMLS_CC); in MYSQLND_METHOD()
159 result->field_count - ctor_called_count); in MYSQLND_METHOD()
178 MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
180 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD()
181 unsigned int field_count = result->field_count; in MYSQLND_METHOD()
202 mysqlnd_rset_zval_ptr_dtor(&(current_row[col]), result->type, ©_ctor_called TSRMLS_CC); in MYSQLND_METHOD()
235 MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
238 DBG_INF_FMT("%s", result->unbuf? "unbuffered":(result->stored_data? "buffered":"unknown")); in MYSQLND_METHOD()
240 if (result->unbuf) { in MYSQLND_METHOD()
241 result->m.unbuffered_free_last_data(result TSRMLS_CC); in MYSQLND_METHOD()
242 mnd_efree(result->unbuf); in MYSQLND_METHOD()
243 result->unbuf = NULL; in MYSQLND_METHOD()
244 } else if (result->stored_data) { in MYSQLND_METHOD()
245 result->m.free_buffered_data(result TSRMLS_CC); in MYSQLND_METHOD()
246 result->stored_data = NULL; in MYSQLND_METHOD()
249 if (result->lengths) { in MYSQLND_METHOD()
250 mnd_efree(result->lengths); in MYSQLND_METHOD()
251 result->lengths = NULL; in MYSQLND_METHOD()
254 if (result->row_packet) { in MYSQLND_METHOD()
255 PACKET_FREE(result->row_packet); in MYSQLND_METHOD()
256 result->row_packet = NULL; in MYSQLND_METHOD()
259 if (result->result_set_memory_pool) { in MYSQLND_METHOD()
260 mysqlnd_mempool_destroy(result->result_set_memory_pool TSRMLS_CC); in MYSQLND_METHOD()
261 result->result_set_memory_pool = NULL; in MYSQLND_METHOD()
271 void mysqlnd_internal_free_result_contents(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_internal_free_result_contents()
275 result->m.free_result_buffers(result TSRMLS_CC); in mysqlnd_internal_free_result_contents()
277 if (result->meta) { in mysqlnd_internal_free_result_contents()
278 result->meta->m->free_metadata(result->meta TSRMLS_CC); in mysqlnd_internal_free_result_contents()
279 result->meta = NULL; in mysqlnd_internal_free_result_contents()
289 void mysqlnd_internal_free_result(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_internal_free_result()
292 result->m.free_result_contents(result TSRMLS_CC); in mysqlnd_internal_free_result()
294 if (result->conn) { in mysqlnd_internal_free_result()
295 result->conn->m->free_reference(result->conn TSRMLS_CC); in mysqlnd_internal_free_result()
296 result->conn = NULL; in mysqlnd_internal_free_result()
299 mnd_pefree(result, result->persistent); in mysqlnd_internal_free_result()
308 MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn TS… in MYSQLND_METHOD()
318 if (result->meta) { in MYSQLND_METHOD()
319 result->meta->m->free_metadata(result->meta TSRMLS_CC); in MYSQLND_METHOD()
320 result->meta = NULL; in MYSQLND_METHOD()
323 result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC); in MYSQLND_METHOD()
324 if (!result->meta) { in MYSQLND_METHOD()
332 if (FAIL == result->meta->m->read_metadata(result->meta, conn TSRMLS_CC)) { in MYSQLND_METHOD()
333 result->m.free_result_contents(result TSRMLS_CC); in MYSQLND_METHOD()
337 result->field_count = result->meta->field_count; in MYSQLND_METHOD()
437 MYSQLND_RES * result; in mysqlnd_query_read_result_set_header() local
453 …result = conn->current_result = conn->m->result_init(rset_header->field_count, conn->persistent TS… in mysqlnd_query_read_result_set_header()
455 if (!stmt->result) { in mysqlnd_query_read_result_set_header()
462 …result = stmt->result = conn->m->result_init(rset_header->field_count, stmt->persistent TSRMLS_CC); in mysqlnd_query_read_result_set_header()
477 result = stmt->result; in mysqlnd_query_read_result_set_header()
479 if (!result) { in mysqlnd_query_read_result_set_header()
485 if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) { in mysqlnd_query_read_result_set_header()
504 result->m.free_result_contents(result TSRMLS_CC); in mysqlnd_query_read_result_set_header()
505 mnd_efree(result); in mysqlnd_query_read_result_set_header()
509 stmt->result = NULL; in mysqlnd_query_read_result_set_header()
563 mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) in mysqlnd_fetch_lengths_buffered()
567 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_lengths_buffered()
577 ((set->data_cursor - set->data) > (set->row_count * result->meta->field_count) )) in mysqlnd_fetch_lengths_buffered()
582 previous_row = set->data_cursor - result->meta->field_count; in mysqlnd_fetch_lengths_buffered()
583 for (i = 0; i < result->meta->field_count; i++) { in mysqlnd_fetch_lengths_buffered()
584 result->lengths[i] = (Z_TYPE_P(previous_row[i]) == IS_NULL)? 0:Z_STRLEN_P(previous_row[i]); in mysqlnd_fetch_lengths_buffered()
587 return result->lengths; in mysqlnd_fetch_lengths_buffered()
594 mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) in mysqlnd_fetch_lengths_unbuffered()
597 …return (!result->unbuf || result->unbuf->last_row_data || result->unbuf->eof_reached)? result->len… in mysqlnd_fetch_lengths_unbuffered()
603 PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC) in _mysqlnd_fetch_lengths()
605 return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL; in _mysqlnd_fetch_lengths()
612 mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_fetch_row_unbuffered_c()
617 field_count = result->field_count; in mysqlnd_fetch_row_unbuffered_c()
618 MYSQLND_PACKET_ROW *row_packet = result->row_packet; in mysqlnd_fetch_row_unbuffered_c()
619 unsigned long *lengths = result->lengths; in mysqlnd_fetch_row_unbuffered_c()
623 if (result->unbuf->eof_reached) { in mysqlnd_fetch_row_unbuffered_c()
627 if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { in mysqlnd_fetch_row_unbuffered_c()
628 SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, in mysqlnd_fetch_row_unbuffered_c()
643 if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { in mysqlnd_fetch_row_unbuffered_c()
644 result->unbuf->row_count++; in mysqlnd_fetch_row_unbuffered_c()
646 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
648 result->unbuf->last_row_data = row_packet->fields; in mysqlnd_fetch_row_unbuffered_c()
649 result->unbuf->last_row_buffer = row_packet->row_buffer; in mysqlnd_fetch_row_unbuffered_c()
653 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in mysqlnd_fetch_row_unbuffered_c()
656 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_unbuffered_c()
657 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_unbuffered_c()
659 enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, in mysqlnd_fetch_row_unbuffered_c()
660 result->unbuf->last_row_data, in mysqlnd_fetch_row_unbuffered_c()
663 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_unbuffered_c()
664 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
669 retrow = mnd_malloc(result->field_count * sizeof(char *)); in mysqlnd_fetch_row_unbuffered_c()
672 zval *data = result->unbuf->last_row_data[i]; in mysqlnd_fetch_row_unbuffered_c()
693 SET_OOM_ERROR(*result->conn->error_info); in mysqlnd_fetch_row_unbuffered_c()
698 COPY_CLIENT_ERROR(*result->conn->error_info, row_packet->error_info); in mysqlnd_fetch_row_unbuffered_c()
701 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered_c()
702 result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ in mysqlnd_fetch_row_unbuffered_c()
706 result->unbuf->eof_reached = TRUE; in mysqlnd_fetch_row_unbuffered_c()
707 memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status)); in mysqlnd_fetch_row_unbuffered_c()
708 result->conn->upsert_status->warning_count = row_packet->warning_count; in mysqlnd_fetch_row_unbuffered_c()
709 result->conn->upsert_status->server_status = row_packet->server_status; in mysqlnd_fetch_row_unbuffered_c()
714 if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_fetch_row_unbuffered_c()
715 CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING); in mysqlnd_fetch_row_unbuffered_c()
717 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered_c()
719 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
729 mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetc… in mysqlnd_fetch_row_unbuffered() argument
733 MYSQLND_PACKET_ROW *row_packet = result->row_packet; in mysqlnd_fetch_row_unbuffered()
738 if (result->unbuf->eof_reached) { in mysqlnd_fetch_row_unbuffered()
742 if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { in mysqlnd_fetch_row_unbuffered()
743 …SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out… in mysqlnd_fetch_row_unbuffered()
757 if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { in mysqlnd_fetch_row_unbuffered()
758 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
760 result->unbuf->last_row_data = row_packet->fields; in mysqlnd_fetch_row_unbuffered()
761 result->unbuf->last_row_buffer = row_packet->row_buffer; in mysqlnd_fetch_row_unbuffered()
765 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in mysqlnd_fetch_row_unbuffered()
769 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_unbuffered()
770 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_unbuffered()
771 unsigned int i, field_count = result->field_count; in mysqlnd_fetch_row_unbuffered()
772 unsigned long *lengths = result->lengths; in mysqlnd_fetch_row_unbuffered()
774 enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, in mysqlnd_fetch_row_unbuffered()
775 result->unbuf->last_row_data, in mysqlnd_fetch_row_unbuffered()
778 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_unbuffered()
779 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
784 zval *data = result->unbuf->last_row_data[i]; in mysqlnd_fetch_row_unbuffered()
822 result->unbuf->row_count++; in mysqlnd_fetch_row_unbuffered()
825 COPY_CLIENT_ERROR(*result->conn->error_info, row_packet->error_info); in mysqlnd_fetch_row_unbuffered()
828 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered()
829 result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ in mysqlnd_fetch_row_unbuffered()
833 result->unbuf->eof_reached = TRUE; in mysqlnd_fetch_row_unbuffered()
834 memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status)); in mysqlnd_fetch_row_unbuffered()
835 result->conn->upsert_status->warning_count = row_packet->warning_count; in mysqlnd_fetch_row_unbuffered()
836 result->conn->upsert_status->server_status = row_packet->server_status; in mysqlnd_fetch_row_unbuffered()
841 if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_fetch_row_unbuffered()
842 CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING); in mysqlnd_fetch_row_unbuffered()
844 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered()
846 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
857 MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps TSRMLS_DC) in MYSQLND_METHOD()
861 SET_EMPTY_ERROR(*result->conn->error_info); in MYSQLND_METHOD()
864 result->type = MYSQLND_RES_NORMAL; in MYSQLND_METHOD()
865 result->m.fetch_row = result->m.fetch_row_normal_unbuffered; in MYSQLND_METHOD()
866 result->m.fetch_lengths = mysqlnd_fetch_lengths_unbuffered; in MYSQLND_METHOD()
867 result->m.row_decoder = php_mysqlnd_rowp_read_text_protocol; in MYSQLND_METHOD()
868 result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); in MYSQLND_METHOD()
869 if (!result->lengths) { in MYSQLND_METHOD()
873 result->type = MYSQLND_RES_PS_UNBUF; in MYSQLND_METHOD()
874 result->m.fetch_row = NULL; in MYSQLND_METHOD()
876 result->m.fetch_lengths = NULL; /* makes no sense */ in MYSQLND_METHOD()
877 result->m.row_decoder = php_mysqlnd_rowp_read_binary_protocol; in MYSQLND_METHOD()
878 result->lengths = NULL; in MYSQLND_METHOD()
881 result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); in MYSQLND_METHOD()
882 result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); in MYSQLND_METHOD()
883 if (!result->result_set_memory_pool || !result->unbuf) { in MYSQLND_METHOD()
893 …result->row_packet = result->conn->protocol->m.get_row_packet(result->conn->protocol, FALSE TSRMLS… in MYSQLND_METHOD()
894 if (!result->row_packet) { in MYSQLND_METHOD()
897 result->row_packet->result_set_memory_pool = result->result_set_memory_pool; in MYSQLND_METHOD()
898 result->row_packet->field_count = result->field_count; in MYSQLND_METHOD()
899 result->row_packet->binary_protocol = ps; in MYSQLND_METHOD()
900 result->row_packet->fields_metadata = result->meta->fields; in MYSQLND_METHOD()
901 result->row_packet->bit_fields_count = result->meta->bit_fields_count; in MYSQLND_METHOD()
902 result->row_packet->bit_fields_total_len = result->meta->bit_fields_total_len; in MYSQLND_METHOD()
904 DBG_RETURN(result); in MYSQLND_METHOD()
906 SET_OOM_ERROR(*result->conn->error_info); in MYSQLND_METHOD()
914 mysqlnd_fetch_row_buffered_c(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_fetch_row_buffered_c()
917 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered_c()
923 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered_c()
926 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_buffered_c()
927 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_buffered_c()
931 uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
932 enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], in mysqlnd_fetch_row_buffered_c()
934 result->meta->field_count, in mysqlnd_fetch_row_buffered_c()
935 result->meta->fields, in mysqlnd_fetch_row_buffered_c()
936 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_buffered_c()
937 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_buffered_c()
942 for (i = 0; i < result->field_count; i++) { in mysqlnd_fetch_row_buffered_c()
957 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
960 ret = mnd_malloc(result->field_count * sizeof(char *)); in mysqlnd_fetch_row_buffered_c()
962 for (i = 0; i < result->field_count; i++, field++, hash_key++) { in mysqlnd_fetch_row_buffered_c()
985 mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetche… in mysqlnd_fetch_row_buffered() argument
989 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered()
996 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered()
999 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_buffered()
1000 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_buffered()
1003 uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; in mysqlnd_fetch_row_buffered()
1004 enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], in mysqlnd_fetch_row_buffered()
1006 result->meta->field_count, in mysqlnd_fetch_row_buffered()
1007 result->meta->fields, in mysqlnd_fetch_row_buffered()
1008 result->conn->options->int_and_float_native, in mysqlnd_fetch_row_buffered()
1009 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_buffered()
1014 for (i = 0; i < result->field_count; i++) { in mysqlnd_fetch_row_buffered()
1029 for (i = 0; i < result->field_count; i++, field++, hash_key++) { in mysqlnd_fetch_row_buffered()
1058 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered()
1078 …_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, in MYSQLND_METHOD()
1089 result->stored_data = set = mnd_ecalloc(1, sizeof(MYSQLND_RES_BUFFERED)); in MYSQLND_METHOD()
1112 row_packet->result_set_memory_pool = result->result_set_memory_pool; in MYSQLND_METHOD()
1224 MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, in MYSQLND_METHOD()
1233 result->conn = conn->m->get_reference(conn TSRMLS_CC); in MYSQLND_METHOD()
1234 result->type = MYSQLND_RES_NORMAL; in MYSQLND_METHOD()
1235 result->m.fetch_row = result->m.fetch_row_normal_buffered; in MYSQLND_METHOD()
1236 result->m.fetch_lengths = mysqlnd_fetch_lengths_buffered; in MYSQLND_METHOD()
1237 result->m.row_decoder = ps_protocol? php_mysqlnd_rowp_read_binary_protocol: in MYSQLND_METHOD()
1240 result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); in MYSQLND_METHOD()
1241 result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); in MYSQLND_METHOD()
1243 if (!result->result_set_memory_pool || !result->lengths) { in MYSQLND_METHOD()
1250 ret = result->m.store_result_fetch_data(conn, result, result->meta, ps_protocol TSRMLS_CC); in MYSQLND_METHOD()
1252 if (result->stored_data) { in MYSQLND_METHOD()
1253 COPY_CLIENT_ERROR(*conn->error_info, result->stored_data->error_info); in MYSQLND_METHOD()
1260 conn->upsert_status->affected_rows = result->stored_data->row_count; in MYSQLND_METHOD()
1262 DBG_RETURN(result); in MYSQLND_METHOD()
1269 MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1279 if (!result->stored_data && result->unbuf && in MYSQLND_METHOD()
1280 !result->unbuf->eof_reached && result->m.fetch_row) in MYSQLND_METHOD()
1284 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, in MYSQLND_METHOD()
1285 result->type == MYSQLND_RES_NORMAL? STAT_FLUSHED_NORMAL_SETS: in MYSQLND_METHOD()
1288 …while ((PASS == result->m.fetch_row(result, NULL, 0, &fetched_anything TSRMLS_CC)) && fetched_anyt… in MYSQLND_METHOD()
1299 MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, zend_bool implicit TSRMLS_DC) in MYSQLND_METHOD()
1303 result->m.skip_result(result TSRMLS_CC); in MYSQLND_METHOD()
1304 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
1308 result->m.free_result_internal(result TSRMLS_CC); in MYSQLND_METHOD()
1316 MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES * result, uint64_t row TSRMLS_DC) in MYSQLND_METHOD()
1321 if (!result->stored_data) { in MYSQLND_METHOD()
1326 if (row >= result->stored_data->row_count) { in MYSQLND_METHOD()
1327 result->stored_data->data_cursor = NULL; in MYSQLND_METHOD()
1329 result->stored_data->data_cursor = result->stored_data->data + row * result->meta->field_count; in MYSQLND_METHOD()
1339 MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1342 …return result->stored_data? result->stored_data->row_count:(result->unbuf && result->unbuf->eof_re… in MYSQLND_METHOD()
1349 MYSQLND_METHOD(mysqlnd_res, num_fields)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1351 return result->field_count; in MYSQLND_METHOD()
1358 MYSQLND_METHOD(mysqlnd_res, fetch_field)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1362 if (result->meta) { in MYSQLND_METHOD()
1373 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1376 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1380 DBG_RETURN(result->meta->m->fetch_field(result->meta TSRMLS_CC)); in MYSQLND_METHOD()
1390 MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fi… in MYSQLND_METHOD()
1394 if (result->meta) { in MYSQLND_METHOD()
1405 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1408 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1412 DBG_RETURN(result->meta->m->fetch_field_direct(result->meta, fieldnr TSRMLS_CC)); in MYSQLND_METHOD()
1423 MYSQLND_METHOD(mysqlnd_res, fetch_fields)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1427 if (result->meta) { in MYSQLND_METHOD()
1428 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1430 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1434 DBG_RETURN(result->meta->m->fetch_fields(result->meta TSRMLS_CC)); in MYSQLND_METHOD()
1445 MYSQLND_METHOD(mysqlnd_res, field_seek)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offs… in MYSQLND_METHOD()
1448 if (result->meta) { in MYSQLND_METHOD()
1449 return_value = result->meta->current_field; in MYSQLND_METHOD()
1450 result->meta->current_field = field_offset; in MYSQLND_METHOD()
1459 MYSQLND_METHOD(mysqlnd_res, field_tell)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1461 return result->meta? result->meta->m->field_tell(result->meta TSRMLS_CC) : 0; in MYSQLND_METHOD()
1468 MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, unsigned int flags, in MYSQLND_METHOD()
1476 if (!result->m.fetch_row) { in MYSQLND_METHOD()
1484 mysqlnd_array_init(return_value, mysqlnd_num_fields(result) * 2); in MYSQLND_METHOD()
1485 …if (FAIL == result->m.fetch_row(result, (void *)return_value, flags, &fetched_anything TSRMLS_CC))… in MYSQLND_METHOD()
1512 MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
1517 if (result->m.fetch_row) { in MYSQLND_METHOD()
1518 if (result->m.fetch_row == result->m.fetch_row_normal_buffered) { in MYSQLND_METHOD()
1519 DBG_RETURN(mysqlnd_fetch_row_buffered_c(result TSRMLS_CC)); in MYSQLND_METHOD()
1520 } else if (result->m.fetch_row == result->m.fetch_row_normal_unbuffered) { in MYSQLND_METHOD()
1521 DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result TSRMLS_CC)); in MYSQLND_METHOD()
1533 MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, unsigned int flags, zval *return_value… in MYSQLND_METHOD()
1537 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD()
1541 if ((!result->unbuf && !set)) { in MYSQLND_METHOD()
1543 if (result->conn) { in MYSQLND_METHOD()
1544 …SET_CLIENT_ERROR(*result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can b… in MYSQLND_METHOD()
1555 mysqlnd_fetch_into(result, flags, row, MYSQLND_MYSQLI); in MYSQLND_METHOD()
1570 MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES * result, unsigned int offset, zval *retu… in MYSQLND_METHOD()
1579 if (!result->m.fetch_row) { in MYSQLND_METHOD()
1588 mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, &row, MYSQLND_MYSQL); in MYSQLND_METHOD()