mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / innobase / include / srv0start.h
bloba04930d6516cb5bfb84b525de7c758f1b98f5af1
1 /******************************************************
2 Starts the Innobase database server
4 (c) 1995-2000 Innobase Oy
6 Created 10/10/1995 Heikki Tuuri
7 *******************************************************/
10 #ifndef srv0start_h
11 #define srv0start_h
13 #include "univ.i"
14 #include "ut0byte.h"
16 /*************************************************************************
17 Normalizes a directory path for Windows: converts slashes to backslashes. */
19 void
20 srv_normalize_path_for_win(
21 /*=======================*/
22 char* str); /* in/out: null-terminated character string */
23 /*************************************************************************
24 Reads the data files and their sizes from a character string given in
25 the .cnf file. */
27 ibool
28 srv_parse_data_file_paths_and_sizes(
29 /*================================*/
30 /* out: TRUE if ok, FALSE if parsing
31 error */
32 char* str, /* in: the data file path string */
33 char*** data_file_names, /* out, own: array of data file
34 names */
35 ulint** data_file_sizes, /* out, own: array of data file sizes
36 in megabytes */
37 ulint** data_file_is_raw_partition,/* out, own: array of flags
38 showing which data files are raw
39 partitions */
40 ulint* n_data_files, /* out: number of data files */
41 ibool* is_auto_extending, /* out: TRUE if the last data file is
42 auto-extending */
43 ulint* max_auto_extend_size); /* out: max auto extend size for the
44 last file if specified, 0 if not */
45 /*************************************************************************
46 Reads log group home directories from a character string given in
47 the .cnf file. */
49 ibool
50 srv_parse_log_group_home_dirs(
51 /*==========================*/
52 /* out: TRUE if ok, FALSE if parsing
53 error */
54 char* str, /* in: character string */
55 char*** log_group_home_dirs); /* out, own: log group home dirs */
56 /*************************************************************************
57 Adds a slash or a backslash to the end of a string if it is missing
58 and the string is not empty. */
60 char*
61 srv_add_path_separator_if_needed(
62 /*=============================*/
63 /* out: string which has the separator if the
64 string is not empty */
65 char* str); /* in: null-terminated character string */
66 /********************************************************************
67 Starts Innobase and creates a new database if database files
68 are not found and the user wants. Server parameters are
69 read from a file of name "srv_init" in the ib_home directory. */
71 int
72 innobase_start_or_create_for_mysql(void);
73 /*====================================*/
74 /* out: DB_SUCCESS or error code */
75 /********************************************************************
76 Shuts down the Innobase database. */
77 int
78 innobase_shutdown_for_mysql(void);
79 /*=============================*/
80 /* out: DB_SUCCESS or error code */
81 extern dulint srv_shutdown_lsn;
82 extern dulint srv_start_lsn;
84 #ifdef __NETWARE__
85 void set_panic_flag_for_netware(void);
86 #endif
88 #ifdef HAVE_DARWIN_THREADS
89 extern ibool srv_have_fullfsync;
90 #endif
92 extern ulint srv_sizeof_trx_t_in_ha_innodb_cc;
94 extern ibool srv_is_being_started;
95 extern ibool srv_startup_is_before_trx_rollback_phase;
96 extern ibool srv_is_being_shut_down;
98 extern ibool srv_start_raw_disk_in_use;
100 /* At a shutdown the value first climbs from 0 to SRV_SHUTDOWN_CLEANUP
101 and then to SRV_SHUTDOWN_LAST_PHASE, and so on */
103 extern ulint srv_shutdown_state;
105 #define SRV_SHUTDOWN_CLEANUP 1
106 #define SRV_SHUTDOWN_LAST_PHASE 2
107 #define SRV_SHUTDOWN_EXIT_THREADS 3
109 /* Log 'spaces' have id's >= this */
110 #define SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0UL
112 #endif