diff options
Diffstat (limited to 'storage/innobase/include/log0recv.h')
-rw-r--r-- | storage/innobase/include/log0recv.h | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 218298a1698..dcdd4bdd8aa 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2010, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -128,7 +128,7 @@ recv_recovery_from_checkpoint_finish should be called later to complete the recovery and free the resources used in it. @return error code or DB_SUCCESS */ UNIV_INTERN -ulint +dberr_t recv_recovery_from_checkpoint_start_func( /*=====================================*/ #ifdef UNIV_LOG_ARCHIVE @@ -212,18 +212,18 @@ UNIV_INTERN void recv_reset_logs( /*============*/ - lsn_t lsn, /*!< in: reset to this lsn - rounded up to be divisible by - OS_FILE_LOG_BLOCK_SIZE, after - which we add - LOG_BLOCK_HDR_SIZE */ #ifdef UNIV_LOG_ARCHIVE ulint arch_log_no, /*!< in: next archived log file number */ -#endif /* UNIV_LOG_ARCHIVE */ - ibool new_logs_created);/*!< in: TRUE if resetting logs + ibool new_logs_created,/*!< in: TRUE if resetting logs is done at the log creation; FALSE if it is done after archive recovery */ +#endif /* UNIV_LOG_ARCHIVE */ + lsn_t lsn); /*!< in: reset to this lsn + rounded up to be divisible by + 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. */ @@ -318,9 +318,7 @@ recv_recovery_from_archive_finish(void); #endif /* UNIV_LOG_ARCHIVE */ /** Block of log record data */ -typedef struct recv_data_struct recv_data_t; -/** Block of log record data */ -struct recv_data_struct{ +struct recv_data_t{ recv_data_t* next; /*!< pointer to the next block or NULL */ /*!< the log record data is stored physically immediately after this struct, max amount @@ -328,9 +326,7 @@ struct recv_data_struct{ }; /** Stored log record struct */ -typedef struct recv_struct recv_t; -/** Stored log record struct */ -struct recv_struct{ +struct recv_t{ byte type; /*!< log record type */ ulint len; /*!< log record body length in bytes */ recv_data_t* data; /*!< chain of blocks containing the log record @@ -347,7 +343,7 @@ struct recv_struct{ rec_list;/*!< list of log records for this page */ }; -/** States of recv_addr_struct */ +/** States of recv_addr_t */ enum recv_addr_state { /** not yet processed */ RECV_NOT_PROCESSED, @@ -361,9 +357,7 @@ enum recv_addr_state { }; /** Hashed page file address struct */ -typedef struct recv_addr_struct recv_addr_t; -/** Hashed page file address struct */ -struct recv_addr_struct{ +struct recv_addr_t{ enum recv_addr_state state; /*!< recovery state of the page */ unsigned space:32;/*!< space id */ @@ -374,13 +368,14 @@ struct recv_addr_struct{ }; /** Recovery system data structure */ -typedef struct recv_sys_struct recv_sys_t; -/** Recovery system data structure */ -struct recv_sys_struct{ +struct recv_sys_t{ #ifndef UNIV_HOTBACKUP - mutex_t mutex; /*!< mutex protecting the fields apply_log_recs, + ib_mutex_t mutex; /*!< mutex protecting the fields apply_log_recs, n_addrs, and the state field in each recv_addr struct */ + ib_mutex_t writer_mutex;/*!< mutex coordinating + flushing between recv_writer_thread and + the recovery thread. */ #endif /* !UNIV_HOTBACKUP */ ibool apply_log_recs; /*!< this is TRUE when log rec application to |