~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/srv0start.h

  • Committer: Mats Kindahl
  • Date: 2008-08-26 07:32:59 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: mats@mysql.com-20080826073259-9k4evtajgldgolli
Replaced use of thd_proc_info() macro with calls to
set_proc_info() and get_proc_info() internally.  Introduced
functions set_thd_proc_info() and get_thd_proc_info() for
external users, i.e., plug-ins.

The set_thd_proc_info() accepted callers info that can be used to
print debug output, but the information was not used. The return
value was changed to void and the old value is not fetched any
more. To be able to get the value of proc_info for external
users, the function get_thd_proc_info() was introduced.

The thd_proc_info() macro called set_thd_proc_info() but almost
never used the return value of set_thd_proc_info() so the macro
was replaced with a call of THD::set_proc_info().

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
Starts the Innobase database server
 
3
 
 
4
(c) 1995-2000 Innobase Oy
 
5
 
 
6
Created 10/10/1995 Heikki Tuuri
 
7
*******************************************************/
 
8
 
 
9
 
 
10
#ifndef srv0start_h
 
11
#define srv0start_h
 
12
 
 
13
#include "univ.i"
 
14
#include "ut0byte.h"
 
15
 
 
16
/*************************************************************************
 
17
Normalizes a directory path for Windows: converts slashes to backslashes. */
 
18
 
 
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. */
 
26
 
 
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. */
 
48
 
 
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. */
 
59
 
 
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. */
 
70
 
 
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;
 
83
 
 
84
#ifdef HAVE_DARWIN_THREADS
 
85
extern  ibool   srv_have_fullfsync;
 
86
#endif
 
87
 
 
88
extern  ulint   srv_sizeof_trx_t_in_ha_innodb_cc;
 
89
 
 
90
extern  ibool   srv_is_being_started;
 
91
extern  ibool   srv_startup_is_before_trx_rollback_phase;
 
92
extern  ibool   srv_is_being_shut_down;
 
93
 
 
94
extern  ibool   srv_start_raw_disk_in_use;
 
95
 
 
96
/* At a shutdown the value first climbs from 0 to SRV_SHUTDOWN_CLEANUP
 
97
and then to SRV_SHUTDOWN_LAST_PHASE, and so on */
 
98
 
 
99
extern  ulint   srv_shutdown_state;
 
100
 
 
101
#define SRV_SHUTDOWN_CLEANUP       1
 
102
#define SRV_SHUTDOWN_LAST_PHASE    2
 
103
#define SRV_SHUTDOWN_EXIT_THREADS  3
 
104
 
 
105
/* Log 'spaces' have id's >= this */
 
106
#define SRV_LOG_SPACE_FIRST_ID          0xFFFFFFF0UL
 
107
 
 
108
#endif