mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
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.
This commit is contained in:
parent
cd7d82f2e3
commit
b55e79910c
1 changed files with 20 additions and 14 deletions
|
@ -658,6 +658,14 @@ page_copy_rec_list_end(
|
||||||
index, mtr);
|
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)) {
|
if (UNIV_LIKELY_NULL(new_page_zip)) {
|
||||||
mtr_set_log_mode(mtr, log_mode);
|
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);
|
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);
|
btr_search_move_or_delete_hash_entries(new_block, block, index);
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
|
@ -772,6 +775,16 @@ page_copy_rec_list_start(
|
||||||
mem_heap_free(heap);
|
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)) {
|
if (UNIV_LIKELY_NULL(new_page_zip)) {
|
||||||
mtr_set_log_mode(mtr, log_mode);
|
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 */
|
/* Update 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
lock_move_rec_list_start(new_block, block, rec, ret);
|
lock_move_rec_list_start(new_block, block, rec, ret);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue