27
27
#include <signal.h>
29
29
#include <mysys/my_bit.h>
30
#include <libdrizzle/libdrizzle.h>
30
#include <libdrizzleclient/libdrizzle.h>
31
31
#include <mysys/hash.h>
32
32
#include <drizzled/stacktrace.h>
33
33
#include <mysys/mysys_err.h>
466
466
/* Function declarations */
468
pthread_handler_t signal_hand(void *arg);
468
extern "C" pthread_handler_t signal_hand(void *arg);
469
469
static void drizzle_init_variables(void);
470
470
static void get_options(int *argc,char **argv);
471
471
extern "C" bool drizzled_get_one_option(int, const struct my_option *, char *);
474
474
static const char *get_relative_path(const char *path);
475
475
static void fix_paths(void);
476
476
void handle_connections_sockets();
477
pthread_handler_t kill_server_thread(void *arg);
478
pthread_handler_t handle_slave(void *arg);
477
extern "C" pthread_handler_t kill_server_thread(void *arg);
478
extern "C" pthread_handler_t handle_slave(void *arg);
479
479
static uint32_t find_bit_type(const char *x, TYPELIB *bit_lib);
480
480
static uint32_t find_bit_type_or_exit(const char *x, TYPELIB *bit_lib,
481
481
const char *option);
488
488
static void wait_for_signal_thread_to_end(void);
489
489
static void create_pid_file();
490
490
static void drizzled_exit(int exit_code) __attribute__((noreturn));
491
bool safe_read_error_impl(NET *net);
491
extern "C" bool safe_read_error_impl(NET *net);
493
493
/****************************************************************************
494
494
** Code to end drizzled
1838
1836
/* connections and databases needs lots of files */
1840
uint32_t files, wanted_files, max_open_files;
1838
uint64_t files, wanted_files, max_open_files;
1842
1840
/* MyISAM requires two file handles per table. */
1843
1841
wanted_files= 10+max_connections+table_cache_size*2;
1974
1971
if (use_temp_pool && bitmap_init(&temp_pool,0,1024,1))
1976
if (my_database_names_init())
1980
1974
/* Reset table_alias_charset, now that lower_case_table_names is set. */
1981
1975
lower_case_table_names= 1; /* This we need to look at */
2637
2631
{"auto-increment-increment", OPT_AUTO_INCREMENT,
2638
2632
N_("Auto-increment columns are incremented by this"),
2639
2633
(char**) &global_system_variables.auto_increment_increment,
2640
(char**) &max_system_variables.auto_increment_increment, 0, GET_UINT,
2641
OPT_ARG, 1, 1, 65535, 0, 1, 0 },
2634
(char**) &max_system_variables.auto_increment_increment, 0, GET_ULL,
2635
OPT_ARG, 1, 1, UINT64_MAX, 0, 1, 0 },
2642
2636
{"auto-increment-offset", OPT_AUTO_INCREMENT_OFFSET,
2643
2637
N_("Offset added to Auto-increment columns. Used when "
2644
2638
"auto-increment-increment != 1"),
2645
2639
(char**) &global_system_variables.auto_increment_offset,
2646
(char**) &max_system_variables.auto_increment_offset, 0, GET_UINT, OPT_ARG,
2647
1, 1, 65535, 0, 1, 0 },
2640
(char**) &max_system_variables.auto_increment_offset, 0, GET_ULL, OPT_ARG,
2641
1, 1, UINT64_MAX, 0, 1, 0 },
2648
2642
{"basedir", 'b',
2649
2643
N_("Path to installation directory. All paths are usually resolved "
2650
2644
"relative to this."),
3378
3372
abort_loop= select_thread_in_use= signal_thread_in_use= 0;
3379
3373
ready_to_exit= shutdown_in_progress= 0;
3380
3374
aborted_threads= aborted_connects= 0;
3381
max_used_connections= slow_launch_threads = 0;
3375
max_used_connections= 0;
3376
slow_launch_threads= 0;
3382
3377
drizzled_user= drizzled_chroot= opt_init_file= opt_bin_logname = 0;
3383
3378
my_bind_addr_str= NULL;
3384
3379
memset(&global_status_var, 0, sizeof(global_status_var));