Browse Source

Cleanup: Declare srv_shutdown_bg_undo_sources() static

bb-10.5-MDEV-26852
Marko Mäkelä 3 years ago
parent
commit
fe7c95ec78
  1. 5
      storage/innobase/include/srv0start.h
  2. 37
      storage/innobase/srv/srv0start.cc

5
storage/innobase/include/srv0start.h

@ -1,7 +1,7 @@
/*****************************************************************************
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
the terms of the GNU General Public License as published by the Free Software
@ -52,9 +52,6 @@ void innodb_preshutdown();
/** Shut down InnoDB. */
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 up to and including the terminating path separator.

37
storage/innobase/srv/srv0start.cc

@ -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
# define srv_init_abort(_db_err) \
srv_init_abort_low(create_new_db, __FILE__, __LINE__, _db_err)
@ -1953,23 +1973,6 @@ skip_monitors:
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
plugin code (e.g., audit) inside virtual column computation.

Loading…
Cancel
Save