1 /***************************************************************************** 2 3 Copyright (c) 2016, 2017, 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, version 2.0, as published by the 7 Free Software Foundation. 8 9 This program is also distributed with certain software (including but not 10 limited to OpenSSL) that is licensed under separate terms, as designated in a 11 particular file or component or in included license documentation. The authors 12 of MySQL hereby grant you an additional permission to link the program and 13 your derivative works with the separately licensed software that they have 14 included with MySQL. 15 16 This program is distributed in the hope that it will be useful, but WITHOUT 17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, 19 for more details. 20 21 You should have received a copy of the GNU General Public License along with 22 this program; if not, write to the Free Software Foundation, Inc., 23 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24 25 *****************************************************************************/ 26 #ifndef _mtr0types_h_ 27 #define _mtr0types_h_ 28 29 enum mlog_id_t { 30 /** if the mtr contains only one log record for one page, 31 i.e., write_initial_log_record has been called only once, 32 this flag is ORed to the type of that first log record */ 33 MLOG_SINGLE_REC_FLAG = 128, 34 35 /** one byte is written */ 36 MLOG_1BYTE = 1, 37 38 /** 2 bytes ... */ 39 MLOG_2BYTES = 2, 40 41 /** 4 bytes ... */ 42 MLOG_4BYTES = 4, 43 44 /** 8 bytes ... */ 45 MLOG_8BYTES = 8, 46 47 /** Record insert */ 48 MLOG_REC_INSERT = 9, 49 50 /** Mark clustered index record deleted */ 51 MLOG_REC_CLUST_DELETE_MARK = 10, 52 53 /** Mark secondary index record deleted */ 54 MLOG_REC_SEC_DELETE_MARK = 11, 55 56 /** update of a record, preserves record field sizes */ 57 MLOG_REC_UPDATE_IN_PLACE = 13, 58 59 /*!< Delete a record from a page */ 60 MLOG_REC_DELETE = 14, 61 62 /** Delete record list end on index page */ 63 MLOG_LIST_END_DELETE = 15, 64 65 /** Delete record list start on index page */ 66 MLOG_LIST_START_DELETE = 16, 67 68 /** Copy record list end to a new created index page */ 69 MLOG_LIST_END_COPY_CREATED = 17, 70 71 /** Reorganize an index page in ROW_FORMAT=REDUNDANT */ 72 MLOG_PAGE_REORGANIZE = 18, 73 74 /** Create an index page */ 75 MLOG_PAGE_CREATE = 19, 76 77 /** Insert entry in an undo log */ 78 MLOG_UNDO_INSERT = 20, 79 80 /** erase an undo log page end */ 81 MLOG_UNDO_ERASE_END = 21, 82 83 /** initialize a page in an undo log */ 84 MLOG_UNDO_INIT = 22, 85 86 /* discard an update undo log header (unused already in 3.23.53) */ 87 // MLOG_UNDO_HDR_DISCARD = 23, 88 89 /** reuse an insert undo log header */ 90 MLOG_UNDO_HDR_REUSE = 24, 91 92 /** create an undo log header */ 93 MLOG_UNDO_HDR_CREATE = 25, 94 95 /** mark an index record as the predefined minimum record */ 96 MLOG_REC_MIN_MARK = 26, 97 98 /** initialize an ibuf bitmap page */ 99 MLOG_IBUF_BITMAP_INIT = 27, 100 101 #ifdef UNIV_LOG_LSN_DEBUG 102 /** Current LSN */ 103 MLOG_LSN = 28, 104 #endif /* UNIV_LOG_LSN_DEBUG */ 105 106 /** this means that a file page is taken into use and the prior 107 contents of the page should be ignored: in recovery we must not 108 trust the lsn values stored to the file page. 109 Note: it's deprecated because it causes crash recovery problem 110 in bulk create index, and actually we don't need to reset page 111 lsn in recv_recover_page_func() now. */ 112 MLOG_INIT_FILE_PAGE = 29, 113 114 /** write a string to a page */ 115 MLOG_WRITE_STRING = 30, 116 117 /** If a single mtr writes several log records, this log 118 record ends the sequence of these records */ 119 MLOG_MULTI_REC_END = 31, 120 121 /** dummy log record used to pad a log block full */ 122 MLOG_DUMMY_RECORD = 32, 123 124 /** log record about an .ibd file creation */ 125 // MLOG_FILE_CREATE = 33, 126 127 /** rename databasename/tablename (no .ibd file name suffix) */ 128 // MLOG_FILE_RENAME = 34, 129 130 /** delete a tablespace file that starts with (space_id,page_no) */ 131 MLOG_FILE_DELETE = 35, 132 133 /** mark a compact index record as the predefined minimum record */ 134 MLOG_COMP_REC_MIN_MARK = 36, 135 136 /** create a compact index page */ 137 MLOG_COMP_PAGE_CREATE = 37, 138 139 /** compact record insert */ 140 MLOG_COMP_REC_INSERT = 38, 141 142 /** mark compact clustered index record deleted */ 143 MLOG_COMP_REC_CLUST_DELETE_MARK = 39, 144 145 /** mark compact secondary index record deleted; this log 146 record type is redundant, as MLOG_REC_SEC_DELETE_MARK is 147 independent of the record format. */ 148 MLOG_COMP_REC_SEC_DELETE_MARK = 40, 149 150 /** update of a compact record, preserves record field sizes */ 151 MLOG_COMP_REC_UPDATE_IN_PLACE = 41, 152 153 /** delete a compact record from a page */ 154 MLOG_COMP_REC_DELETE = 42, 155 156 /** delete compact record list end on index page */ 157 MLOG_COMP_LIST_END_DELETE = 43, 158 159 /*** delete compact record list start on index page */ 160 MLOG_COMP_LIST_START_DELETE = 44, 161 162 /** copy compact record list end to a new created index page */ 163 MLOG_COMP_LIST_END_COPY_CREATED = 45, 164 165 /** reorganize an index page */ 166 MLOG_COMP_PAGE_REORGANIZE = 46, 167 168 /** log record about creating an .ibd file, with format */ 169 MLOG_FILE_CREATE2 = 47, 170 171 /** write the node pointer of a record on a compressed 172 non-leaf B-tree page */ 173 MLOG_ZIP_WRITE_NODE_PTR = 48, 174 175 /** write the BLOB pointer of an externally stored column 176 on a compressed page */ 177 MLOG_ZIP_WRITE_BLOB_PTR = 49, 178 179 /** write to compressed page header */ 180 MLOG_ZIP_WRITE_HEADER = 50, 181 182 /** compress an index page */ 183 MLOG_ZIP_PAGE_COMPRESS = 51, 184 185 /** compress an index page without logging it's image */ 186 MLOG_ZIP_PAGE_COMPRESS_NO_DATA = 52, 187 188 /** reorganize a compressed page */ 189 MLOG_ZIP_PAGE_REORGANIZE = 53, 190 191 /** rename a tablespace file that starts with (space_id,page_no) */ 192 MLOG_FILE_RENAME2 = 54, 193 194 /** note the first use of a tablespace file since checkpoint */ 195 MLOG_FILE_NAME = 55, 196 197 /** note that all buffered log was written since a checkpoint */ 198 MLOG_CHECKPOINT = 56, 199 200 /** Create a R-Tree index page */ 201 MLOG_PAGE_CREATE_RTREE = 57, 202 203 /** create a R-tree compact page */ 204 MLOG_COMP_PAGE_CREATE_RTREE = 58, 205 206 /** this means that a file page is taken into use. 207 We use it to replace MLOG_INIT_FILE_PAGE. */ 208 MLOG_INIT_FILE_PAGE2 = 59, 209 210 /** Table is being truncated. (Marked only for file-per-table) */ 211 /* MLOG_TRUNCATE = 60, Disabled for WL6378 */ 212 213 /** notify that an index tree is being loaded without writing 214 redo log about individual pages */ 215 MLOG_INDEX_LOAD = 61, 216 217 /** log for some persistent dynamic metadata change */ 218 MLOG_TABLE_DYNAMIC_META = 62, 219 220 /** create a SDI index page */ 221 MLOG_PAGE_CREATE_SDI = 63, 222 223 /** create a SDI compact page */ 224 MLOG_COMP_PAGE_CREATE_SDI = 64, 225 226 /** biggest value (used in assertions) */ 227 MLOG_BIGGEST_TYPE = MLOG_COMP_PAGE_CREATE_SDI 228 }; 229 #endif // _mtr0types_h_ 230