Commit 731435af authored by Marko Mäkelä's avatar Marko Mäkelä

srv_purge_coordinator_thread(): Remove redundant variables

parent 6264e892
...@@ -2991,14 +2991,9 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( ...@@ -2991,14 +2991,9 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
ut_a(srv_purge_should_exit(thd, n_total_purged)); ut_a(srv_purge_should_exit(thd, n_total_purged));
ulint n_pages_purged = ULINT_MAX; /* Ensure that all records are purged on slow shutdown. */
while (srv_fast_shutdown == 0
/* Ensure that all records are purged if it is not a fast shutdown. && trx_purge(1, srv_purge_batch_size, false));
This covers the case where a record can be added after we exit the
loop above. */
while (srv_fast_shutdown == 0 && n_pages_purged > 0) {
n_pages_purged = trx_purge(1, srv_purge_batch_size, false);
}
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
if (srv_fast_shutdown == 0) { if (srv_fast_shutdown == 0) {
...@@ -3012,12 +3007,10 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( ...@@ -3012,12 +3007,10 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
delay in shutdown ,so reducing the batch size to magic number 20 delay in shutdown ,so reducing the batch size to magic number 20
(which was default in 5.5), which we hope will be sufficient to (which was default in 5.5), which we hope will be sufficient to
remove all the undo records */ remove all the undo records */
const uint temp_batch_size = 20;
n_pages_purged = trx_purge(1, srv_purge_batch_size <= temp_batch_size if (trx_purge(1, std::min(srv_purge_batch_size, 20UL), true)) {
? srv_purge_batch_size : temp_batch_size, ut_a(srv_fast_shutdown);
true); }
ut_a(n_pages_purged == 0 || srv_fast_shutdown != 0);
/* The task queue should always be empty, independent of fast /* The task queue should always be empty, independent of fast
shutdown state. */ shutdown state. */
......
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