Lines Matching refs:result

37 MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest)(MYSQLND_RES * const result TSRMLS_DC)  in MYSQLND_METHOD()
40 zval **data_cursor = result->stored_data? result->stored_data->data:NULL; in MYSQLND_METHOD()
41 zval **data_begin = result->stored_data? result->stored_data->data:NULL; in MYSQLND_METHOD()
42 unsigned int field_count = result->meta? result->meta->field_count : 0; in MYSQLND_METHOD()
43 uint64_t row_count = result->stored_data? result->stored_data->row_count:0; in MYSQLND_METHOD()
47 if (!data_cursor || row_count == result->stored_data->initialized_rows) { in MYSQLND_METHOD()
52 enum_func_status rc = result->m.row_decoder( in MYSQLND_METHOD()
53 result->stored_data->row_buffers[(data_cursor - data_begin) / field_count], in MYSQLND_METHOD()
55 result->meta->field_count, in MYSQLND_METHOD()
56 result->meta->fields, in MYSQLND_METHOD()
57 result->stored_data->persistent, 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()
157 MYSQLND_STATS *global_stats = result->conn? result->conn->stats:NULL; in MYSQLND_METHOD()
159 DBG_INF_FMT("%u columns to free", result->field_count); in MYSQLND_METHOD()
160 for (i = 0; i < result->field_count; i++) { in MYSQLND_METHOD()
161 … mysqlnd_rset_zval_ptr_dtor(&(unbuf->last_row_data[i]), result->type, &copy_ctor_called TSRMLS_CC); in MYSQLND_METHOD()
172 result->field_count - ctor_called_count); in MYSQLND_METHOD()
191 MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
193 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD()
194 unsigned int field_count = result->field_count; in MYSQLND_METHOD()
215 mysqlnd_rset_zval_ptr_dtor(&(current_row[col]), result->type, &copy_ctor_called TSRMLS_CC); in MYSQLND_METHOD()
257 MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
260 DBG_INF_FMT("%s", result->unbuf? "unbuffered":(result->stored_data? "buffered":"unknown")); in MYSQLND_METHOD()
262 if (result->unbuf) { in MYSQLND_METHOD()
263 result->m.unbuffered_free_last_data(result TSRMLS_CC); in MYSQLND_METHOD()
264 mnd_efree(result->unbuf); in MYSQLND_METHOD()
265 result->unbuf = NULL; in MYSQLND_METHOD()
266 } else if (result->stored_data) { in MYSQLND_METHOD()
267 result->m.free_buffered_data(result TSRMLS_CC); in MYSQLND_METHOD()
268 result->stored_data = NULL; in MYSQLND_METHOD()
271 if (result->lengths) { in MYSQLND_METHOD()
272 mnd_efree(result->lengths); in MYSQLND_METHOD()
273 result->lengths = NULL; in MYSQLND_METHOD()
276 if (result->row_packet) { in MYSQLND_METHOD()
278 PACKET_FREE(result->row_packet); in MYSQLND_METHOD()
279 result->row_packet = NULL; in MYSQLND_METHOD()
282 if (result->result_set_memory_pool) { in MYSQLND_METHOD()
284 mysqlnd_mempool_destroy(result->result_set_memory_pool TSRMLS_CC); in MYSQLND_METHOD()
285 result->result_set_memory_pool = NULL; in MYSQLND_METHOD()
295 void mysqlnd_internal_free_result_contents(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_internal_free_result_contents()
299 result->m.free_result_buffers(result TSRMLS_CC); in mysqlnd_internal_free_result_contents()
301 if (result->meta) { in mysqlnd_internal_free_result_contents()
302 result->meta->m->free_metadata(result->meta TSRMLS_CC); in mysqlnd_internal_free_result_contents()
303 result->meta = NULL; in mysqlnd_internal_free_result_contents()
313 void mysqlnd_internal_free_result(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_internal_free_result()
316 result->m.free_result_contents(result TSRMLS_CC); in mysqlnd_internal_free_result()
318 if (result->conn) { in mysqlnd_internal_free_result()
319 result->conn->m->free_reference(result->conn TSRMLS_CC); in mysqlnd_internal_free_result()
320 result->conn = NULL; in mysqlnd_internal_free_result()
323 mnd_pefree(result, result->persistent); in mysqlnd_internal_free_result()
332 MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND *conn TSRMLS_DC) in MYSQLND_METHOD()
342 if (result->meta) { in MYSQLND_METHOD()
343 result->meta->m->free_metadata(result->meta TSRMLS_CC); in MYSQLND_METHOD()
344 result->meta = NULL; in MYSQLND_METHOD()
347 result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC); in MYSQLND_METHOD()
348 if (!result->meta) { in MYSQLND_METHOD()
356 if (FAIL == result->meta->m->read_metadata(result->meta, conn TSRMLS_CC)) { in MYSQLND_METHOD()
357 result->m.free_result_contents(result TSRMLS_CC); in MYSQLND_METHOD()
361 result->field_count = result->meta->field_count; in MYSQLND_METHOD()
460 MYSQLND_RES * result; in mysqlnd_query_read_result_set_header() local
476result = conn->current_result = conn->m->result_init(rset_header->field_count, conn->persistent TS… in mysqlnd_query_read_result_set_header()
478 if (!stmt->result) { in mysqlnd_query_read_result_set_header()
485result = stmt->result = conn->m->result_init(rset_header->field_count, stmt->persistent TSRMLS_CC); in mysqlnd_query_read_result_set_header()
500 result = stmt->result; in mysqlnd_query_read_result_set_header()
502 if (!result) { in mysqlnd_query_read_result_set_header()
508 if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) { in mysqlnd_query_read_result_set_header()
527 result->m.free_result_contents(result TSRMLS_CC); in mysqlnd_query_read_result_set_header()
528 mnd_efree(result); in mysqlnd_query_read_result_set_header()
532 stmt->result = NULL; in mysqlnd_query_read_result_set_header()
586 mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) in mysqlnd_fetch_lengths_buffered()
590 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_lengths_buffered()
600 ((set->data_cursor - set->data) > (set->row_count * result->meta->field_count) )) in mysqlnd_fetch_lengths_buffered()
605 previous_row = set->data_cursor - result->meta->field_count; in mysqlnd_fetch_lengths_buffered()
606 for (i = 0; i < result->meta->field_count; i++) { in mysqlnd_fetch_lengths_buffered()
607 result->lengths[i] = (Z_TYPE_P(previous_row[i]) == IS_NULL)? 0:Z_STRLEN_P(previous_row[i]); in mysqlnd_fetch_lengths_buffered()
610 return result->lengths; in mysqlnd_fetch_lengths_buffered()
617 mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) in mysqlnd_fetch_lengths_unbuffered()
620 …return (!result->unbuf || result->unbuf->last_row_data || result->unbuf->eof_reached)? result->len… in mysqlnd_fetch_lengths_unbuffered()
626 PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC) in _mysqlnd_fetch_lengths()
628 return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL; in _mysqlnd_fetch_lengths()
635 mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_fetch_row_unbuffered_c()
640 field_count = result->field_count; in mysqlnd_fetch_row_unbuffered_c()
641 MYSQLND_PACKET_ROW *row_packet = result->row_packet; in mysqlnd_fetch_row_unbuffered_c()
642 unsigned long *lengths = result->lengths; in mysqlnd_fetch_row_unbuffered_c()
646 if (result->unbuf->eof_reached) { in mysqlnd_fetch_row_unbuffered_c()
650 if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { in mysqlnd_fetch_row_unbuffered_c()
651 SET_CLIENT_ERROR(result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, in mysqlnd_fetch_row_unbuffered_c()
666 if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { in mysqlnd_fetch_row_unbuffered_c()
667 result->unbuf->row_count++; in mysqlnd_fetch_row_unbuffered_c()
669 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
671 result->unbuf->last_row_data = row_packet->fields; in mysqlnd_fetch_row_unbuffered_c()
672 result->unbuf->last_row_buffer = row_packet->row_buffer; in mysqlnd_fetch_row_unbuffered_c()
676 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in mysqlnd_fetch_row_unbuffered_c()
679 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_unbuffered_c()
680 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_unbuffered_c()
682 enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, in mysqlnd_fetch_row_unbuffered_c()
683 result->unbuf->last_row_data, in mysqlnd_fetch_row_unbuffered_c()
687 result->conn->options.numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_unbuffered_c()
688 result->conn->options.int_and_float_native, in mysqlnd_fetch_row_unbuffered_c()
689 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
694 retrow = mnd_malloc(result->field_count * sizeof(char *)); in mysqlnd_fetch_row_unbuffered_c()
697 zval *data = result->unbuf->last_row_data[i]; in mysqlnd_fetch_row_unbuffered_c()
718 SET_OOM_ERROR(result->conn->error_info); in mysqlnd_fetch_row_unbuffered_c()
723 result->conn->error_info = row_packet->error_info; in mysqlnd_fetch_row_unbuffered_c()
726 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered_c()
727 result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ in mysqlnd_fetch_row_unbuffered_c()
731 result->unbuf->eof_reached = TRUE; in mysqlnd_fetch_row_unbuffered_c()
732 result->conn->upsert_status.warning_count = row_packet->warning_count; in mysqlnd_fetch_row_unbuffered_c()
733 result->conn->upsert_status.server_status = row_packet->server_status; in mysqlnd_fetch_row_unbuffered_c()
738 if (result->conn->upsert_status.server_status & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_fetch_row_unbuffered_c()
739 CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING); in mysqlnd_fetch_row_unbuffered_c()
741 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered_c()
743 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered_c()
753 mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetc… in mysqlnd_fetch_row_unbuffered() argument
757 MYSQLND_PACKET_ROW *row_packet = result->row_packet; in mysqlnd_fetch_row_unbuffered()
763 if (result->unbuf->eof_reached) { in mysqlnd_fetch_row_unbuffered()
767 if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { in mysqlnd_fetch_row_unbuffered()
768 …SET_CLIENT_ERROR(result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_… in mysqlnd_fetch_row_unbuffered()
782 if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { in mysqlnd_fetch_row_unbuffered()
783 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
785 result->unbuf->last_row_data = row_packet->fields; in mysqlnd_fetch_row_unbuffered()
786 result->unbuf->last_row_buffer = row_packet->row_buffer; in mysqlnd_fetch_row_unbuffered()
790 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); in mysqlnd_fetch_row_unbuffered()
794 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_unbuffered()
795 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_unbuffered()
796 unsigned int i, field_count = result->field_count; in mysqlnd_fetch_row_unbuffered()
797 unsigned long *lengths = result->lengths; in mysqlnd_fetch_row_unbuffered()
799 enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, in mysqlnd_fetch_row_unbuffered()
800 result->unbuf->last_row_data, in mysqlnd_fetch_row_unbuffered()
804 result->conn->options.numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_unbuffered()
805 result->conn->options.int_and_float_native, in mysqlnd_fetch_row_unbuffered()
806 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
811 zval *data = result->unbuf->last_row_data[i]; in mysqlnd_fetch_row_unbuffered()
857 result->unbuf->row_count++; in mysqlnd_fetch_row_unbuffered()
860 result->conn->error_info = row_packet->error_info; in mysqlnd_fetch_row_unbuffered()
863 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered()
864 result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ in mysqlnd_fetch_row_unbuffered()
868 result->unbuf->eof_reached = TRUE; in mysqlnd_fetch_row_unbuffered()
869 result->conn->upsert_status.warning_count = row_packet->warning_count; in mysqlnd_fetch_row_unbuffered()
870 result->conn->upsert_status.server_status = row_packet->server_status; in mysqlnd_fetch_row_unbuffered()
875 if (result->conn->upsert_status.server_status & SERVER_MORE_RESULTS_EXISTS) { in mysqlnd_fetch_row_unbuffered()
876 CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING); in mysqlnd_fetch_row_unbuffered()
878 CONN_SET_STATE(result->conn, CONN_READY); in mysqlnd_fetch_row_unbuffered()
880 result->m.unbuffered_free_last_data(result TSRMLS_CC); in mysqlnd_fetch_row_unbuffered()
891 MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps TSRMLS_DC) in MYSQLND_METHOD()
896 SET_EMPTY_ERROR(result->conn->error_info); in MYSQLND_METHOD()
900 result->type = MYSQLND_RES_NORMAL; in MYSQLND_METHOD()
901 result->m.fetch_row = result->m.fetch_row_normal_unbuffered; in MYSQLND_METHOD()
902 result->m.fetch_lengths = mysqlnd_fetch_lengths_unbuffered; in MYSQLND_METHOD()
903 result->m.row_decoder = php_mysqlnd_rowp_read_text_protocol; in MYSQLND_METHOD()
904 result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); in MYSQLND_METHOD()
905 if (!result->lengths) { in MYSQLND_METHOD()
909 result->type = MYSQLND_RES_PS_UNBUF; in MYSQLND_METHOD()
910 result->m.fetch_row = NULL; in MYSQLND_METHOD()
912 result->m.fetch_lengths = NULL; /* makes no sense */ in MYSQLND_METHOD()
913 result->m.row_decoder = php_mysqlnd_rowp_read_binary_protocol; in MYSQLND_METHOD()
914 result->lengths = NULL; in MYSQLND_METHOD()
917 result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); in MYSQLND_METHOD()
918 result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); in MYSQLND_METHOD()
919 if (!result->result_set_memory_pool || !result->unbuf) { in MYSQLND_METHOD()
929result->row_packet = result->conn->protocol->m.get_row_packet(result->conn->protocol, FALSE TSRMLS… in MYSQLND_METHOD()
930 if (!result->row_packet) { in MYSQLND_METHOD()
933 result->row_packet->result_set_memory_pool = result->result_set_memory_pool; in MYSQLND_METHOD()
934 result->row_packet->field_count = result->field_count; in MYSQLND_METHOD()
935 result->row_packet->binary_protocol = ps; in MYSQLND_METHOD()
936 result->row_packet->fields_metadata = result->meta->fields; in MYSQLND_METHOD()
937 result->row_packet->bit_fields_count = result->meta->bit_fields_count; in MYSQLND_METHOD()
938 result->row_packet->bit_fields_total_len = result->meta->bit_fields_total_len; in MYSQLND_METHOD()
940 DBG_RETURN(result); in MYSQLND_METHOD()
942 SET_OOM_ERROR(result->conn->error_info); in MYSQLND_METHOD()
950 mysqlnd_fetch_row_buffered_c(MYSQLND_RES * result TSRMLS_DC) in mysqlnd_fetch_row_buffered_c()
953 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered_c()
959 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered_c()
962 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_buffered_c()
963 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_buffered_c()
967 uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
968 enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], in mysqlnd_fetch_row_buffered_c()
970 result->meta->field_count, in mysqlnd_fetch_row_buffered_c()
971 result->meta->fields, in mysqlnd_fetch_row_buffered_c()
973 result->conn->options.numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_buffered_c()
974 result->conn->options.int_and_float_native, in mysqlnd_fetch_row_buffered_c()
975 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_buffered_c()
980 for (i = 0; i < result->field_count; i++) { in mysqlnd_fetch_row_buffered_c()
995 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
998 ret = mnd_malloc(result->field_count * sizeof(char *)); in mysqlnd_fetch_row_buffered_c()
1000 for (i = 0; i < result->field_count; i++, field++, hash_key++) { in mysqlnd_fetch_row_buffered_c()
1023 mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetche… in mysqlnd_fetch_row_buffered() argument
1027 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered()
1035 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered()
1038 MYSQLND_FIELD *field = result->meta->fields; in mysqlnd_fetch_row_buffered()
1039 struct mysqlnd_field_hash_key * hash_key = result->meta->zend_hash_keys; in mysqlnd_fetch_row_buffered()
1042 uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; in mysqlnd_fetch_row_buffered()
1043 enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], in mysqlnd_fetch_row_buffered()
1045 result->meta->field_count, in mysqlnd_fetch_row_buffered()
1046 result->meta->fields, in mysqlnd_fetch_row_buffered()
1047 result->stored_data->persistent, in mysqlnd_fetch_row_buffered()
1048 result->conn->options.numeric_and_datetime_as_unicode, in mysqlnd_fetch_row_buffered()
1049 result->conn->options.int_and_float_native, in mysqlnd_fetch_row_buffered()
1050 result->conn->stats TSRMLS_CC); in mysqlnd_fetch_row_buffered()
1055 for (i = 0; i < result->field_count; i++) { in mysqlnd_fetch_row_buffered()
1070 for (i = 0; i < result->field_count; i++, field++, hash_key++) { in mysqlnd_fetch_row_buffered()
1107 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered()
1127 MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQLND_RES * result, in MYSQLND_METHOD()
1141 result->stored_data = set = mnd_pecalloc(1, sizeof(MYSQLND_RES_BUFFERED), to_cache); in MYSQLND_METHOD()
1158 result->m.row_decoder = binary_protocol? php_mysqlnd_rowp_read_binary_protocol: in MYSQLND_METHOD()
1168 row_packet->result_set_memory_pool = result->result_set_memory_pool; in MYSQLND_METHOD()
1283 MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, in MYSQLND_METHOD()
1294 result->conn = conn->m->get_reference(conn TSRMLS_CC); in MYSQLND_METHOD()
1295 result->type = MYSQLND_RES_NORMAL; in MYSQLND_METHOD()
1296 result->m.fetch_row = result->m.fetch_row_normal_buffered; in MYSQLND_METHOD()
1297 result->m.fetch_lengths = mysqlnd_fetch_lengths_buffered; in MYSQLND_METHOD()
1299 result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); in MYSQLND_METHOD()
1300 result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); in MYSQLND_METHOD()
1301 if (!result->result_set_memory_pool || !result->lengths) { in MYSQLND_METHOD()
1308 …ret = result->m.store_result_fetch_data(conn, result, result->meta, ps_protocol, to_cache TSRMLS_C… in MYSQLND_METHOD()
1310 if (result->stored_data) { in MYSQLND_METHOD()
1311 conn->error_info = result->stored_data->error_info; in MYSQLND_METHOD()
1318 conn->upsert_status.affected_rows = result->stored_data->row_count; in MYSQLND_METHOD()
1320 DBG_RETURN(result); in MYSQLND_METHOD()
1327 MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1337 if (!result->stored_data && result->unbuf && in MYSQLND_METHOD()
1338 !result->unbuf->eof_reached && result->m.fetch_row) in MYSQLND_METHOD()
1342 MYSQLND_INC_CONN_STATISTIC(result->conn->stats, in MYSQLND_METHOD()
1343 result->type == MYSQLND_RES_NORMAL? STAT_FLUSHED_NORMAL_SETS: in MYSQLND_METHOD()
1346 …while ((PASS == result->m.fetch_row(result, NULL, 0, &fetched_anything TSRMLS_CC)) && fetched_anyt… in MYSQLND_METHOD()
1357 MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, zend_bool implicit TSRMLS_DC) in MYSQLND_METHOD()
1362 result->m.skip_result(result TSRMLS_CC); in MYSQLND_METHOD()
1363 MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, in MYSQLND_METHOD()
1367 result->m.free_result_internal(result TSRMLS_CC); in MYSQLND_METHOD()
1375 MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES * result, uint64_t row TSRMLS_DC) in MYSQLND_METHOD()
1380 if (!result->stored_data) { in MYSQLND_METHOD()
1385 if (row >= result->stored_data->row_count) { in MYSQLND_METHOD()
1386 result->stored_data->data_cursor = NULL; in MYSQLND_METHOD()
1388 result->stored_data->data_cursor = result->stored_data->data + row * result->meta->field_count; in MYSQLND_METHOD()
1398 MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1401 …return result->stored_data? result->stored_data->row_count:(result->unbuf && result->unbuf->eof_re… in MYSQLND_METHOD()
1408 MYSQLND_METHOD(mysqlnd_res, num_fields)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1410 return result->field_count; in MYSQLND_METHOD()
1417 MYSQLND_METHOD(mysqlnd_res, fetch_field)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1421 if (result->meta) { in MYSQLND_METHOD()
1432 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1435 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1439 DBG_RETURN(result->meta->m->fetch_field(result->meta TSRMLS_CC)); in MYSQLND_METHOD()
1449 MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fi… in MYSQLND_METHOD()
1453 if (result->meta) { in MYSQLND_METHOD()
1464 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1467 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1471 DBG_RETURN(result->meta->m->fetch_field_direct(result->meta, fieldnr TSRMLS_CC)); in MYSQLND_METHOD()
1482 MYSQLND_METHOD(mysqlnd_res, fetch_fields)(MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1486 if (result->meta) { in MYSQLND_METHOD()
1487 …if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count… in MYSQLND_METHOD()
1489 if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { in MYSQLND_METHOD()
1493 DBG_RETURN(result->meta->m->fetch_fields(result->meta TSRMLS_CC)); in MYSQLND_METHOD()
1504 MYSQLND_METHOD(mysqlnd_res, field_seek)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offs… in MYSQLND_METHOD()
1507 if (result->meta) { in MYSQLND_METHOD()
1508 return_value = result->meta->current_field; in MYSQLND_METHOD()
1509 result->meta->current_field = field_offset; in MYSQLND_METHOD()
1518 MYSQLND_METHOD(mysqlnd_res, field_tell)(const MYSQLND_RES * const result TSRMLS_DC) in MYSQLND_METHOD()
1520 return result->meta? result->meta->m->field_tell(result->meta TSRMLS_CC) : 0; in MYSQLND_METHOD()
1530 MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, unsigned int flags, in MYSQLND_METHOD()
1539 if (!result->m.fetch_row) { in MYSQLND_METHOD()
1547 mysqlnd_array_init(return_value, mysqlnd_num_fields(result) * 2); in MYSQLND_METHOD()
1548 …if (FAIL == result->m.fetch_row(result, (void *)return_value, flags, &fetched_anything TSRMLS_CC))… in MYSQLND_METHOD()
1575 MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result TSRMLS_DC) in MYSQLND_METHOD()
1580 if (result->m.fetch_row) { in MYSQLND_METHOD()
1581 if (result->m.fetch_row == result->m.fetch_row_normal_buffered) { in MYSQLND_METHOD()
1582 DBG_RETURN(mysqlnd_fetch_row_buffered_c(result TSRMLS_CC)); in MYSQLND_METHOD()
1583 } else if (result->m.fetch_row == result->m.fetch_row_normal_unbuffered) { in MYSQLND_METHOD()
1584 DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result TSRMLS_CC)); in MYSQLND_METHOD()
1596 MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, unsigned int flags, zval *return_value… in MYSQLND_METHOD()
1600 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD()
1605 if ((!result->unbuf && !set)) { in MYSQLND_METHOD()
1607 if (result->conn) { in MYSQLND_METHOD()
1608 …SET_CLIENT_ERROR(result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be… in MYSQLND_METHOD()
1619 mysqlnd_fetch_into(result, flags, row, MYSQLND_MYSQLI); in MYSQLND_METHOD()
1634 MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES * result, unsigned int offset, zval *retu… in MYSQLND_METHOD()
1643 if (!result->m.fetch_row) { in MYSQLND_METHOD()
1652 mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, &row, MYSQLND_MYSQL); in MYSQLND_METHOD()
1737 PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result, unsigned int plug… in _mysqlnd_plugin_get_plugin_result_data() argument
1741 if (!result || plugin_id >= mysqlnd_plugin_count()) { in _mysqlnd_plugin_get_plugin_result_data()
1744 DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES) + plugin_id * sizeof(void *))); in _mysqlnd_plugin_get_plugin_result_data()