Drizzled Public API Documentation

srv0start.h File Reference
#include "univ.i"
#include "ut0byte.h"

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
 

Detailed Description

Starts the Innobase database server

Created 10/10/1995 Heikki Tuuri

Definition in file srv0start.h.

Macro Definition Documentation

#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().

Enumeration Type Documentation

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.

Function Documentation

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.

Returns
DB_SUCCESS or error code

Definition at line 971 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_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, srv_master_thread(), srv_max_file_format_at_startup, srv_monitor_thread(), srv_normalize_path_for_win(), srv_purge_thread(), SRV_SHUTDOWN_NONE, srv_start_lsn, srv_startup_is_before_trx_rollback_phase, srv_thread_has_reserved_slot(), 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, SRV_WORKER, 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, ut_print_timestamp(), 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.

Returns
string which has the separator if the string is not empty in: null-terminated character string

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 450 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 513 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.

Returns
TRUE if ok, FALSE on parse error in/out: the data file path string

Reads the data files and their sizes from a character string given in the .cnf file.

Returns
TRUE if ok, FALSE on parse error
Parameters
strin/out: the data file path string

Definition at line 195 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.

Returns
TRUE if ok, FALSE on parse error in/out: character string

Reads log group home directories from a character string given in the .cnf file.

Returns
TRUE if ok, FALSE on parse error
Parameters
strin/out: character string

Definition at line 379 of file srv0start.cc.

References srv_parse_log_group_home_dirs().

Referenced by innobase_init(), and srv_parse_log_group_home_dirs().

Variable Documentation

ibool srv_is_being_started

TRUE if the server is being started

Definition at line 116 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 101 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 124 of file srv0start.cc.

ib_uint64_t srv_start_lsn
ibool srv_start_raw_disk_in_use

TRUE if a raw partition is in use

Definition at line 110 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 114 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 118 of file srv0start.cc.

Referenced by innobase_shutdown_for_mysql(), and innobase_start_or_create_for_mysql().