MySQL 9.1.0
Source Code Documentation
|
Shutdowns the Innobase database server. More...
Go to the source code of this file.
Enumerations | |
enum | srv_shutdown_t { SRV_SHUTDOWN_NONE = 0 , SRV_SHUTDOWN_RECOVERY_ROLLBACK , SRV_SHUTDOWN_PRE_DD_AND_SYSTEM_TRANSACTIONS , SRV_SHUTDOWN_PURGE , SRV_SHUTDOWN_DD , SRV_SHUTDOWN_CLEANUP , SRV_SHUTDOWN_MASTER_STOP , SRV_SHUTDOWN_FLUSH_PHASE , SRV_SHUTDOWN_LAST_PHASE , SRV_SHUTDOWN_EXIT_THREADS } |
Shutdown state. More... | |
Functions | |
void | srv_pre_dd_shutdown () |
Shut down all InnoDB background tasks that may look up objects in the data dictionary. More... | |
void | srv_shutdown () |
Shut down the InnoDB database. More... | |
void | srv_fatal_error () |
Call std::quick_exit(3) More... | |
void | srv_shutdown_exit_threads () |
Attempt to shutdown all background threads created by InnoDB. More... | |
bool | srv_shutdown_waits_for_rollback_of_recovered_transactions () |
Checks if all recovered transactions are supposed to be rolled back before shutdown is ended. More... | |
template<typename F > | |
bool | srv_shutdown_state_matches (F &&f) |
Allows to safely check value of the current shutdown state. More... | |
Variables | |
std::atomic< enum srv_shutdown_t > | srv_shutdown_state |
At a shutdown this value climbs from SRV_SHUTDOWN_NONE to SRV_SHUTDOWN_EXIT_THREADS. More... | |
Shutdowns the Innobase database server.
enum srv_shutdown_t |
Shutdown state.
void srv_fatal_error | ( | ) |
Call std::quick_exit(3)
Call std::quick_exit(3)
void srv_pre_dd_shutdown | ( | ) |
Shut down all InnoDB background tasks that may look up objects in the data dictionary.
void srv_shutdown | ( | ) |
Shut down the InnoDB database.
void srv_shutdown_exit_threads | ( | ) |
Attempt to shutdown all background threads created by InnoDB.
NOTE: Does not guarantee they are actually shut down, only does the best effort. Changes state of shutdown to SHUTDOWN_EXIT_THREADS, wakes up the background threads and waits a little bit. It might be used within startup phase or when fatal error is discovered during some IO operation. Therefore you must not assume anything related to the state in which it might be used.
bool srv_shutdown_state_matches | ( | F && | f | ) |
Allows to safely check value of the current shutdown state.
Note that the current shutdown state might be changed while the check is being executed, but the check is based on a single load of the srv_shutdown_state (atomic global variable).
bool srv_shutdown_waits_for_rollback_of_recovered_transactions | ( | ) |
Checks if all recovered transactions are supposed to be rolled back before shutdown is ended.
|
extern |
At a shutdown this value climbs from SRV_SHUTDOWN_NONE to SRV_SHUTDOWN_EXIT_THREADS.