Commit b857a02b authored by marko's avatar marko

branches/zip: page_zip_reorganize(): On success, write to the redo log.

parent 97c78130
...@@ -271,6 +271,7 @@ page_zip_write_header( ...@@ -271,6 +271,7 @@ page_zip_write_header(
/************************************************************************** /**************************************************************************
Reorganize and compress a page. This is a low-level operation for Reorganize and compress a page. This is a low-level operation for
compressed pages, to be used when page_zip_compress() fails. compressed pages, to be used when page_zip_compress() fails.
On success, a redo log entry MLOG_ZIP_PAGE_COMPRESS will be written.
The function btr_page_reorganize() should be preferred whenever possible. */ The function btr_page_reorganize() should be preferred whenever possible. */
ibool ibool
......
...@@ -3028,6 +3028,7 @@ page_zip_write_header_log( ...@@ -3028,6 +3028,7 @@ page_zip_write_header_log(
/************************************************************************** /**************************************************************************
Reorganize and compress a page. This is a low-level operation for Reorganize and compress a page. This is a low-level operation for
compressed pages, to be used when page_zip_compress() fails. compressed pages, to be used when page_zip_compress() fails.
On success, a redo log entry MLOG_ZIP_PAGE_COMPRESS will be written.
The function btr_page_reorganize() should be preferred whenever possible. */ The function btr_page_reorganize() should be preferred whenever possible. */
ibool ibool
...@@ -3072,13 +3073,15 @@ page_zip_reorganize( ...@@ -3072,13 +3073,15 @@ page_zip_reorganize(
/* Copy max trx id to recreated page */ /* Copy max trx id to recreated page */
page_set_max_trx_id(page, NULL, page_get_max_trx_id(temp_page)); page_set_max_trx_id(page, NULL, page_get_max_trx_id(temp_page));
/* Restore logging. */
mtr_set_log_mode(mtr, log_mode);
if (UNIV_UNLIKELY(!page_zip_compress(page_zip, page, index, mtr))) { if (UNIV_UNLIKELY(!page_zip_compress(page_zip, page, index, mtr))) {
/* Restore the old page and exit. */ /* Restore the old page and exit. */
buf_frame_copy(page, temp_page); buf_frame_copy(page, temp_page);
buf_frame_free(temp_page); buf_frame_free(temp_page);
mtr_set_log_mode(mtr, log_mode);
return(FALSE); return(FALSE);
} }
...@@ -3086,7 +3089,6 @@ page_zip_reorganize( ...@@ -3086,7 +3089,6 @@ page_zip_reorganize(
btr_search_drop_page_hash_index(page); btr_search_drop_page_hash_index(page);
buf_frame_free(temp_page); buf_frame_free(temp_page);
mtr_set_log_mode(mtr, log_mode);
return(TRUE); return(TRUE);
} }
......
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