Lines Matching refs:set
191 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD() local
196 DBG_INF_FMT("Freeing "MYSQLND_LLU_SPEC" row(s)", set->row_count); in MYSQLND_METHOD()
198 if (set->data) { in MYSQLND_METHOD()
201 zval **data = set->data; in MYSQLND_METHOD()
202 set->data = NULL; /* prevent double free if following loop is interrupted */ in MYSQLND_METHOD()
204 for (row = set->row_count - 1; row >= 0; row--) { in MYSQLND_METHOD()
206 MYSQLND_MEMORY_POOL_CHUNK *current_buffer = set->row_buffers[row]; in MYSQLND_METHOD()
230 if (set->row_buffers) { in MYSQLND_METHOD()
231 mnd_efree(set->row_buffers); in MYSQLND_METHOD()
232 set->row_buffers = NULL; in MYSQLND_METHOD()
234 set->data_cursor = NULL; in MYSQLND_METHOD()
235 set->row_count = 0; in MYSQLND_METHOD()
237 mnd_efree(set); in MYSQLND_METHOD()
578 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_lengths_buffered() local
586 if (set->data_cursor == NULL || in mysqlnd_fetch_lengths_buffered()
587 set->data_cursor == set->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()
938 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered_c() local
943 if (set->data_cursor && 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()
946 zval **current_row = set->data_cursor; 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()
963 set->initialized_rows++; in mysqlnd_fetch_row_buffered_c()
979 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered_c()
997 set->data_cursor = NULL; in mysqlnd_fetch_row_buffered_c()
1011 MYSQLND_RES_BUFFERED *set = result->stored_data; in mysqlnd_fetch_row_buffered() local
1017 if (set->data_cursor && in mysqlnd_fetch_row_buffered()
1018 (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) in mysqlnd_fetch_row_buffered()
1020 zval **current_row = set->data_cursor; 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()
1036 set->initialized_rows++; in mysqlnd_fetch_row_buffered()
1089 set->data_cursor += result->meta->field_count; in mysqlnd_fetch_row_buffered()
1094 set->data_cursor = NULL; in mysqlnd_fetch_row_buffered()
1116 MYSQLND_RES_BUFFERED *set; in MYSQLND_METHOD() local
1120 result->stored_data = set = mnd_ecalloc(1, sizeof(MYSQLND_RES_BUFFERED)); in MYSQLND_METHOD()
1121 if (!set) { in MYSQLND_METHOD()
1127 set->row_buffers = mnd_emalloc((size_t)(free_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *))); in MYSQLND_METHOD()
1128 if (!set->row_buffers) { in MYSQLND_METHOD()
1134 set->references = 1; in MYSQLND_METHOD()
1156 total_allocated_rows += set->row_count; in MYSQLND_METHOD()
1164 …new_row_buffers = mnd_erealloc(set->row_buffers, (size_t)(total_allocated_rows * sizeof(MYSQLND_ME… in MYSQLND_METHOD()
1170 set->row_buffers = new_row_buffers; in MYSQLND_METHOD()
1173 set->row_buffers[set->row_count] = row_packet->row_buffer; in MYSQLND_METHOD()
1175 set->row_count++; in MYSQLND_METHOD()
1189 if (set->row_count) { in MYSQLND_METHOD()
1191 if (set->row_count * meta->field_count * sizeof(zval *) > SIZE_MAX) { in MYSQLND_METHOD()
1197 set->data = mnd_emalloc((size_t)(set->row_count * meta->field_count * sizeof(zval *))); in MYSQLND_METHOD()
1198 if (!set->data) { in MYSQLND_METHOD()
1203 memset(set->data, 0, (size_t)(set->row_count * meta->field_count * sizeof(zval *))); in MYSQLND_METHOD()
1209 set->row_count); in MYSQLND_METHOD()
1220 if (set->row_count * sizeof(MYSQLND_MEMORY_POOL_CHUNK *) > SIZE_MAX) { in MYSQLND_METHOD()
1225 …set->row_buffers = mnd_erealloc(set->row_buffers, (size_t) (set->row_count * sizeof(MYSQLND_MEMORY… in MYSQLND_METHOD()
1235 COPY_CLIENT_ERROR(set->error_info, row_packet->error_info); in MYSQLND_METHOD()
1238 set->data_cursor = set->data; in MYSQLND_METHOD()
1241 conn->upsert_status->affected_rows = set->row_count; in MYSQLND_METHOD()
1244 …ret == PASS? "PASS":"FAIL", (uint) set->row_count, conn->upsert_status->warning_count, conn->upser… in MYSQLND_METHOD()
1568 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD() local
1572 if ((!result->unbuf && !set)) { in MYSQLND_METHOD()
1582 mysqlnd_array_init(return_value, set? (unsigned int) set->row_count : 4); in MYSQLND_METHOD()