1
1
/*****************************************************************************
3
Copyright (C) 1997, 2010, Innobase Oy. All Rights Reserved.
3
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
69
69
/** TRUE when applying redo log records during crash recovery; FALSE
70
70
otherwise. Note that this is FALSE while a background thread is
71
71
rolling back incomplete transactions. */
72
UNIV_INTERN ibool recv_recovery_on;
72
UNIV_INTERN ibool recv_recovery_on = FALSE;
73
73
#ifdef UNIV_LOG_ARCHIVE
74
74
/** TRUE when applying redo log records from an archived log file */
75
UNIV_INTERN ibool recv_recovery_from_backup_on;
75
UNIV_INTERN ibool recv_recovery_from_backup_on = FALSE;
76
76
#endif /* UNIV_LOG_ARCHIVE */
78
78
#ifndef UNIV_HOTBACKUP
79
79
/** TRUE when recv_init_crash_recovery() has been called. */
80
UNIV_INTERN ibool recv_needed_recovery;
82
/** TRUE if writing to the redo log (mtr_commit) is forbidden.
83
Protected by log_sys->mutex. */
84
UNIV_INTERN ibool recv_no_log_write = FALSE;
85
# endif /* UNIV_DEBUG */
80
UNIV_INTERN ibool recv_needed_recovery = FALSE;
87
82
/** TRUE if buf_page_is_corrupted() should check if the log sequence
88
83
number (FIL_PAGE_LSN) is in the future. Initially FALSE, and set by
89
84
recv_recovery_from_checkpoint_start_func(). */
90
UNIV_INTERN ibool recv_lsn_checks_on;
85
UNIV_INTERN ibool recv_lsn_checks_on = FALSE;
92
87
/** There are two conditions under which we scan the logs, the first
93
88
is normal startup and the second is when we do a recovery from an
97
92
we know that the server was not cleanly shutdown. We must then initialize
98
93
the crash recovery environment before attempting to store these entries in
99
94
the log hash table. */
100
static ibool recv_log_scan_is_startup_type;
95
static ibool recv_log_scan_is_startup_type = FALSE;
102
97
/** If the following is TRUE, the buffer pool file pages must be invalidated
103
98
after recovery and no ibuf operations are allowed; this becomes TRUE if
109
104
TRUE means that recovery is running and no operations on the log files
110
105
are allowed yet: the variable name is misleading. */
111
UNIV_INTERN ibool recv_no_ibuf_operations;
106
UNIV_INTERN ibool recv_no_ibuf_operations = FALSE;
112
107
/** TRUE when the redo log is being backed up */
113
108
# define recv_is_making_a_backup FALSE
114
109
/** TRUE when recovering from a backed up redo log file */
116
111
#else /* !UNIV_HOTBACKUP */
117
112
# define recv_needed_recovery FALSE
118
113
/** TRUE when the redo log is being backed up */
119
UNIV_INTERN ibool recv_is_making_a_backup = FALSE;
114
UNIV_INTERN ibool recv_is_making_a_backup = FALSE;
120
115
/** TRUE when recovering from a backed up redo log file */
121
116
UNIV_INTERN ibool recv_is_from_backup = FALSE;
122
117
# define buf_pool_get_curr_size() (5 * 1024 * 1024)
123
118
#endif /* !UNIV_HOTBACKUP */
124
119
/** The following counter is used to decide when to print info on
126
static ulint recv_scan_print_counter;
121
static ulint recv_scan_print_counter = 0;
128
123
/** The type of the previous parsed redo log record */
129
static ulint recv_previous_parsed_rec_type;
124
static ulint recv_previous_parsed_rec_type = 999999;
130
125
/** The offset of the previous parsed redo log record */
131
static ulint recv_previous_parsed_rec_offset;
126
static ulint recv_previous_parsed_rec_offset = 0;
132
127
/** The 'multi' flag of the previous parsed redo log record */
133
static ulint recv_previous_parsed_rec_is_multi;
128
static ulint recv_previous_parsed_rec_is_multi = 0;
135
130
/** Maximum page number encountered in the redo log */
136
UNIV_INTERN ulint recv_max_parsed_page_no;
131
UNIV_INTERN ulint recv_max_parsed_page_no = 0;
138
133
/** This many frames must be left free in the buffer pool when we scan
139
134
the log and store the scanned log records in the buffer pool: we will
140
135
use these free frames to read in pages when we start applying the
141
log records to the database.
142
This is the default value. If the actual size of the buffer pool is
143
larger than 10 MB we'll set this value to 512. */
144
UNIV_INTERN ulint recv_n_pool_free_frames;
136
log records to the database. */
137
UNIV_INTERN ulint recv_n_pool_free_frames = 256;
146
139
/** The maximum lsn we see for a page during the recovery process. If this
147
140
is bigger than the lsn we are able to scan up to, that is an indication that
148
141
the recovery failed and the database may be corrupt. */
149
142
UNIV_INTERN ib_uint64_t recv_max_page_lsn;
151
#ifdef UNIV_PFS_THREAD
152
UNIV_INTERN mysql_pfs_key_t trx_rollback_clean_thread_key;
153
#endif /* UNIV_PFS_THREAD */
155
#ifdef UNIV_PFS_MUTEX
156
UNIV_INTERN mysql_pfs_key_t recv_sys_mutex_key;
157
#endif /* UNIV_PFS_MUTEX */
161
146
#ifndef UNIV_HOTBACKUP
183
recv_sys = static_cast<recv_sys_t *>(mem_alloc(sizeof(*recv_sys)));
184
memset(recv_sys, 0x0, sizeof(*recv_sys));
168
recv_sys = mem_alloc(sizeof(recv_sys_t));
186
mutex_create(recv_sys_mutex_key, &recv_sys->mutex, SYNC_RECV);
170
mutex_create(&recv_sys->mutex, SYNC_RECV);
188
172
recv_sys->heap = NULL;
189
173
recv_sys->addr_hash = NULL;
192
176
/********************************************************//**
193
Release recovery system mutexes. */
199
if (recv_sys != NULL) {
200
if (recv_sys->addr_hash != NULL) {
201
hash_table_free(recv_sys->addr_hash);
204
if (recv_sys->heap != NULL) {
205
mem_heap_free(recv_sys->heap);
208
if (recv_sys->buf != NULL) {
209
ut_free(recv_sys->buf);
212
if (recv_sys->last_block_buf_start != NULL) {
213
mem_free(recv_sys->last_block_buf_start);
216
mutex_free(&recv_sys->mutex);
223
/********************************************************//**
224
Frees the recovery system memory. */
227
recv_sys_mem_free(void)
228
/*===================*/
230
if (recv_sys != NULL) {
231
if (recv_sys->addr_hash != NULL) {
232
hash_table_free(recv_sys->addr_hash);
235
if (recv_sys->heap != NULL) {
236
mem_heap_free(recv_sys->heap);
239
if (recv_sys->buf != NULL) {
240
ut_free(recv_sys->buf);
243
if (recv_sys->last_block_buf_start != NULL) {
244
mem_free(recv_sys->last_block_buf_start);
252
#ifndef UNIV_HOTBACKUP
253
/************************************************************
254
Reset the state of the recovery system variables. */
257
recv_sys_var_init(void)
258
/*===================*/
260
recv_lsn_checks_on = FALSE;
262
recv_n_pool_free_frames = 256;
264
recv_recovery_on = FALSE;
266
#ifdef UNIV_LOG_ARCHIVE
267
recv_recovery_from_backup_on = FALSE;
268
#endif /* UNIV_LOG_ARCHIVE */
270
recv_needed_recovery = FALSE;
272
recv_lsn_checks_on = FALSE;
274
recv_log_scan_is_startup_type = FALSE;
276
recv_no_ibuf_operations = FALSE;
278
recv_scan_print_counter = 0;
280
recv_previous_parsed_rec_type = 999999;
282
recv_previous_parsed_rec_offset = 0;
284
recv_previous_parsed_rec_is_multi = 0;
286
recv_max_parsed_page_no = 0;
288
recv_n_pool_free_frames = 256;
290
recv_max_page_lsn = 0;
292
#endif /* !UNIV_HOTBACKUP */
294
/************************************************************
295
177
Inits the recovery system for a recovery operation. */
307
#ifndef UNIV_HOTBACKUP
308
/* Initialize red-black tree for fast insertions into the
309
flush_list during recovery process.
310
As this initialization is done while holding the buffer pool
311
mutex we perform it before acquiring recv_sys->mutex. */
312
#ifndef UNIV_HOTBACKUP
313
buf_flush_init_flush_rbt();
314
#endif /* !UNIV_HOTBACKUP */
316
189
mutex_enter(&(recv_sys->mutex));
191
#ifndef UNIV_HOTBACKUP
318
192
recv_sys->heap = mem_heap_create_in_buffer(256);
319
193
#else /* !UNIV_HOTBACKUP */
320
194
recv_sys->heap = mem_heap_create(256);
321
195
recv_is_from_backup = TRUE;
322
196
#endif /* !UNIV_HOTBACKUP */
324
/* Set appropriate value of recv_n_pool_free_frames. */
325
if (buf_pool_get_curr_size() >= (10 * 1024 * 1024)) {
326
/* Buffer pool of size greater than 10 MB. */
327
recv_n_pool_free_frames = 512;
330
recv_sys->buf = static_cast<byte *>(ut_malloc(RECV_PARSING_BUF_SIZE));
198
recv_sys->buf = ut_malloc(RECV_PARSING_BUF_SIZE);
331
199
recv_sys->len = 0;
332
200
recv_sys->recovered_offset = 0;
334
recv_sys->addr_hash = hash_create(available_memory / 512);
202
recv_sys->addr_hash = hash_create(available_memory / 64);
335
203
recv_sys->n_addrs = 0;
337
205
recv_sys->apply_log_recs = FALSE;
338
206
recv_sys->apply_batch_on = FALSE;
340
recv_sys->last_block_buf_start = static_cast<byte *>(mem_alloc(2 * OS_FILE_LOG_BLOCK_SIZE));
208
recv_sys->last_block_buf_start = mem_alloc(2 * OS_FILE_LOG_BLOCK_SIZE);
342
recv_sys->last_block = static_cast<byte *>(ut_align(recv_sys->last_block_buf_start,
343
OS_FILE_LOG_BLOCK_SIZE));
210
recv_sys->last_block = ut_align(recv_sys->last_block_buf_start,
211
OS_FILE_LOG_BLOCK_SIZE);
344
212
recv_sys->found_corrupt_log = FALSE;
346
214
recv_max_page_lsn = 0;
390
258
ut_free(recv_sys->buf);
391
259
mem_free(recv_sys->last_block_buf_start);
393
recv_sys->buf = NULL;
261
recv_sys->addr_hash = NULL;
394
262
recv_sys->heap = NULL;
395
recv_sys->addr_hash = NULL;
396
recv_sys->last_block_buf_start = NULL;
398
264
mutex_exit(&(recv_sys->mutex));
400
/* Free up the flush_rbt. */
401
buf_flush_free_flush_rbt();
403
266
# endif /* UNIV_LOG_DEBUG */
703
568
group->state = LOG_GROUP_OK;
705
group->lsn = mach_read_from_8(
570
group->lsn = mach_read_ull(
706
571
buf + LOG_CHECKPOINT_LSN);
707
572
group->lsn_offset = mach_read_from_4(
708
573
buf + LOG_CHECKPOINT_OFFSET);
709
checkpoint_no = mach_read_from_8(
574
checkpoint_no = mach_read_ull(
710
575
buf + LOG_CHECKPOINT_NO);
712
577
#ifdef UNIV_DEBUG
776
641
cp_buf = hdr + LOG_CHECKPOINT_1;
778
643
if (recv_check_cp_is_consistent(cp_buf)) {
779
max_cp_no = mach_read_from_8(cp_buf + LOG_CHECKPOINT_NO);
644
max_cp_no = mach_read_ull(cp_buf + LOG_CHECKPOINT_NO);
780
645
max_cp = LOG_CHECKPOINT_1;
783
648
cp_buf = hdr + LOG_CHECKPOINT_2;
785
650
if (recv_check_cp_is_consistent(cp_buf)) {
786
if (mach_read_from_8(cp_buf + LOG_CHECKPOINT_NO) > max_cp_no) {
651
if (mach_read_ull(cp_buf + LOG_CHECKPOINT_NO) > max_cp_no) {
787
652
max_cp = LOG_CHECKPOINT_2;
815
680
/* fprintf(stderr, "fsp limit %lu MB\n", *fsp_limit); */
817
*cp_no = mach_read_from_8(cp_buf + LOG_CHECKPOINT_NO);
682
*cp_no = mach_read_ull(cp_buf + LOG_CHECKPOINT_NO);
819
*first_header_lsn = mach_read_from_8(hdr + LOG_FILE_START_LSN);
684
*first_header_lsn = mach_read_ull(hdr + LOG_FILE_START_LSN);
1320
1180
recv_addr_t* recv_addr;
1322
recv_addr = static_cast<recv_addr_t *>(HASH_GET_FIRST(recv_sys->addr_hash,
1323
recv_hash(space, page_no)));
1182
recv_addr = HASH_GET_FIRST(recv_sys->addr_hash,
1183
recv_hash(space, page_no));
1324
1184
while (recv_addr) {
1325
1185
if ((recv_addr->space == space)
1326
1186
&& (recv_addr->page_no == page_no)) {
1372
1232
recv_addr = recv_get_fil_addr_struct(space, page_no);
1374
1234
if (recv_addr == NULL) {
1375
recv_addr = static_cast<recv_addr_t *>(mem_heap_alloc(recv_sys->heap,
1376
sizeof(recv_addr_t)));
1235
recv_addr = mem_heap_alloc(recv_sys->heap,
1236
sizeof(recv_addr_t));
1377
1237
recv_addr->space = space;
1378
1238
recv_addr->page_no = page_no;
1379
1239
recv_addr->state = RECV_NOT_PROCESSED;
1405
1265
len = RECV_DATA_BLOCK_SIZE;
1408
recv_data = static_cast<recv_data_t *>(mem_heap_alloc(recv_sys->heap,
1409
sizeof(recv_data_t) + len));
1268
recv_data = mem_heap_alloc(recv_sys->heap,
1269
sizeof(recv_data_t) + len);
1410
1270
*prev_field = recv_data;
1412
memcpy(recv_data + 1, body, len);
1272
ut_memcpy(((byte*)recv_data) + sizeof(recv_data_t), body, len);
1414
1274
prev_field = &(recv_data->next);
1578
1436
if (recv->type == MLOG_INIT_FILE_PAGE) {
1579
1437
page_lsn = page_newest_lsn;
1581
memset(FIL_PAGE_LSN + page, 0, 8);
1582
memset(UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM
1586
memset(FIL_PAGE_LSN + page_zip->data, 0, 8);
1439
mach_write_ull(page + UNIV_PAGE_SIZE
1440
- FIL_PAGE_END_LSN_OLD_CHKSUM, 0);
1441
mach_write_ull(page + FIL_PAGE_LSN, 0);
1590
1444
if (recv->start_lsn >= page_lsn) {
1592
ib_uint64_t page_end_lsn;
1594
1446
if (!modification_to_page) {
1596
1448
modification_to_page = TRUE;
1612
1464
recv_parse_or_apply_log_rec_body(recv->type, buf,
1613
1465
buf + recv->len,
1616
page_end_lsn = recv->start_lsn + recv->len;
1617
mach_write_to_8(FIL_PAGE_LSN + page, page_end_lsn);
1618
mach_write_to_8(UNIV_PAGE_SIZE
1619
- FIL_PAGE_END_LSN_OLD_CHKSUM
1620
+ page, page_end_lsn);
1623
mach_write_to_8(FIL_PAGE_LSN
1624
+ page_zip->data, page_end_lsn);
1467
mach_write_ull(page + UNIV_PAGE_SIZE
1468
- FIL_PAGE_END_LSN_OLD_CHKSUM,
1469
recv->start_lsn + recv->len);
1470
mach_write_ull(page + FIL_PAGE_LSN,
1471
recv->start_lsn + recv->len);
1628
1474
if (recv->len > RECV_DATA_BLOCK_SIZE) {
1842
1686
/* Flush all the file pages to disk and invalidate them in
1843
1687
the buffer pool */
1845
ut_d(recv_no_log_write = TRUE);
1846
1689
mutex_exit(&(recv_sys->mutex));
1847
1690
mutex_exit(&(log_sys->mutex));
1849
n_pages = buf_flush_list(ULINT_MAX, IB_ULONGLONG_MAX);
1850
ut_a(n_pages != ULINT_UNDEFINED);
1852
buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST);
1692
n_pages = buf_flush_batch(BUF_FLUSH_LIST, ULINT_MAX,
1694
ut_a(n_pages != ULINT_UNDEFINED);
1696
buf_flush_wait_batch_end(BUF_FLUSH_LIST);
1854
1698
buf_pool_invalidate();
1856
1700
mutex_enter(&(log_sys->mutex));
1857
1701
mutex_enter(&(recv_sys->mutex));
1858
ut_d(recv_no_log_write = FALSE);
1860
1703
recv_no_ibuf_operations = FALSE;
1990
1833
buf_flush_init_for_writing(
1991
1834
block->frame, buf_block_get_page_zip(block),
1992
mach_read_from_8(block->frame + FIL_PAGE_LSN));
1835
mach_read_ull(block->frame + FIL_PAGE_LSN));
1994
1837
if (zip_size) {
1995
1838
error = fil_io(OS_FILE_WRITE, TRUE,
2070
#ifdef UNIV_LOG_LSN_DEBUG
2071
if (*type == MLOG_LSN) {
2072
ib_uint64_t lsn = (ib_uint64_t) *space << 32 | *page_no;
2073
# ifdef UNIV_LOG_DEBUG
2074
ut_a(lsn == log_sys->old_lsn);
2075
# else /* UNIV_LOG_DEBUG */
2076
ut_a(lsn == recv_sys->recovered_lsn);
2077
# endif /* UNIV_LOG_DEBUG */
1913
/* Check that page_no is sensible */
1915
if (UNIV_UNLIKELY(*page_no > 0x8FFFFFFFUL)) {
1917
recv_sys->found_corrupt_log = TRUE;
2079
#endif /* UNIV_LOG_LSN_DEBUG */
2081
1922
new_ptr = recv_parse_or_apply_log_rec_body(*type, new_ptr, end_ptr,
2186
2027
putc('\n', stderr);
2189
#ifndef UNIV_HOTBACKUP
2190
if (!srv_force_recovery) {
2191
fputs("InnoDB: Set innodb_force_recovery"
2192
" to ignore this error.\n", stderr);
2195
#endif /* !UNIV_HOTBACKUP */
2197
2030
fputs("InnoDB: WARNING: the log file may have been corrupt and it\n"
2198
2031
"InnoDB: is possible that the log scan did not proceed\n"
2199
2032
"InnoDB: far enough in recovery! Please run CHECK TABLE\n"
2335
2168
/* In normal mysqld crash recovery we do not try to
2336
2169
replay file operations */
2337
#ifdef UNIV_LOG_LSN_DEBUG
2338
} else if (type == MLOG_LSN) {
2339
/* Do not add these records to the hash table.
2340
The page number and space id fields are misused
2341
for something else. */
2342
#endif /* UNIV_LOG_LSN_DEBUG */
2344
2171
recv_add_to_hash_table(type, space, page_no, body,
2345
2172
ptr + len, old_lsn,
2371
2198
= recv_sys->recovered_offset + total_len;
2372
2199
recv_previous_parsed_rec_is_multi = 1;
2374
#ifdef UNIV_LOG_DEBUG
2375
2201
if ((!store_to_hash) && (type != MLOG_MULTI_REC_END)) {
2202
#ifdef UNIV_LOG_DEBUG
2376
2203
recv_check_incomplete_log_recs(ptr, len);
2204
#endif /* UNIV_LOG_DEBUG */
2378
#endif /* UNIV_LOG_DEBUG */
2380
2207
#ifdef UNIV_DEBUG
2381
2208
if (log_debug_writes) {
2709
2533
recv_sys->found_corrupt_log = TRUE;
2711
#ifndef UNIV_HOTBACKUP
2712
if (!srv_force_recovery) {
2714
" innodb_force_recovery"
2715
" to ignore this error.\n",
2719
#endif /* !UNIV_HOTBACKUP */
2721
2535
} else if (!recv_sys->found_corrupt_log) {
2722
2536
more_data = recv_sys_add_to_parsing_buf(
2723
2537
log_block, scanned_lsn);
2812
2625
group, start_lsn, end_lsn);
2814
2627
finished = recv_scan_log_recs(
2815
(buf_pool_get_n_pages()
2816
- (recv_n_pool_free_frames * srv_buf_pool_instances))
2818
TRUE, log_sys->buf, RECV_SCAN_SIZE,
2628
(buf_pool->curr_size - recv_n_pool_free_frames)
2629
* UNIV_PAGE_SIZE, TRUE, log_sys->buf, RECV_SCAN_SIZE,
2819
2630
start_lsn, contiguous_lsn, group_scanned_lsn);
2820
2631
start_lsn = end_lsn;
2958
2767
buf = log_sys->checkpoint_buf;
2960
checkpoint_lsn = mach_read_from_8(buf + LOG_CHECKPOINT_LSN);
2961
checkpoint_no = mach_read_from_8(buf + LOG_CHECKPOINT_NO);
2962
#ifdef UNIV_LOG_ARCHIVE
2963
archived_lsn = mach_read_from_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN);
2964
#endif /* UNIV_LOG_ARCHIVE */
2769
checkpoint_lsn = mach_read_ull(buf + LOG_CHECKPOINT_LSN);
2770
checkpoint_no = mach_read_ull(buf + LOG_CHECKPOINT_NO);
2771
archived_lsn = mach_read_ull(buf + LOG_CHECKPOINT_ARCHIVED_LSN);
2966
2773
/* Read the first log file header to print a note if this is
2967
2774
a recovery from a restored InnoDB Hot Backup */
3288
3102
recv_recovery_on = FALSE;
3290
3104
#ifndef UNIV_LOG_DEBUG
3291
recv_sys_debug_free();
3293
/* Roll back any recovered data dictionary transactions, so
3294
that the data dictionary tables will be free of any locks.
3295
The data dictionary latch should guarantee that there is at
3296
most one data dictionary transaction active at a time. */
3297
trx_rollback_or_clean_recovered(FALSE);
3300
/********************************************************//**
3301
Initiates the rollback of active transactions. */
3304
recv_recovery_rollback_active(void)
3305
/*===============================*/
3108
/* Drop partially created indexes. */
3109
row_merge_drop_temp_indexes();
3309
3111
#ifdef UNIV_SYNC_DEBUG
3310
3112
/* Wait for a while so that created threads have time to suspend
3314
3116
/* Switch latching order checks on in sync0sync.c */
3315
3117
sync_order_checks_on = TRUE;
3317
/* Drop partially created indexes. */
3318
row_merge_drop_temp_indexes();
3319
/* Drop temporary tables. */
3320
row_mysql_drop_temp_tables();
3322
3119
if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
3323
3120
/* Rollback the uncommitted transactions which have no user
3434
3231
sprintf(name, "%s%s%lu", log_dir,
3435
3232
ib_logfile_basename, (ulong)i);
3437
log_file = os_file_create_simple(innodb_file_log_key,
3438
name, OS_FILE_CREATE,
3234
log_file = os_file_create_simple(name, OS_FILE_CREATE,
3235
OS_FILE_READ_WRITE, &success);
3441
3236
if (!success) {
3442
3237
fprintf(stderr,
3443
3238
"InnoDB: Cannot create %s. Check that"
3476
3271
LOG_BLOCK_HDR_SIZE);
3477
3272
sprintf(name, "%s%s%lu", log_dir, ib_logfile_basename, (ulong)0);
3479
log_file = os_file_create_simple(innodb_file_log_key,
3274
log_file = os_file_create_simple(name, OS_FILE_OPEN,
3481
3275
OS_FILE_READ_WRITE, &success);
3482
3276
if (!success) {
3483
3277
fprintf(stderr, "InnoDB: Cannot open %s.\n", name);
3529
3322
log_archived_file_name_gen(name, group->id, group->archived_file_no);
3531
file_handle = os_file_create(innodb_file_log_key,
3324
file_handle = os_file_create(name, OS_FILE_OPEN,
3533
3325
OS_FILE_LOG, OS_FILE_AIO, &ret);
3535
3327
if (ret == FALSE) {
3661
3453
read_offset % UNIV_PAGE_SIZE, len, buf, NULL);
3663
3455
ret = recv_scan_log_recs(
3664
(buf_pool_get_n_pages()
3665
- (recv_n_pool_free_frames * srv_buf_pool_instances))
3456
(buf_pool->n_frames - recv_n_pool_free_frames)
3666
3457
* UNIV_PAGE_SIZE, TRUE, buf, len, start_lsn,
3667
3458
&dummy_lsn, &scanned_lsn);