Commit f6130147 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.7 into 10.8

parents 6c2a7d43 5291f35f
...@@ -103,17 +103,18 @@ static void dict_stats_recalc_pool_add(table_id_t id) ...@@ -103,17 +103,18 @@ static void dict_stats_recalc_pool_add(table_id_t id)
{ {
ut_ad(!srv_read_only_mode); ut_ad(!srv_read_only_mode);
ut_ad(id); ut_ad(id);
bool schedule = false;
mysql_mutex_lock(&recalc_pool_mutex); mysql_mutex_lock(&recalc_pool_mutex);
const auto begin= recalc_pool.begin(), end= recalc_pool.end(); const auto begin= recalc_pool.begin(), end= recalc_pool.end();
if (end == std::find_if(begin, end, [&](const recalc &r){return r.id == id;})) if (end == std::find_if(begin, end, [&](const recalc &r){return r.id == id;}))
{ {
recalc_pool.emplace_back(recalc{id, recalc::IDLE}); recalc_pool.emplace_back(recalc{id, recalc::IDLE});
schedule = true;
} }
mysql_mutex_unlock(&recalc_pool_mutex); mysql_mutex_unlock(&recalc_pool_mutex);
if (schedule)
if (begin == end)
dict_stats_schedule_now(); dict_stats_schedule_now();
} }
......
...@@ -907,6 +907,7 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p, ...@@ -907,6 +907,7 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p,
node->deferred= true; node->deferred= true;
if (!space->acquire()) if (!space->acquire())
goto fail; goto fail;
fil_names_dirty(space);
const bool is_compressed= fil_space_t::is_compressed(flags); const bool is_compressed= fil_space_t::is_compressed(flags);
#ifdef _WIN32 #ifdef _WIN32
const bool is_sparse= is_compressed; const bool is_sparse= is_compressed;
...@@ -4146,7 +4147,6 @@ dberr_t recv_recovery_from_checkpoint_start() ...@@ -4146,7 +4147,6 @@ dberr_t recv_recovery_from_checkpoint_start()
err = recv_rename_files(); err = recv_rename_files();
} }
mysql_mutex_unlock(&recv_sys.mutex); mysql_mutex_unlock(&recv_sys.mutex);
log_sys.latch.wr_unlock();
recv_lsn_checks_on = true; recv_lsn_checks_on = true;
...@@ -4158,6 +4158,7 @@ dberr_t recv_recovery_from_checkpoint_start() ...@@ -4158,6 +4158,7 @@ dberr_t recv_recovery_from_checkpoint_start()
err = DB_CORRUPTION; err = DB_CORRUPTION;
} }
log_sys.latch.wr_unlock();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment