Go to the source code of this file.
Macros | |
#define | srv0start_h |
#define | SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0UL |
Enumerations | |
enum | srv_shutdown_state { SRV_SHUTDOWN_NONE = 0, SRV_SHUTDOWN_CLEANUP, SRV_SHUTDOWN_LAST_PHASE, SRV_SHUTDOWN_EXIT_THREADS } |
Functions | |
UNIV_INTERN void | srv_normalize_path_for_win (char *str) |
UNIV_INTERN ibool | srv_parse_data_file_paths_and_sizes (char *str) |
UNIV_INTERN ibool | srv_parse_log_group_home_dirs (char *str) |
UNIV_INTERN void | srv_free_paths_and_sizes (void) |
UNIV_INTERN char * | srv_add_path_separator_if_needed (char *str) |
UNIV_INTERN int | innobase_start_or_create_for_mysql (void) |
UNIV_INTERN int | innobase_shutdown_for_mysql (void) |
Variables | |
ib_uint64_t | srv_shutdown_lsn |
ib_uint64_t | srv_start_lsn |
ibool | srv_is_being_started |
ibool | srv_was_started |
ibool | srv_startup_is_before_trx_rollback_phase |
ibool | srv_start_raw_disk_in_use |
enum srv_shutdown_state | srv_shutdown_state |
#define SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0UL |
Log 'spaces' have id's >= this
Definition at line 129 of file srv0start.h.
Referenced by fil_assign_new_space_id(), fil_create_new_single_table_tablespace(), and fil_set_max_space_id_if_bigger().
enum srv_shutdown_state |
Shutdown state
Enumerator | |
---|---|
SRV_SHUTDOWN_NONE |
Database running normally |
SRV_SHUTDOWN_CLEANUP |
Cleaning up in logs_empty_and_mark_files_at_shutdown() |
SRV_SHUTDOWN_LAST_PHASE |
Last phase after ensuring that the buffer pool can be freed: flush all file spaces and close all files |
SRV_SHUTDOWN_EXIT_THREADS |
Exit all threads |
Definition at line 113 of file srv0start.h.
UNIV_INTERN int innobase_shutdown_for_mysql | ( | void | ) |
Shuts down the Innobase database.
Shuts down the InnoDB database.
Definition at line 1852 of file srv0start.cc.
References innobase_shutdown_for_mysql(), lock_sys_close(), logs_empty_and_mark_files_at_shutdown(), mem_close(), mem_free, os_aio_wake_all_threads_at_shutdown(), os_event_set(), os_mutex_enter(), os_mutex_exit(), os_sync_free(), os_sync_mutex, os_thread_count, os_thread_sleep(), pars_lexer_close(), srv_buf_pool_instances, srv_free(), srv_is_being_started, SRV_SHUTDOWN_EXIT_THREADS, srv_shutdown_lsn, srv_wake_master_thread(), srv_wake_purge_thread(), srv_was_started, sync_close(), thr_local_close(), trx_sys_close(), trx_sys_file_format_close(), and ut_free_all_mem().
Referenced by innobase_shutdown_for_mysql().
UNIV_INTERN int innobase_start_or_create_for_mysql | ( | void | ) |
Starts Innobase and creates a new database if database files are not found and the user wants.
Definition at line 972 of file srv0start.cc.
References IB_ATOMICS_STARTUP_MSG, innobase_start_or_create_for_mysql(), lock_sys_create(), log_archive_archivelog(), log_archive_noarchivelog(), log_buffer_flush_to_disk(), log_do_write, log_init(), mtr_commit(), mtr_start(), log_struct::mutex, os_fast_mutex_free(), os_fast_mutex_init(), os_fast_mutex_lock(), os_fast_mutex_trylock(), os_fast_mutex_unlock(), os_file_create_tmpfile(), os_get_os_version(), os_proc_get_number(), os_thread_create(), os_thread_sleep(), OS_WIN2000, OS_WIN31, OS_WIN95, OS_WINNT, OS_WINXP, recv_needed_recovery, recv_recovery_from_checkpoint_finish(), recv_recovery_from_checkpoint_start, recv_recovery_rollback_active(), recv_reset_logs(), srv_add_path_separator_if_needed(), srv_boot(), srv_buf_pool_instances, srv_buf_pool_size, srv_error_monitor_thread(), srv_file_per_table, SRV_FORCE_NO_IBUF_MERGE, srv_is_being_started, srv_lock_timeout_thread(), srv_LRU_dump_restore_thread(), srv_master_thread(), srv_max_file_format_at_startup, srv_monitor_thread(), srv_normalize_path_for_win(), srv_purge_thread(), srv_start_lsn, srv_startup_is_before_trx_rollback_phase, SRV_UNIX_ALL_O_DIRECT, SRV_UNIX_FSYNC, SRV_UNIX_LITTLESYNC, SRV_UNIX_NOSYNC, SRV_UNIX_O_DIRECT, SRV_UNIX_O_DSYNC, srv_was_started, SRV_WIN_IO_NORMAL, SRV_WIN_IO_UNBUFFERED, trx_doublewrite, trx_doublewrite_must_reset_space_ids, trx_sys_create(), trx_sys_create_doublewrite_buf(), trx_sys_create_rsegs(), trx_sys_file_format_init(), trx_sys_file_format_max_check(), trx_sys_file_format_tag_init(), trx_sys_init_at_db_start(), trx_sys_mark_upgraded_to_multiple_tablespaces(), ut_a, and ut_strcmp().
Referenced by innobase_init(), and innobase_start_or_create_for_mysql().
UNIV_INTERN char* srv_add_path_separator_if_needed | ( | char * | str) |
Adds a slash or a backslash to the end of a string if it is missing and the string is not empty.
Referenced by innobase_start_or_create_for_mysql().
UNIV_INTERN void srv_free_paths_and_sizes | ( | void | ) |
Frees the memory allocated by srv_parse_data_file_paths_and_sizes() and srv_parse_log_group_home_dirs().
Definition at line 451 of file srv0start.cc.
References srv_free_paths_and_sizes().
Referenced by innobase_init(), and srv_free_paths_and_sizes().
UNIV_INTERN void srv_normalize_path_for_win | ( | char * | ) |
Normalizes a directory path for Windows: converts slashes to backslashes. in/out: null-terminated character string
Normalizes a directory path for Windows: converts slashes to backslashes.
Definition at line 514 of file srv0start.cc.
References srv_normalize_path_for_win().
Referenced by fil_load_single_table_tablespaces(), innobase_start_or_create_for_mysql(), and srv_normalize_path_for_win().
UNIV_INTERN ibool srv_parse_data_file_paths_and_sizes | ( | char * | str) |
Reads the data files and their sizes from a character string given in the .cnf file.
Reads the data files and their sizes from a character string given in the .cnf file.
str | in/out: the data file path string |
Definition at line 196 of file srv0start.cc.
References SRV_NEW_RAW, SRV_OLD_RAW, and srv_parse_data_file_paths_and_sizes().
Referenced by innobase_init(), and srv_parse_data_file_paths_and_sizes().
UNIV_INTERN ibool srv_parse_log_group_home_dirs | ( | char * | str) |
Reads log group home directories from a character string given in the .cnf file.
Reads log group home directories from a character string given in the .cnf file.
str | in/out: character string |
Definition at line 380 of file srv0start.cc.
References srv_parse_log_group_home_dirs().
Referenced by innobase_init(), and srv_parse_log_group_home_dirs().
ibool srv_is_being_started |
TRUE if the server is being started
Definition at line 117 of file srv0start.cc.
Referenced by innobase_shutdown_for_mysql(), innobase_start_or_create_for_mysql(), and os_file_get_last_error().
ib_uint64_t srv_shutdown_lsn |
Log sequence number at shutdown
Definition at line 102 of file srv0start.cc.
Referenced by innobase_shutdown_for_mysql(), and logs_empty_and_mark_files_at_shutdown().
At a shutdown this value climbs from SRV_SHUTDOWN_NONE to
SRV_SHUTDOWN_CLEANUP and then to SRV_SHUTDOWN_LAST_PHASE, and so on
Definition at line 125 of file srv0start.cc.
ib_uint64_t srv_start_lsn |
Log sequence number immediately after startup
Definition at line 100 of file srv0start.cc.
Referenced by innobase_start_or_create_for_mysql(), logs_empty_and_mark_files_at_shutdown(), recv_recovery_from_checkpoint_start_func(), and srv_error_monitor_thread().
ibool srv_start_raw_disk_in_use |
TRUE if a raw partition is in use
Definition at line 111 of file srv0start.cc.
Referenced by fil_node_create(), and os_file_flush_func().
ibool srv_startup_is_before_trx_rollback_phase |
TRUE if the server is being started, before rolling back any
incomplete transactions
Definition at line 115 of file srv0start.cc.
Referenced by buf_read_ahead_linear(), and innobase_start_or_create_for_mysql().
ibool srv_was_started |
TRUE if the server was successfully started
Definition at line 119 of file srv0start.cc.
Referenced by innobase_shutdown_for_mysql(), and innobase_start_or_create_for_mysql().