D.S

dev.mysql.com

MySQL: storage/innobase/include/log0recv.h Source File

MySQL: storage/innobase/include/log0recv.h Source File MySQL  8.0.0 Source Code Documentation Main Page Related Pages Modules Namespaces Classes Files File List File Members log0recv.h Go to the documentation of this file. 1 /***************************************************************************** 2  3 Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. 4  5 This program is free software; you can redistribute it and/or modify it under 6 the terms of the GNU General Public License as published by the Free Software 7 Foundation; version 2 of the License. 8  9 This program is distributed in the hope that it will be useful, but WITHOUT 10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12  13 You should have received a copy of the GNU General Public License along with 14 this program; if not, write to the Free Software Foundation, Inc., 15 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA 16  17 *****************************************************************************/ 18  19 /**************************************************//** 20 @file include/log0recv.h 21 Recovery 22  23 Created 9/20/1997 Heikki Tuuri 24 *******************************************************/ 25  26 #ifndef log0recv_h 27 #define log0recv_h 28  29 #include "univ.i" 30 #include " ut0byte.h " 31 #include " buf0types.h " 32 #include " dict0types.h " 33 #include " hash0hash.h " 34 #include " log0log.h " 35 #include " mtr0types.h " 36 #include " ut0new.h " 37  38 #include <list> 39 #include <vector> 40 #include <map> 41  42 class MetadataRecover ; 43 class PersistentTableMetadata ; 44  45 #ifdef UNIV_HOTBACKUP 46 extern bool recv_replay_file_ops; 47  48 /*******************************************************************//** 49 Reads the checkpoint info needed in hot backup. 50 @return TRUE if success */ 51 ibool 52 recv_read_checkpoint_info_for_backup( 53 /*=================================*/ 54  const byte* hdr, /*!< in: buffer containing the log group 55  header */ 56  lsn_t * lsn, /*!< out: checkpoint lsn */ 57  lsn_t * offset, /*!< out: checkpoint offset in the log group */ 58  lsn_t * cp_no, /*!< out: checkpoint number */ 59  lsn_t * first_header_lsn); 60  /*!< out: lsn of of the start of the 61  first log file */ 62 /*******************************************************************//** 63 Scans the log segment and n_bytes_scanned is set to the length of valid 64 log scanned. */ 65 void 66 recv_scan_log_seg_for_backup( 67 /*=========================*/ 68  byte* buf, /*!< in: buffer containing log data */ 69  ulint buf_len, /*!< in: data length in that buffer */ 70  lsn_t * scanned_lsn, /*!< in/out: lsn of buffer start, 71  we return scanned lsn */ 72  ulint* scanned_checkpoint_no, 73  /*!< in/out: 4 lowest bytes of the 74  highest scanned checkpoint number so 75  far */ 76  ulint* n_bytes_scanned);/*!< out: how much we were able to 77  scan, smaller than buf_len if log 78  data ended here */ 79 #endif /* UNIV_HOTBACKUP */ 80 /*******************************************************************//** 81 Returns TRUE if recovery is currently running. 82 @return recv_recovery_on */ 83 UNIV_INLINE 84 bool 85  recv_recovery_is_on (void); 86 /*=====================*/ 87 /************************************************************************//** 88 Applies the hashed log records to the page, if the page lsn is less than the 89 lsn of a log record. This can be called when a buffer page has just been 90 read in, or also for a page already in the buffer pool. */ 91 void 92  recv_recover_page_func ( 93 /*===================*/ 94 #ifndef UNIV_HOTBACKUP 95  ibool just_read_in, 96  /*!< in: TRUE if the i/o handler calls 97  this for a freshly read page */ 98 #endif /* !UNIV_HOTBACKUP */ 99  buf_block_t * block); /*!< in/out: buffer block */ 100 #ifndef UNIV_HOTBACKUP 101 /** Wrapper for recv_recover_page_func(). 102 Applies the hashed log records to the page, if the page lsn is less than the 103 lsn of a log record. This can be called when a buffer page has just been 104 read in, or also for a page already in the buffer pool. 105 @param jri in: TRUE if just read in (the i/o handler calls this for 106 a freshly read page) 107 @param block in/out: the buffer block 108 */ 109  # define recv_recover_page(jri, block) recv_recover_page_func(jri, block) 110 #else /* !UNIV_HOTBACKUP */ 111 /** Wrapper for recv_recover_page_func(). 112 Applies the hashed log records to the page, if the page lsn is less than the 113 lsn of a log record. This can be called when a buffer page has just been 114 read in, or also for a page already in the buffer pool. 115 @param jri in: TRUE if just read in (the i/o handler calls this for 116 a freshly read page) 117 @param block in/out: the buffer block 118 */ 119 # define recv_recover_page(jri, block) recv_recover_page_func(block) 120 #endif /* !UNIV_HOTBACKUP */ 121 /** Start re