@@ -132,15 +132,15 @@ struct recv_t : public log_rec_t
132
132
@param end_lsn end LSN of the mini-transaction
133
133
*/
134
134
recv_t (uint32_t len, mlog_id_t type, lsn_t start_lsn, lsn_t end_lsn) :
135
- log_rec_t (end_lsn), len(len ), type(type ), start_lsn(start_lsn ), data(NULL )
135
+ log_rec_t (end_lsn), start_lsn(start_lsn ), len(len ), type(type ), data(NULL )
136
136
{}
137
137
138
+ /* * start LSN of the mini-transaction (not necessarily of this record) */
139
+ const lsn_t start_lsn;
138
140
/* * log record body length in bytes */
139
141
const uint32_t len;
140
142
/* * log record type */
141
143
const mlog_id_t type;
142
- /* * start LSN of the mini-transaction (not necessarily of this record) */
143
- const lsn_t start_lsn;
144
144
/* * log record */
145
145
struct data_t
146
146
{
@@ -1640,6 +1640,9 @@ recv_parse_or_apply_log_rec_body(
1640
1640
this record yet. */
1641
1641
break ;
1642
1642
case MLOG_WRITE_STRING:
1643
+ ut_ad (!page_zip
1644
+ || fil_page_get_type (page_zip->data )
1645
+ <= FIL_PAGE_TYPE_ZBLOB2);
1643
1646
if (page_id.page_no () || mach_read_from_2 (ptr + 2 )
1644
1647
!= 11 + MY_AES_BLOCK_SIZE) {
1645
1648
/* Not writing crypt_info */
@@ -1881,14 +1884,15 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
1881
1884
const ulint chunk_limit = static_cast <ulint>(RECV_DATA_BLOCK_SIZE);
1882
1885
1883
1886
for (const log_rec_t * l : p->second .log ) {
1887
+ ut_ad (l->lsn );
1888
+ ut_ad (end_lsn <= l->lsn );
1889
+ end_lsn = l->lsn ;
1890
+ ut_ad (end_lsn <= log_sys.log .scanned_lsn );
1891
+
1884
1892
const recv_t * recv = static_cast <const recv_t *>(l);
1885
1893
ut_ad (recv->start_lsn );
1886
- ut_ad (recv->lsn );
1887
1894
ut_ad (recv_start_lsn < recv->start_lsn );
1888
1895
ut_d (recv_start_lsn = recv->start_lsn );
1889
- ut_ad (end_lsn <= recv->lsn );
1890
- end_lsn = recv->lsn ;
1891
- ut_ad (end_lsn <= log_sys.log .scanned_lsn );
1892
1896
1893
1897
if (recv->start_lsn < page_lsn) {
1894
1898
/* Ignore this record, because there are later changes
@@ -1940,6 +1944,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
1940
1944
recv_parse_or_apply_log_rec_body (
1941
1945
recv->type , recs, recs + recv->len ,
1942
1946
block->page .id , true , block, &mtr);
1947
+ ut_free (buf);
1943
1948
1944
1949
end_lsn = recv->start_lsn + recv->len ;
1945
1950
mach_write_to_8 (FIL_PAGE_LSN + page, end_lsn);
@@ -1951,8 +1956,6 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
1951
1956
mach_write_to_8 (FIL_PAGE_LSN + page_zip->data ,
1952
1957
end_lsn);
1953
1958
}
1954
-
1955
- ut_free (buf);
1956
1959
}
1957
1960
}
1958
1961
0 commit comments