249
251
int abort_pipe[2];
250
252
bool volatile shutdown_in_progress;
251
253
uint32_t max_used_connections;
252
const char *opt_scheduler= "multi_thread";
254
const string opt_scheduler_default("multi_thread");
255
char *opt_scheduler= NULL;
253
257
const char *opt_protocol= "oldlibdrizzle";
255
259
size_t my_thread_stack_size= 65536;
327
331
time_t server_start_time;
328
332
time_t flush_status_time;
331
const char *reg_ext= ".frm";
332
uint32_t reg_ext_length= 4;
334
334
char drizzle_home[FN_REFLEN], pidfile_name[FN_REFLEN], system_time_zone[30];
335
335
char *default_tz_name;
336
336
char glob_hostname[FN_REFLEN];
448
448
void close_connections(void)
450
450
/* Abort listening to new connections */
451
assert(write(abort_pipe[1], "\0", 1) == 1);
451
ssize_t ret= write(abort_pipe[1], "\0", 1);
453
454
/* kill connection thread */
454
455
(void) pthread_mutex_lock(&LOCK_thread_count);
1601
string scheduler_name;
1604
scheduler_name= opt_scheduler;
1608
scheduler_name= opt_scheduler_default;
1611
if (set_scheduler_factory(scheduler_name))
1613
errmsg_printf(ERRMSG_LVL_ERROR,
1614
_("No scheduler found, cannot continue!\n"));
1600
1618
/* We have to initialize the storage engines before CSV logging */
2193
2213
"DEFAULT, BACKUP, FORCE or QUICK."),
2194
2214
(char**) &myisam_recover_options_str, (char**) &myisam_recover_options_str, 0,
2195
2215
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
2196
{"old-alter-table", OPT_OLD_ALTER_TABLE,
2197
N_("Use old, non-optimized alter table."),
2198
(char**) &global_system_variables.old_alter_table,
2199
(char**) &max_system_variables.old_alter_table, 0, GET_BOOL, NO_ARG,
2201
2216
{"pid-file", OPT_PID_FILE,
2202
2217
N_("Pid file used by safe_mysqld."),
2203
2218
(char**) &pidfile_name_ptr, (char**) &pidfile_name_ptr, 0, GET_STR,
2440
2455
(char**) &global_system_variables.optimizer_search_depth,
2441
2456
(char**) &max_system_variables.optimizer_search_depth,
2442
2457
0, GET_UINT, OPT_ARG, MAX_TABLES+1, 0, MAX_TABLES+2, 0, 1, 0},
2458
{"optimizer_use_mrr", OPT_OPTIMIZER_USE_MRR,
2459
N_("Should the Optmizer use MRR or not. "
2460
"Valid values are auto, force and disable"),
2461
0, 0, 0, GET_STR, REQUIRED_ARG, 0,
2443
2463
{"plugin_dir", OPT_PLUGIN_DIR,
2444
2464
N_("Directory for plugins."),
2445
2465
(char**) &opt_plugin_dir_ptr, (char**) &opt_plugin_dir_ptr, 0,
2446
2466
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
2447
2467
{"plugin_load", OPT_PLUGIN_LOAD,
2448
N_("Optional colon (or semicolon) separated list of plugins to load,"
2449
"where each plugin is identified by the name of the shared library. "
2450
"[for example: --plugin_load=libmd5udf.so:libauth_pam.so]"),
2468
N_("Optional comma separated list of plugins to load at starup."
2469
"[for example: --plugin_load=crc32,logger_gearman]"),
2451
2470
(char**) &opt_plugin_load, (char**) &opt_plugin_load, 0,
2452
2471
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
2453
2472
{"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
2455
2474
(char**) &global_system_variables.preload_buff_size,
2456
2475
(char**) &max_system_variables.preload_buff_size, 0, GET_ULL,
2457
2476
REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
2458
{"protocol", OPT_SCHEDULER,
2477
{"protocol", OPT_PROTOCOL,
2459
2478
N_("Select protocol to be used (by default oldlibdrizzle)."),
2460
2479
(char**) &opt_protocol, (char**) &opt_protocol, 0,
2461
2480
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
2493
2512
GET_UINT, REQUIRED_ARG, 256*1024L, 64 /*IO_SIZE*2+MALLOC_OVERHEAD*/ ,
2494
2513
UINT32_MAX, MALLOC_OVERHEAD, 1 /* Small lower limit to be able to test MRR */, 0},
2495
2514
{"scheduler", OPT_SCHEDULER,
2496
N_("Select scheduler to be used (by default pool-of-threads)."),
2497
(char**) &opt_scheduler, (char**) &opt_scheduler, 0,
2498
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
2515
N_("Select scheduler to be used (by default multi-thread)."),
2516
(char**)&opt_scheduler, (char**)&opt_scheduler,
2517
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
2499
2518
{"sort_buffer_size", OPT_SORT_BUFFER,
2500
2519
N_("Each thread that needs to do a sort allocates a buffer of this size."),
2501
2520
(char**) &global_system_variables.sortbuff_size,