Commit ccd20909 authored by marko's avatar marko

branches/zip: btr_store_big_rec_extern_fields(): Release the uncompressed

page frame to save memory.
parent 82f4ef95
...@@ -3776,7 +3776,6 @@ btr_store_big_rec_extern_fields( ...@@ -3776,7 +3776,6 @@ btr_store_big_rec_extern_fields(
== page_zip_get_size(page_zip)); == page_zip_get_size(page_zip));
memcpy(blob_page_zip->data, page, memcpy(blob_page_zip->data, page,
page_zip_get_size(page_zip)); page_zip_get_size(page_zip));
/* TODO: retain blob_page_zip, release page */
if (err == Z_OK && prev_page_no != FIL_NULL) { if (err == Z_OK && prev_page_no != FIL_NULL) {
...@@ -3823,6 +3822,14 @@ btr_store_big_rec_extern_fields( ...@@ -3823,6 +3822,14 @@ btr_store_big_rec_extern_fields(
mtr_commit(&mtr); mtr_commit(&mtr);
/* Release the uncompressed page frame
to save memory. */
mutex_enter(&buf_pool->mutex);
mutex_enter(&block->mutex);
buf_LRU_free_block(&block->page, FALSE);
mutex_exit(&buf_pool->mutex);
mutex_exit(&block->mutex);
if (err == Z_STREAM_END) { if (err == Z_STREAM_END) {
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment