Lines Matching refs:set

198 MYSQLND_METHOD(mysqlnd_result_buffered_zval, free_result)(MYSQLND_RES_BUFFERED_ZVAL * const set)  in MYSQLND_METHOD()
200 zval * data = set->data; in MYSQLND_METHOD()
204 set->data = NULL; /* prevent double free if following loop is interrupted */ in MYSQLND_METHOD()
206 const unsigned int field_count = set->field_count; in MYSQLND_METHOD()
209 for (row = set->row_count - 1; row >= 0; row--) { in MYSQLND_METHOD()
221 set->data_cursor = NULL; in MYSQLND_METHOD()
229 MYSQLND_METHOD(mysqlnd_result_buffered_c, free_result)(MYSQLND_RES_BUFFERED_C * const set) in MYSQLND_METHOD()
232 mnd_efree(set->initialized); in MYSQLND_METHOD()
233 set->initialized = NULL; in MYSQLND_METHOD()
241 MYSQLND_METHOD(mysqlnd_result_buffered, free_result)(MYSQLND_RES_BUFFERED * const set) in MYSQLND_METHOD()
245 DBG_INF_FMT("Freeing "PRIu64" row(s)", set->row_count); in MYSQLND_METHOD()
247 mysqlnd_error_info_free_contents(&set->error_info); in MYSQLND_METHOD()
249 if (set->type == MYSQLND_BUFFERED_TYPE_ZVAL) { in MYSQLND_METHOD()
250 MYSQLND_METHOD(mysqlnd_result_buffered_zval, free_result)((MYSQLND_RES_BUFFERED_ZVAL *) set); in MYSQLND_METHOD()
251 } if (set->type == MYSQLND_BUFFERED_TYPE_C) { in MYSQLND_METHOD()
252 MYSQLND_METHOD(mysqlnd_result_buffered_c, free_result)((MYSQLND_RES_BUFFERED_C *) set); in MYSQLND_METHOD()
255 if (set->row_buffers) { in MYSQLND_METHOD()
256 mnd_efree(set->row_buffers); in MYSQLND_METHOD()
257 set->row_buffers = NULL; in MYSQLND_METHOD()
573 const MYSQLND_RES_BUFFERED_ZVAL * const set = (const MYSQLND_RES_BUFFERED_ZVAL *) result; in MYSQLND_METHOD() local
582 if (set->data_cursor == NULL || in MYSQLND_METHOD()
583 set->data_cursor == set->data || in MYSQLND_METHOD()
584 ((set->data_cursor - set->data) > (result->row_count * result->field_count) )) in MYSQLND_METHOD()
605 const MYSQLND_RES_BUFFERED_C * const set = (const MYSQLND_RES_BUFFERED_C *) result; in MYSQLND_METHOD() local
608 if (set->current_row > set->row_count || set->current_row == 0) { in MYSQLND_METHOD()
975 MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result->stored_data; in MYSQLND_METHOD() local
978 if (set->data_cursor && in MYSQLND_METHOD()
979 (set->data_cursor - set->data) < (result->stored_data->row_count * field_count)) in MYSQLND_METHOD()
981 zval *current_row = set->data_cursor; in MYSQLND_METHOD()
985 uint64_t row_num = (set->data_cursor - set->data) / field_count; in MYSQLND_METHOD()
986 enum_func_status rc = set->m.row_decoder(&set->row_buffers[row_num], in MYSQLND_METHOD()
995 ++set->initialized_rows; in MYSQLND_METHOD()
1018 set->lengths[i] = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0; in MYSQLND_METHOD()
1027 set->data_cursor += field_count; in MYSQLND_METHOD()
1037 set->data_cursor = NULL; in MYSQLND_METHOD()
1064 MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result->stored_data; in MYSQLND_METHOD() local
1070 if (set->data_cursor && (set->data_cursor - set->data) < (set->row_count * field_count)) { in MYSQLND_METHOD()
1072 zval *current_row = set->data_cursor; in MYSQLND_METHOD()
1075 const size_t row_num = (set->data_cursor - set->data) / field_count; in MYSQLND_METHOD()
1076 enum_func_status rc = set->m.row_decoder(&set->row_buffers[row_num], in MYSQLND_METHOD()
1085 ++set->initialized_rows; in MYSQLND_METHOD()
1104 set->lengths[i] = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0; in MYSQLND_METHOD()
1127 set->data_cursor += field_count; in MYSQLND_METHOD()
1132 set->data_cursor = NULL; in MYSQLND_METHOD()
1153 MYSQLND_RES_BUFFERED_C * set = (MYSQLND_RES_BUFFERED_C *) result->stored_data; in MYSQLND_METHOD() local
1158 if (set->current_row < set->row_count) { in MYSQLND_METHOD()
1169 rc = result->stored_data->m.row_decoder(&result->stored_data->row_buffers[set->current_row], in MYSQLND_METHOD()
1178 if (!ZEND_BIT_TEST(set->initialized, set->current_row)) { in MYSQLND_METHOD()
1179 set->initialized[set->current_row >> 3] |= (1 << (set->current_row & 7)); /* mark initialized */ in MYSQLND_METHOD()
1181 ++set->initialized_rows; in MYSQLND_METHOD()
1201 set->lengths[i] = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0; in MYSQLND_METHOD()
1232 ++set->current_row; in MYSQLND_METHOD()
1237 if (set->current_row == set->row_count) { in MYSQLND_METHOD()
1238 set->current_row = set->row_count + 1; in MYSQLND_METHOD()
1240 DBG_INF_FMT("EOF reached. current_row=%llu", (unsigned long long) set->current_row); in MYSQLND_METHOD()
1275 MYSQLND_RES_BUFFERED * set = result->stored_data; in MYSQLND_METHOD() local
1279 if (!set || !row_buffers) { in MYSQLND_METHOD()
1287 set->references = 1; in MYSQLND_METHOD()
1332 (*row_buffers)[set->row_count] = row_packet.row_buffer; in MYSQLND_METHOD()
1334 set->row_count++; in MYSQLND_METHOD()
1351 set->row_count); in MYSQLND_METHOD()
1370 if (set->row_count * sizeof(MYSQLND_ROW_BUFFER) > SIZE_MAX) { in MYSQLND_METHOD()
1375 *row_buffers = mnd_erealloc(*row_buffers, (size_t) (set->row_count * sizeof(MYSQLND_ROW_BUFFER))); in MYSQLND_METHOD()
1385 COPY_CLIENT_ERROR(&set->error_info, row_packet.error_info); in MYSQLND_METHOD()
1388 UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count); in MYSQLND_METHOD()
1392 (uint32_t) set->row_count, in MYSQLND_METHOD()
1449 MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result->stored_data; in MYSQLND_METHOD() local
1451 if (set->row_count) { in MYSQLND_METHOD()
1453 if (set->row_count * meta->field_count * sizeof(zval *) > SIZE_MAX) { in MYSQLND_METHOD()
1458 set->data = mnd_emalloc((size_t)(set->row_count * meta->field_count * sizeof(zval))); in MYSQLND_METHOD()
1459 if (!set->data) { in MYSQLND_METHOD()
1463 memset(set->data, 0, (size_t)(set->row_count * meta->field_count * sizeof(zval))); in MYSQLND_METHOD()
1466 set->data_cursor = set->data; in MYSQLND_METHOD()
1468 MYSQLND_RES_BUFFERED_C * set = (MYSQLND_RES_BUFFERED_C *) result->stored_data; in MYSQLND_METHOD() local
1469 set->current_row = 0; in MYSQLND_METHOD()
1470set->initialized = mnd_ecalloc((unsigned int) ((set->row_count / 8) + 1), sizeof(zend_uchar)); /* … in MYSQLND_METHOD()
1543 MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result; in MYSQLND_METHOD() local
1547 if (row >= set->row_count) { in MYSQLND_METHOD()
1548 set->data_cursor = NULL; in MYSQLND_METHOD()
1550 set->data_cursor = set->data + row * result->field_count; in MYSQLND_METHOD()
1561 MYSQLND_RES_BUFFERED_C * set = (MYSQLND_RES_BUFFERED_C *) result; in MYSQLND_METHOD() local
1565 if (row >= set->row_count) { in MYSQLND_METHOD()
1566 set->current_row = set->row_count; in MYSQLND_METHOD()
1568 set->current_row = row; in MYSQLND_METHOD()
1804 MYSQLND_RES_BUFFERED *set = result->stored_data; in MYSQLND_METHOD() local
1808 if ((!result->unbuf && !set)) { in MYSQLND_METHOD()
1818 array_init_size(return_value, set? (unsigned int) set->row_count : 4); in MYSQLND_METHOD()