summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc16
-rw-r--r--storage/innobase/srv/srv0srv.cc5
-rw-r--r--storage/innobase/srv/srv0start.cc13
3 files changed, 14 insertions, 20 deletions
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index d0f729e0d60..3a278a70938 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -4256,15 +4256,12 @@ ibuf_restore_pos(
return(TRUE);
}
- if (fil_space_get_flags(space) == ULINT_UNDEFINED) {
- /* The tablespace has been dropped. It is possible
- that another thread has deleted the insert buffer
- entry. Do not complain. */
- ibuf_btr_pcur_commit_specify_mtr(pcur, mtr);
- } else {
- ib::error() << "ibuf cursor restoration fails!."
+ if (fil_space_t* s = fil_space_acquire_silent(space)) {
+ ib::error() << "ibuf cursor restoration fails!"
" ibuf record inserted to page "
- << space << ":" << page_no;
+ << space << ":" << page_no
+ << " in file " << s->chain.start->name;
+ s->release();
ib::error() << BUG_REPORT_MSG;
@@ -4274,10 +4271,9 @@ ibuf_restore_pos(
rec_print_old(stderr,
page_rec_get_next(btr_pcur_get_rec(pcur)));
-
- ib::fatal() << "Failed to restore ibuf position.";
}
+ ibuf_btr_pcur_commit_specify_mtr(pcur, mtr);
return(FALSE);
}
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 8fd746db4a0..494992e40cf 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -2366,10 +2366,6 @@ DECLARE_THREAD(srv_master_thread)(
ut_a(slot == srv_sys.sys_threads);
loop:
- if (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND) {
- goto suspend_thread;
- }
-
while (srv_shutdown_state == SRV_SHUTDOWN_NONE) {
srv_master_sleep();
@@ -2384,7 +2380,6 @@ loop:
}
}
-suspend_thread:
switch (srv_shutdown_state) {
case SRV_SHUTDOWN_NONE:
break;
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index b9e6c613eac..63c75ee052e 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -2464,11 +2464,14 @@ files_checked:
trx_temp_rseg_create();
- thread_handles[1 + SRV_MAX_N_IO_THREADS] = os_thread_create(
- srv_master_thread,
- NULL, thread_ids + (1 + SRV_MAX_N_IO_THREADS));
- thread_started[1 + SRV_MAX_N_IO_THREADS] = true;
- srv_start_state_set(SRV_START_STATE_MASTER);
+ if (srv_force_recovery < SRV_FORCE_NO_BACKGROUND) {
+ thread_handles[1 + SRV_MAX_N_IO_THREADS]
+ = os_thread_create(srv_master_thread, NULL,
+ (1 + SRV_MAX_N_IO_THREADS)
+ + thread_ids);
+ thread_started[1 + SRV_MAX_N_IO_THREADS] = true;
+ srv_start_state_set(SRV_START_STATE_MASTER);
+ }
}
if (!srv_read_only_mode && srv_operation == SRV_OPERATION_NORMAL