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

Cleanup: Declare srv_shutdown_bg_undo_sources() static

parent 6286a05d
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2020, MariaDB Corporation. Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -52,9 +52,6 @@ void innodb_preshutdown(); ...@@ -52,9 +52,6 @@ void innodb_preshutdown();
/** Shut down InnoDB. */ /** Shut down InnoDB. */
void innodb_shutdown(); void innodb_shutdown();
/** Shut down background threads that can generate undo log. */
void srv_shutdown_bg_undo_sources();
/*************************************************************//** /*************************************************************//**
Copy the file path component of the physical file to parameter. It will Copy the file path component of the physical file to parameter. It will
copy up to and including the terminating path separator. copy up to and including the terminating path separator.
......
...@@ -848,6 +848,26 @@ static void srv_shutdown_threads() ...@@ -848,6 +848,26 @@ static void srv_shutdown_threads()
} }
} }
/** Shut down background threads that can generate undo log. */
static void srv_shutdown_bg_undo_sources()
{
srv_shutdown_state= SRV_SHUTDOWN_INITIATED;
if (srv_undo_sources)
{
ut_ad(!srv_read_only_mode);
fts_optimize_shutdown();
dict_stats_shutdown();
while (row_get_background_drop_list_len_low())
{
srv_inc_activity_count();
os_thread_yield();
}
srv_undo_sources= false;
}
}
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
# define srv_init_abort(_db_err) \ # define srv_init_abort(_db_err) \
srv_init_abort_low(create_new_db, __FILE__, __LINE__, _db_err) srv_init_abort_low(create_new_db, __FILE__, __LINE__, _db_err)
...@@ -1953,23 +1973,6 @@ dberr_t srv_start(bool create_new_db) ...@@ -1953,23 +1973,6 @@ dberr_t srv_start(bool create_new_db)
return(DB_SUCCESS); return(DB_SUCCESS);
} }
/** Shut down background threads that can generate undo log. */
void srv_shutdown_bg_undo_sources()
{
srv_shutdown_state = SRV_SHUTDOWN_INITIATED;
if (srv_undo_sources) {
ut_ad(!srv_read_only_mode);
fts_optimize_shutdown();
dict_stats_shutdown();
while (row_get_background_drop_list_len_low()) {
srv_inc_activity_count();
os_thread_yield();
}
srv_undo_sources = false;
}
}
/** /**
Shutdown purge to make sure that there is no possibility that we call any Shutdown purge to make sure that there is no possibility that we call any
plugin code (e.g., audit) inside virtual column computation. plugin code (e.g., audit) inside virtual column computation.
......
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