376
376
extern "C" pthread_handler_t signal_hand(void *arg);
377
377
static void drizzle_init_variables(void);
378
378
static void get_options(int *argc,char **argv);
379
int drizzled_get_one_option(int, const struct my_option *, char *);
379
bool drizzled_get_one_option(int, const struct my_option *, char *);
380
380
static int init_thread_environment();
381
381
static const char *get_relative_path(const char *path);
382
382
static void fix_paths(string &progname);
549
550
if (print_message && server_start_time)
550
551
errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_SHUTDOWN_COMPLETE)),internal::my_progname);
552
/* Returns NULL on globerrs, we don't want to try to free that */
554
(void *)my_error_unregister(ER_ERROR_FIRST, ER_ERROR_LAST);
555
// TODO!!!! EPIC FAIL!!!! This sefaults if uncommented.
556
/* if (freeme != NULL)
551
558
(void) pthread_mutex_lock(&LOCK_thread_count);
553
560
/* do the broadcast inside the lock to ensure that my_end() is not called */
966
static st_show_var_func_container show_starttime_cont= { &show_starttime };
968
static st_show_var_func_container show_flushstatustime_cont= { &show_flushstatustime };
973
static int show_open_tables(drizzle_show_var *var, char *buff)
975
var->type= SHOW_LONG;
977
*((long *)buff)= (long)cached_open_tables();
981
static int show_table_definitions(drizzle_show_var *var, char *buff)
983
var->type= SHOW_LONG;
985
*((long *)buff)= (long)cached_table_definitions();
989
static st_show_var_func_container
990
show_open_tables_cont= { &show_open_tables };
991
static st_show_var_func_container
992
show_table_definitions_cont= { &show_table_definitions };
993
static st_show_var_func_container
994
show_starttime_cont= { &show_starttime };
995
static st_show_var_func_container
996
show_flushstatustime_cont= { &show_flushstatustime };
971
999
Variables shown by SHOW STATUS in alphabetical order
1044
1072
{"Key_writes", (char*) offsetof(KEY_CACHE, global_cache_write), SHOW_KEY_CACHE_LONGLONG},
1045
1073
{"Last_query_cost", (char*) offsetof(system_status_var, last_query_cost), SHOW_DOUBLE_STATUS},
1046
1074
{"Max_used_connections", (char*) &max_used_connections, SHOW_INT},
1075
{"Open_table_definitions", (char*) &show_table_definitions_cont, SHOW_FUNC},
1076
{"Open_tables", (char*) &show_open_tables_cont, SHOW_FUNC},
1077
{"Opened_tables", (char*) offsetof(system_status_var, opened_tables), SHOW_LONG_STATUS},
1078
{"Opened_table_definitions", (char*) offsetof(system_status_var, opened_shares), SHOW_LONG_STATUS},
1047
1079
{"Questions", (char*) offsetof(system_status_var, questions), SHOW_LONG_STATUS},
1048
1080
{"Select_full_join", (char*) offsetof(system_status_var, select_full_join_count), SHOW_LONG_STATUS},
1049
1081
{"Select_full_range_join", (char*) offsetof(system_status_var, select_full_range_join_count), SHOW_LONG_STATUS},
1237
1271
/* Allow storage engine to give real error messages */
1272
if (ha_init_errors())
1240
1275
if (plugin_init(plugins, &defaults_argc, defaults_argv,
1241
1276
((opt_help) ? true : false)))
1938
1973
if (getaddrinfo(argument, NULL, &hints, &res_lst) != 0)
1940
1975
errmsg_printf(ERRMSG_LVL_ERROR, _("Can't start server: cannot resolve hostname!"));
1941
return EXIT_ARGUMENT_INVALID;
1944
1979
if (res_lst->ai_next)
1946
1981
errmsg_printf(ERRMSG_LVL_ERROR, _("Can't start server: bind-address refers to "
1947
1982
"multiple interfaces!"));
1948
return EXIT_ARGUMENT_INVALID;
1950
1985
freeaddrinfo(res_lst);