diff options
Diffstat (limited to 'storage/xtradb/log/log0log.cc')
-rw-r--r-- | storage/xtradb/log/log0log.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc index 2dc129b1bb3..493f008c8b4 100644 --- a/storage/xtradb/log/log0log.cc +++ b/storage/xtradb/log/log0log.cc @@ -255,7 +255,7 @@ log_buffer_extend( { ulint move_start; ulint move_end; - byte *tmp_buf = (byte*)alloca(OS_FILE_LOG_BLOCK_SIZE); + byte* tmp_buf = static_cast<byte *>(alloca(OS_FILE_LOG_BLOCK_SIZE)); mutex_enter(&(log_sys->mutex)); @@ -3050,9 +3050,9 @@ log_archive_do( ulint* n_bytes)/*!< out: archive log buffer size, 0 if nothing to archive */ { - ibool calc_new_limit; - ib_uint64_t start_lsn; - ib_uint64_t limit_lsn; + ibool calc_new_limit; + lsn_t start_lsn; + lsn_t limit_lsn = LSN_MAX; calc_new_limit = TRUE; loop: @@ -3718,8 +3718,14 @@ loop: lsn = log_sys->lsn; - if (lsn != log_sys->last_checkpoint_lsn - || (srv_track_changed_pages && (tracked_lsn != log_sys->last_checkpoint_lsn)) + ut_ad(srv_force_recovery != SRV_FORCE_NO_LOG_REDO + || lsn == log_sys->last_checkpoint_lsn + LOG_BLOCK_HDR_SIZE); + + + if ((srv_force_recovery != SRV_FORCE_NO_LOG_REDO + && lsn != log_sys->last_checkpoint_lsn) + || (srv_track_changed_pages + && (tracked_lsn != log_sys->last_checkpoint_lsn)) #ifdef UNIV_LOG_ARCHIVE || (srv_log_archive_on && lsn != log_sys->archived_lsn + LOG_BLOCK_HDR_SIZE) |