diff options
Diffstat (limited to 'storage/innobase/include/log0recv.h')
-rw-r--r-- | storage/innobase/include/log0recv.h | 117 |
1 files changed, 8 insertions, 109 deletions
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index bd7118654f3..a9d98b08d85 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -37,83 +37,16 @@ Created 9/20/1997 Heikki Tuuri #include <list> #include <vector> -#ifdef UNIV_HOTBACKUP -extern bool recv_replay_file_ops; +/** @return whether recovery is currently running. */ +#define recv_recovery_is_on() recv_recovery_on -/*******************************************************************//** -Reads the checkpoint info needed in hot backup. -@return TRUE if success */ -ibool -recv_read_checkpoint_info_for_backup( -/*=================================*/ - const byte* hdr, /*!< in: buffer containing the log group - header */ - lsn_t* lsn, /*!< out: checkpoint lsn */ - lsn_t* offset, /*!< out: checkpoint offset in the log group */ - lsn_t* cp_no, /*!< out: checkpoint number */ - lsn_t* first_header_lsn) - /*!< out: lsn of of the start of the - first log file */ - MY_ATTRIBUTE((nonnull)); -/*******************************************************************//** -Scans the log segment and n_bytes_scanned is set to the length of valid -log scanned. */ -void -recv_scan_log_seg_for_backup( -/*=========================*/ - byte* buf, /*!< in: buffer containing log data */ - ulint buf_len, /*!< in: data length in that buffer */ - lsn_t* scanned_lsn, /*!< in/out: lsn of buffer start, - we return scanned lsn */ - ulint* scanned_checkpoint_no, - /*!< in/out: 4 lowest bytes of the - highest scanned checkpoint number so - far */ - ulint* n_bytes_scanned);/*!< out: how much we were able to - scan, smaller than buf_len if log - data ended here */ -#endif /* UNIV_HOTBACKUP */ -/*******************************************************************//** -Returns TRUE if recovery is currently running. -@return recv_recovery_on */ -UNIV_INLINE -bool -recv_recovery_is_on(void); -/*=====================*/ -/************************************************************************//** -Applies the hashed log records to the page, if the page lsn is less than the -lsn of a log record. This can be called when a buffer page has just been -read in, or also for a page already in the buffer pool. */ +/** Apply the hashed log records to the page, if the page lsn is less than the +lsn of a log record. +@param just_read_in whether the page recently arrived to the I/O handler +@param block the page in the buffer pool */ void -recv_recover_page_func( -/*===================*/ -#ifndef UNIV_HOTBACKUP - ibool just_read_in, - /*!< in: TRUE if the i/o handler calls - this for a freshly read page */ -#endif /* !UNIV_HOTBACKUP */ - buf_block_t* block); /*!< in/out: buffer block */ -#ifndef UNIV_HOTBACKUP -/** Wrapper for recv_recover_page_func(). -Applies the hashed log records to the page, if the page lsn is less than the -lsn of a log record. This can be called when a buffer page has just been -read in, or also for a page already in the buffer pool. -@param jri in: TRUE if just read in (the i/o handler calls this for -a freshly read page) -@param block in/out: the buffer block -*/ -# define recv_recover_page(jri, block) recv_recover_page_func(jri, block) -#else /* !UNIV_HOTBACKUP */ -/** Wrapper for recv_recover_page_func(). -Applies the hashed log records to the page, if the page lsn is less than the -lsn of a log record. This can be called when a buffer page has just been -read in, or also for a page already in the buffer pool. -@param jri in: TRUE if just read in (the i/o handler calls this for -a freshly read page) -@param block in/out: the buffer block -*/ -# define recv_recover_page(jri, block) recv_recover_page_func(block) -#endif /* !UNIV_HOTBACKUP */ +recv_recover_page(bool just_read_in, buf_block_t* block); + /** Start recovering from a redo log checkpoint. @see recv_recovery_from_checkpoint_finish @param[in] flush_lsn FIL_PAGE_FILE_FLUSH_LSN @@ -140,18 +73,6 @@ recv_reset_logs( OS_FILE_LOG_BLOCK_SIZE, after which we add LOG_BLOCK_HDR_SIZE */ -#ifdef UNIV_HOTBACKUP -/******************************************************//** -Creates new log files after a backup has been restored. */ -void -recv_reset_log_files_for_backup( -/*============================*/ - const char* log_dir, /*!< in: log file directory path */ - ulint n_log_files, /*!< in: number of log files */ - lsn_t log_file_size, /*!< in: log file size */ - lsn_t lsn); /*!< in: new start lsn, must be - divisible by OS_FILE_LOG_BLOCK_SIZE */ -#endif /* UNIV_HOTBACKUP */ /********************************************************//** Creates the recovery system. */ void @@ -173,7 +94,6 @@ void recv_sys_init( /*==========*/ ulint available_memory); /*!< in: available memory in bytes */ -#ifndef UNIV_HOTBACKUP /********************************************************//** Frees the recovery system. */ void @@ -184,7 +104,6 @@ Reset the state of the recovery system variables. */ void recv_sys_var_init(void); /*===================*/ -#endif /* !UNIV_HOTBACKUP */ /*******************************************************************//** Empties the hash table of stored log records, applying them to appropriate pages. */ @@ -200,14 +119,6 @@ recv_apply_hashed_log_recs( can be generated during the application */ __attribute__((warn_unused_result)); -#ifdef UNIV_HOTBACKUP -/*******************************************************************//** -Applies log records in the hash table to a backup. */ -void -recv_apply_log_recs_for_backup(void); -/*================================*/ -#endif /* UNIV_HOTBACKUP */ - /** Block of log record data */ struct recv_data_t{ recv_data_t* next; /*!< pointer to the next block or NULL */ @@ -291,7 +202,6 @@ typedef std::vector<recv_encryption_t, ut_allocator<recv_encryption_t> > /** Recovery system data structure */ struct recv_sys_t{ -#ifndef UNIV_HOTBACKUP ib_mutex_t mutex; /*!< mutex protecting the fields apply_log_recs, n_addrs, and the state field in each recv_addr struct */ @@ -305,7 +215,6 @@ struct recv_sys_t{ buf_flush_t flush_type;/*!< type of the flush request. BUF_FLUSH_LRU: flush end of LRU, keeping free blocks. BUF_FLUSH_LIST: flush all of blocks. */ -#endif /* !UNIV_HOTBACKUP */ ibool apply_log_recs; /*!< this is TRUE when log rec application to pages is allowed; this flag tells the @@ -391,15 +300,9 @@ extern bool recv_no_log_write; number (FIL_PAGE_LSN) is in the future. Initially FALSE, and set by recv_recovery_from_checkpoint_start(). */ extern bool recv_lsn_checks_on; -#ifdef UNIV_HOTBACKUP -/** TRUE when the redo log is being backed up */ -extern bool recv_is_making_a_backup; -#endif /* UNIV_HOTBACKUP */ -#ifndef UNIV_HOTBACKUP /** Flag indicating if recv_writer thread is active. */ extern volatile bool recv_writer_thread_active; -#endif /* !UNIV_HOTBACKUP */ /** Size of the parsing buffer; it must accommodate RECV_SCAN_SIZE many times! */ @@ -424,8 +327,4 @@ log_block_checksum_is_ok( const byte* block, /*!< in: pointer to a log block */ bool print_err); /*!< in print error ? */ -#ifndef UNIV_NONINL -#include "log0recv.ic" -#endif - #endif |