Skip to content
Permalink
Browse files
Merge 10.2 into 10.3
  • Loading branch information
dr-m committed May 24, 2018
2 parents 96cee52 + 1c8c6bc commit 6f01c42
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
@@ -326,7 +326,7 @@ thd_destructor_proxy(void *)
need to be purged, so they have to be shut down before purge
threads if slow shutdown is requested. */
srv_shutdown_bg_undo_sources();
srv_purge_wakeup();
srv_purge_shutdown();

destroy_thd(thd);
mysql_cond_destroy(&thd_destructor_cond);
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2017, MariaDB Corporation.
Copyright (c) 2013, 2018, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -900,6 +900,9 @@ srv_release_threads(enum srv_thread_type type, ulint n);
void
srv_purge_wakeup();

/** Shut down the purge threads. */
void srv_purge_shutdown();

/** Check if tablespace is being truncated.
(Ignore system-tablespace as we don't re-create the tablespace
and so some of the action that are suppressed by this function
@@ -2826,6 +2826,15 @@ srv_purge_wakeup()
|| srv_sys.n_threads_active[SRV_PURGE]));
}

/** Shut down the purge threads. */
void srv_purge_shutdown()
{
do {
ut_ad(!srv_undo_sources);
srv_purge_wakeup();
} while (srv_sys.sys_threads[SRV_PURGE_SLOT].in_use);
}

/** Check if tablespace is being truncated.
(Ignore system-tablespace as we don't re-create the tablespace
and so some of the action that are suppressed by this function

0 comments on commit 6f01c42

Please sign in to comment.