CUBRID Engine  latest
boot_cl.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * boot_cl.h - Boot management in the client (interface)
22  *
23  * Note: See .c file for overview and description of the interface functions.
24  *
25  */
26 
27 #ifndef _BOOT_CL_H_
28 #define _BOOT_CL_H_
29 
30 #ident "$Id$"
31 
32 #if !defined(WINDOWS)
33 #include <sys/time.h>
34 #endif /* !WINDOWS */
35 
36 #include "porting.h"
37 #include "boot.h"
38 #include "error_manager.h"
39 #include "storage_common.h"
40 #include "transaction_cl.h"
41 
42 #define BOOT_IS_CLIENT_RESTARTED() (tm_Tran_index != NULL_TRAN_INDEX)
43 
44 /* Volume assigned for new files/objects (e.g., heap files) */
45 extern VOLID boot_User_volid;
46 #if defined(CS_MODE)
47 /* Server host connected */
48 extern char boot_Host_connected[CUB_MAXHOSTNAMELEN];
49 #endif /* CS_MODE */
50 
51 extern int boot_initialize_client (BOOT_CLIENT_CREDENTIAL * client_credential, BOOT_DB_PATH_INFO * db_path_info,
52  bool db_overwrite, const char *file_addmore_vols, DKNPAGES npages,
53  PGLENGTH db_desired_pagesize, DKNPAGES log_npages, PGLENGTH db_desired_log_page_size,
54  const char *lang_charset);
55 extern int boot_restart_client (BOOT_CLIENT_CREDENTIAL * client_credential);
56 extern int boot_shutdown_client (bool iserfinal);
57 extern void boot_donot_shutdown_client_at_exit (void);
58 extern void boot_server_die_or_changed (void);
59 extern void boot_client_all_finalize (bool iserfinal);
60 #if defined(CS_MODE)
61 extern char *boot_get_host_connected (void);
62 extern HA_SERVER_STATE boot_get_ha_server_state (void);
63 extern const char *boot_get_lob_path (void);
64 #endif /* CS_MODE */
65 
66 extern char *boot_get_host_name (void);
67 
68 #if defined(SA_MODE)
69 extern int boot_build_catalog_classes (const char *dbname);
70 extern int boot_destroy_catalog_classes (void);
71 #if defined(ENABLE_UNUSED_FUNCTION)
72 extern int boot_rebuild_catalog_classes (const char *dbname);
73 #endif /* ENABLE_UNUSED_FUNCTION */
74 #endif /* SA_MODE */
75 extern void boot_clear_host_connected (void);
76 extern char *boot_get_server_session_key (void);
77 extern void boot_set_server_session_key (const char *key);
78 extern int boot_add_collations (MOP class_mop);
79 #endif /* _BOOT_CL_H_ */
int boot_shutdown_client(bool iserfinal)
Definition: boot_cl.c:1396
void boot_clear_host_connected(void)
Definition: boot_cl.c:5717
PAGEID DKNPAGES
const char * boot_get_lob_path(void)
Definition: boot_sr.c:479
int boot_restart_client(BOOT_CLIENT_CREDENTIAL *client_credential)
Definition: boot_cl.c:738
void boot_donot_shutdown_client_at_exit(void)
Definition: boot_cl.c:1485
INT16 VOLID
int boot_initialize_client(BOOT_CLIENT_CREDENTIAL *client_credential, BOOT_DB_PATH_INFO *db_path_info, bool db_overwrite, const char *file_addmore_vols, DKNPAGES npages, PGLENGTH db_desired_pagesize, DKNPAGES log_npages, PGLENGTH db_desired_log_page_size, const char *lang_charset)
Definition: boot_cl.c:290
INTL_CODESET lang_charset(void)
void boot_set_server_session_key(const char *key)
Definition: boot_cl.c:5801
void boot_server_die_or_changed(void)
Definition: boot_cl.c:1503
static char * dbname
VOLID boot_User_volid
Definition: boot_cl.c:153
char * boot_get_server_session_key(void)
Definition: boot_cl.c:5792
INT16 PGLENGTH
int boot_add_collations(MOP class_mop)
Definition: boot_cl.c:3661
enum ha_server_state HA_SERVER_STATE
Definition: boot.h:126
#define CUB_MAXHOSTNAMELEN
Definition: porting.h:379
char * boot_get_host_name(void)
Definition: boot_cl.c:5725
void boot_client_all_finalize(bool iserfinal)
Definition: boot_cl.c:1536