mirror of
https://github.com/MariaDB/server.git
synced 2026-05-17 20:37:12 +02:00
Merge 10.11 into 11.4
This commit is contained in:
commit
0f29955349
8 changed files with 44 additions and 44 deletions
|
|
@ -44,11 +44,6 @@ ATTRIBUTE_COLD MY_ATTRIBUTE((nonnull, warn_unused_result))
|
|||
@return whether the page was recovered correctly */
|
||||
bool recv_recover_page(fil_space_t* space, buf_page_t* bpage);
|
||||
|
||||
/** Read the latest checkpoint information from log file
|
||||
and store it in log_sys.next_checkpoint and recv_sys.file_checkpoint
|
||||
@return error code or DB_SUCCESS */
|
||||
dberr_t recv_recovery_read_checkpoint();
|
||||
|
||||
/** Start recovering from a redo log checkpoint.
|
||||
of first system tablespace page
|
||||
@return error code or DB_SUCCESS */
|
||||
|
|
|
|||
|
|
@ -287,9 +287,8 @@ remap:
|
|||
if (!stat("/dev/shm", &st))
|
||||
{
|
||||
is_pmem= st.st_dev == st_dev;
|
||||
if (!is_pmem)
|
||||
return ptr; /* MAP_FAILED */
|
||||
goto remap;
|
||||
if (is_pmem)
|
||||
goto remap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4698,30 +4698,6 @@ done:
|
|||
return err;
|
||||
}
|
||||
|
||||
dberr_t recv_recovery_read_checkpoint()
|
||||
{
|
||||
ut_ad(srv_operation <= SRV_OPERATION_EXPORT_RESTORED ||
|
||||
srv_operation == SRV_OPERATION_RESTORE ||
|
||||
srv_operation == SRV_OPERATION_RESTORE_EXPORT);
|
||||
ut_ad(!recv_sys.recovery_on);
|
||||
ut_d(mysql_mutex_lock(&buf_pool.mutex));
|
||||
ut_ad(UT_LIST_GET_LEN(buf_pool.LRU) == 0);
|
||||
ut_ad(UT_LIST_GET_LEN(buf_pool.unzip_LRU) == 0);
|
||||
ut_d(mysql_mutex_unlock(&buf_pool.mutex));
|
||||
|
||||
if (srv_force_recovery >= SRV_FORCE_NO_LOG_REDO)
|
||||
{
|
||||
sql_print_information("InnoDB: innodb_force_recovery=6"
|
||||
" skips redo log apply");
|
||||
return DB_SUCCESS;
|
||||
}
|
||||
|
||||
log_sys.latch.wr_lock(SRW_LOCK_CALL);
|
||||
dberr_t err= recv_sys.find_checkpoint();
|
||||
log_sys.latch.wr_unlock();
|
||||
return err;
|
||||
}
|
||||
|
||||
inline void log_t::set_recovered() noexcept
|
||||
{
|
||||
ut_ad(get_flushed_lsn() == get_lsn());
|
||||
|
|
|
|||
|
|
@ -1458,9 +1458,21 @@ dberr_t srv_start(bool create_new_db)
|
|||
}
|
||||
recv_sys.debug_free();
|
||||
} else {
|
||||
err = recv_recovery_read_checkpoint();
|
||||
if (err != DB_SUCCESS) {
|
||||
return srv_init_abort(err);
|
||||
ut_ad(srv_operation <= SRV_OPERATION_EXPORT_RESTORED
|
||||
|| srv_operation == SRV_OPERATION_RESTORE
|
||||
|| srv_operation == SRV_OPERATION_RESTORE_EXPORT);
|
||||
ut_ad(!recv_sys.recovery_on);
|
||||
|
||||
if (srv_force_recovery >= SRV_FORCE_NO_LOG_REDO) {
|
||||
sql_print_information("InnoDB: innodb_force_recovery=6"
|
||||
" skips redo log apply");
|
||||
} else {
|
||||
log_sys.latch.wr_lock(SRW_LOCK_CALL);
|
||||
err = recv_sys.find_checkpoint();
|
||||
log_sys.latch.wr_unlock();
|
||||
if (err != DB_SUCCESS) {
|
||||
return srv_init_abort(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue