mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
MDEV-12353: Replace MLOG_*LIST_*_DELETE and MLOG_*REC_DELETE
No longer write the following redo log records: MLOG_COMP_LIST_END_DELETE, MLOG_LIST_END_DELETE, MLOG_COMP_LIST_START_DELETE, MLOG_LIST_START_DELETE, MLOG_REC_DELETE,MLOG_COMP_REC_DELETE. Each individual deleted record will be logged separately using physical log records. page_dir_slot_set_n_owned(), page_zip_rec_set_owned(), page_zip_dir_delete(), page_zip_clear_rec(): Add the parameter mtr, and write redo log. page_dir_slot_set_rec(): Remove. Replaced with lower-level operations that write redo log when necessary. page_rec_set_n_owned(): Replaces rec_set_n_owned_old(), rec_set_n_owned_new(). rec_set_heap_no(): Replaces rec_set_heap_no_old(), rec_set_heap_no_new(). page_mem_free(), page_dir_split_slot(), page_dir_balance_slot(): Add the parameter mtr. page_dir_set_n_slots(): Merge with the caller page_dir_split_slot(). page_dir_slot_set_rec(): Merge with the callers page_dir_split_slot() and page_dir_balance_slot(). page_cur_insert_rec_low(), page_cur_insert_rec_zip(): Suppress the logging of lower-level operations. page_cur_delete_rec_write_log(): Remove. page_cur_delete_rec(): Do not tolerate mtr=NULL. rec_convert_dtuple_to_rec_old(), rec_convert_dtuple_to_rec_comp(): Replace rec_set_heap_no_old() and rec_set_heap_no_new() with direct access that does not involve redo logging. mtr_t::memcpy(): Do allow non-redo-logged writes to uncompressed pages of ROW_FORMAT=COMPRESSED pages. buf_page_io_complete(): Evict the uncompressed page of a ROW_FORMAT=COMPRESSED page after recovery. Because we no longer write logical log records for deleting index records, but instead write physical records that may refer directly to the compressed page frame of a ROW_FORMAT=COMPRESSED page, and because on recovery we will only apply the changes to the ROW_FORMAT=COMPRESSED page, the uncompressed page frame can be stale until page_zip_decompress() is executed. recv_parse_or_apply_log_rec_body(): After applying MLOG_ZIP_WRITE_STRING, ensure that the FIL_PAGE_TYPE of the uncompressed page matches the compressed page, because buf_flush_init_for_writing() assumes that field to be valid. mlog_init_t::mark_ibuf_exist(): Invoke page_zip_decompress(), because the uncompressed page after buf_page_create() is not necessarily up to date. buf_LRU_block_remove_hashed(): Bypass a page_zip_validate() check during redo log apply. recv_apply_hashed_log_recs(): Invoke mlog_init.mark_ibuf_exist() also for the last batch, to ensure that page_zip_decompress() will be called for freshly initialized pages.
This commit is contained in:
parent
d00185c40d
commit
2a77b2a510
18 changed files with 615 additions and 561 deletions
|
|
@ -503,19 +503,6 @@ rec_get_n_owned_old(
|
|||
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT));
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to set the number of owned records. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
rec_set_n_owned_old(
|
||||
/*================*/
|
||||
rec_t* rec, /*!< in: old-style physical record */
|
||||
ulint n_owned) /*!< in: the number of owned */
|
||||
{
|
||||
rec_set_bit_field_1(rec, n_owned, REC_OLD_N_OWNED,
|
||||
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT);
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to get the number of records owned by the
|
||||
previous directory record.
|
||||
|
|
@ -530,23 +517,6 @@ rec_get_n_owned_new(
|
|||
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT));
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to set the number of owned records. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
rec_set_n_owned_new(
|
||||
/*================*/
|
||||
rec_t* rec, /*!< in/out: new-style physical record */
|
||||
page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
|
||||
ulint n_owned)/*!< in: the number of owned */
|
||||
{
|
||||
rec_set_bit_field_1(rec, n_owned, REC_NEW_N_OWNED,
|
||||
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT);
|
||||
if (page_zip && rec_get_status(rec) != REC_STATUS_SUPREMUM) {
|
||||
page_zip_rec_set_owned(page_zip, rec, n_owned);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to retrieve the info bits of a record.
|
||||
@return info bits */
|
||||
|
|
@ -674,20 +644,6 @@ rec_get_heap_no_old(
|
|||
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT));
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to set the heap number
|
||||
field in an old-style record. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
rec_set_heap_no_old(
|
||||
/*================*/
|
||||
rec_t* rec, /*!< in: physical record */
|
||||
ulint heap_no)/*!< in: the heap number */
|
||||
{
|
||||
rec_set_bit_field_2(rec, heap_no, REC_OLD_HEAP_NO,
|
||||
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT);
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to get the order number
|
||||
of a new-style record in the heap of the index page.
|
||||
|
|
@ -702,20 +658,6 @@ rec_get_heap_no_new(
|
|||
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT));
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to set the heap number
|
||||
field in a new-style record. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
rec_set_heap_no_new(
|
||||
/*================*/
|
||||
rec_t* rec, /*!< in/out: physical record */
|
||||
ulint heap_no)/*!< in: the heap number */
|
||||
{
|
||||
rec_set_bit_field_2(rec, heap_no, REC_NEW_HEAP_NO,
|
||||
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT);
|
||||
}
|
||||
|
||||
/******************************************************//**
|
||||
The following function is used to test whether the data offsets in the record
|
||||
are stored in one-byte or two-byte format.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue