@@ -1089,82 +1089,7 @@ recv_parse_or_apply_log_rec_body(
1089
1089
break ;
1090
1090
#endif /* UNIV_LOG_LSN_DEBUG */
1091
1091
case MLOG_1BYTE: case MLOG_2BYTES: case MLOG_4BYTES: case MLOG_8BYTES:
1092
- #ifdef UNIV_DEBUG
1093
- if (page && page_type == FIL_PAGE_TYPE_ALLOCATED
1094
- && end_ptr >= ptr + 2 ) {
1095
- /* It is OK to set FIL_PAGE_TYPE and certain
1096
- list node fields on an empty page. Any other
1097
- write is not OK. */
1098
-
1099
- /* NOTE: There may be bogus assertion failures for
1100
- dict_hdr_create(), trx_rseg_header_create(),
1101
- trx_sys_create_doublewrite_buf(), and
1102
- trx_sysf_create().
1103
- These are only called during database creation. */
1104
- ulint offs = mach_read_from_2 (ptr);
1105
-
1106
- switch (type) {
1107
- default :
1108
- ut_error;
1109
- case MLOG_2BYTES:
1110
- /* Note that this can fail when the
1111
- redo log been written with something
1112
- older than InnoDB Plugin 1.0.4. */
1113
- ut_ad (offs == FIL_PAGE_TYPE
1114
- || offs == IBUF_TREE_SEG_HEADER
1115
- + IBUF_HEADER + FSEG_HDR_OFFSET
1116
- || offs == PAGE_BTR_IBUF_FREE_LIST
1117
- + PAGE_HEADER + FIL_ADDR_BYTE
1118
- || offs == PAGE_BTR_IBUF_FREE_LIST
1119
- + PAGE_HEADER + FIL_ADDR_BYTE
1120
- + FIL_ADDR_SIZE
1121
- || offs == PAGE_BTR_SEG_LEAF
1122
- + PAGE_HEADER + FSEG_HDR_OFFSET
1123
- || offs == PAGE_BTR_SEG_TOP
1124
- + PAGE_HEADER + FSEG_HDR_OFFSET
1125
- || offs == PAGE_BTR_IBUF_FREE_LIST_NODE
1126
- + PAGE_HEADER + FIL_ADDR_BYTE
1127
- + 0 /* FLST_PREV*/
1128
- || offs == PAGE_BTR_IBUF_FREE_LIST_NODE
1129
- + PAGE_HEADER + FIL_ADDR_BYTE
1130
- + FIL_ADDR_SIZE /* FLST_NEXT*/ );
1131
- break ;
1132
- case MLOG_4BYTES:
1133
- /* Note that this can fail when the
1134
- redo log been written with something
1135
- older than InnoDB Plugin 1.0.4. */
1136
- ut_ad (0
1137
- || offs == IBUF_TREE_SEG_HEADER
1138
- + IBUF_HEADER + FSEG_HDR_SPACE
1139
- || offs == IBUF_TREE_SEG_HEADER
1140
- + IBUF_HEADER + FSEG_HDR_PAGE_NO
1141
- || offs == PAGE_BTR_IBUF_FREE_LIST
1142
- + PAGE_HEADER/* flst_init */
1143
- || offs == PAGE_BTR_IBUF_FREE_LIST
1144
- + PAGE_HEADER + FIL_ADDR_PAGE
1145
- || offs == PAGE_BTR_IBUF_FREE_LIST
1146
- + PAGE_HEADER + FIL_ADDR_PAGE
1147
- + FIL_ADDR_SIZE
1148
- || offs == PAGE_BTR_SEG_LEAF
1149
- + PAGE_HEADER + FSEG_HDR_PAGE_NO
1150
- || offs == PAGE_BTR_SEG_LEAF
1151
- + PAGE_HEADER + FSEG_HDR_SPACE
1152
- || offs == PAGE_BTR_SEG_TOP
1153
- + PAGE_HEADER + FSEG_HDR_PAGE_NO
1154
- || offs == PAGE_BTR_SEG_TOP
1155
- + PAGE_HEADER + FSEG_HDR_SPACE
1156
- || offs == PAGE_BTR_IBUF_FREE_LIST_NODE
1157
- + PAGE_HEADER + FIL_ADDR_PAGE
1158
- + 0 /* FLST_PREV*/
1159
- || offs == PAGE_BTR_IBUF_FREE_LIST_NODE
1160
- + PAGE_HEADER + FIL_ADDR_PAGE
1161
- + FIL_ADDR_SIZE /* FLST_NEXT*/
1162
- || offs ==
1163
- FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
1164
- break ;
1165
- }
1166
- }
1167
- #endif /* UNIV_DEBUG */
1092
+ /* Note that crypt data can be set to empty page */
1168
1093
ptr = mlog_parse_nbytes (type, ptr, end_ptr, page, page_zip);
1169
1094
break ;
1170
1095
case MLOG_REC_INSERT: case MLOG_COMP_REC_INSERT:
@@ -1336,7 +1261,7 @@ recv_parse_or_apply_log_rec_body(
1336
1261
ptr = fsp_parse_init_file_page (ptr, end_ptr, block);
1337
1262
break ;
1338
1263
case MLOG_WRITE_STRING:
1339
- ut_ad (!page || page_type != FIL_PAGE_TYPE_ALLOCATED);
1264
+ /* Allow setting crypt_data also for empty page */
1340
1265
ptr = mlog_parse_string (ptr, end_ptr, page, page_zip);
1341
1266
break ;
1342
1267
case MLOG_FILE_RENAME:
0 commit comments