result->row_packet = NULL;
}
- mysqlnd_mempool_restore_state(result->result_set_memory_pool);
-
DBG_VOID_RETURN;
}
/* }}} */
set->row_buffers = NULL;
}
- mysqlnd_mempool_restore_state(set->result_set_memory_pool);
-
DBG_VOID_RETURN;
}
/* }}} */
DBG_ENTER("mysqlnd_res::free_result_buffers");
DBG_INF_FMT("%s", result->unbuf? "unbuffered":(result->stored_data? "buffered":"unknown"));
+ if (result->meta) {
+ ZEND_ASSERT(zend_arena_contains(result->memory_pool->arena, result->meta));
+ result->meta->m->free_metadata(result->meta);
+ result->meta = NULL;
+ }
+
if (result->unbuf) {
result->unbuf->m.free_result(result->unbuf, result->conn? result->conn->stats : NULL);
result->unbuf = NULL;
result->stored_data = NULL;
}
+ mysqlnd_mempool_restore_state(result->memory_pool);
+ mysqlnd_mempool_save_state(result->memory_pool);
+
DBG_VOID_RETURN;
}
/* }}} */
{
DBG_ENTER("mysqlnd_res::free_result_contents_internal");
- if (result->meta) {
- ZEND_ASSERT(zend_arena_contains(result->memory_pool->arena, result->meta));
- result->meta->m->free_metadata(result->meta);
- result->meta = NULL;
- }
-
result->m.free_result_buffers(result);
DBG_VOID_RETURN;
ret->field_count = field_count;
ret->m = *mysqlnd_result_get_methods();
+ mysqlnd_mempool_save_state(pool);
+
DBG_RETURN(ret);
}
/* }}} */
DBG_ENTER("mysqlnd_result_unbuffered_init");
- mysqlnd_mempool_save_state(pool);
ret = pool->get_chunk(pool, alloc_size);
memset(ret, 0, alloc_size);
DBG_ENTER("mysqlnd_result_buffered_zval_init");
- mysqlnd_mempool_save_state(pool);
ret = pool->get_chunk(pool, alloc_size);
memset(ret, 0, alloc_size);
if (FAIL == mysqlnd_error_info_init(&ret->error_info, 0)) {
- mysqlnd_mempool_restore_state(pool);
DBG_RETURN(NULL);
}
DBG_ENTER("mysqlnd_result_buffered_c_init");
- mysqlnd_mempool_save_state(pool);
ret = pool->get_chunk(pool, alloc_size);
memset(ret, 0, alloc_size);
if (FAIL == mysqlnd_error_info_init(&ret->error_info, 0)) {
- mysqlnd_mempool_restore_state(pool);
DBG_RETURN(NULL);
}