Commit 535b4ccb authored by Sergey Vojtovich's avatar Sergey Vojtovich

Applying InnoDB snapshot

Detailed revision comments:

r6463 | marko | 2010-01-14 15:43:37 +0200 (Thu, 14 Jan 2010) | 5 lines
branches/zip: page_copy_rec_list_end(), page_copy_rec_list_start():
Update PAGE_MAX_TRX_ID before attempting to compress the page.  This
fixes Issue #382 (a debug assertion failure in page_zip_reorganize())
and reduces the generated redo log.  There was no bug or crash in
non-debug builds.
parent 16925618
......@@ -658,6 +658,14 @@ page_copy_rec_list_end(
index, mtr);
}
/* Update PAGE_MAX_TRX_ID on the uncompressed page.
Modifications will be redo logged and copied to the compressed
page in page_zip_compress() or page_zip_reorganize() below. */
if (dict_index_is_sec_or_ibuf(index) && page_is_leaf(page)) {
page_update_max_trx_id(new_block, NULL,
page_get_max_trx_id(page), mtr);
}
if (UNIV_LIKELY_NULL(new_page_zip)) {
mtr_set_log_mode(mtr, log_mode);
......@@ -696,15 +704,10 @@ page_copy_rec_list_end(
}
}
/* Update the lock table, MAX_TRX_ID, and possible hash index */
/* Update the lock table and possible hash index */
lock_move_rec_list_end(new_block, block, rec);
if (dict_index_is_sec_or_ibuf(index) && page_is_leaf(page)) {
page_update_max_trx_id(new_block, new_page_zip,
page_get_max_trx_id(page), mtr);
}
btr_search_move_or_delete_hash_entries(new_block, block, index);
return(ret);
......@@ -772,6 +775,16 @@ page_copy_rec_list_start(
mem_heap_free(heap);
}
/* Update PAGE_MAX_TRX_ID on the uncompressed page.
Modifications will be redo logged and copied to the compressed
page in page_zip_compress() or page_zip_reorganize() below. */
if (dict_index_is_sec_or_ibuf(index)
&& page_is_leaf(page_align(rec))) {
page_update_max_trx_id(new_block, NULL,
page_get_max_trx_id(page_align(rec)),
mtr);
}
if (UNIV_LIKELY_NULL(new_page_zip)) {
mtr_set_log_mode(mtr, log_mode);
......@@ -809,14 +822,7 @@ page_copy_rec_list_start(
}
}
/* Update MAX_TRX_ID, the lock table, and possible hash index */
if (dict_index_is_sec_or_ibuf(index)
&& page_is_leaf(page_align(rec))) {
page_update_max_trx_id(new_block, new_page_zip,
page_get_max_trx_id(page_align(rec)),
mtr);
}
/* Update the lock table and possible hash index */
lock_move_rec_list_start(new_block, block, rec, ret);
......
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