175
171
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
177
WARNING: When adding new SQL modes don't forget to update the
178
tables definitions that stores it's value.
179
(ie: mysql.event, mysql.proc)
181
172
static const char *optimizer_switch_names[]=
183
174
"no_materialization", "no_semijoin",
205
196
tc_heuristic_recover_names, NULL
208
const char *first_keyword= "first", *binary_keyword= "BINARY";
209
const char *my_localhost= "localhost";
199
const char *first_keyword= "first";
200
const char *binary_keyword= "BINARY";
210
201
const char * const DRIZZLE_CONFIG_NAME= "drizzled";
211
202
#define GET_HA_ROWS GET_ULL
227
218
extern TYPELIB optimizer_use_mrr_typelib;
229
/* the default log output is log tables */
230
220
static bool volatile select_thread_in_use;
231
221
static bool volatile ready_to_exit;
232
222
static bool opt_debugging= 0;
234
224
static uint32_t killed_threads;
235
225
static char *drizzled_user, *drizzled_chroot;
236
226
static char *language_ptr;
237
static char *default_character_set_name;
238
static char *character_set_filesystem_name;
227
static const char *default_character_set_name;
228
static const char *character_set_filesystem_name;
239
229
static char *lc_time_names_name;
240
230
static char *my_bind_addr_str;
241
231
static char *default_collation_name;
242
232
static char *default_storage_engine_str;
243
static char compiled_default_collation_name[]= DRIZZLE_DEFAULT_COLLATION_NAME;
233
static const char *compiled_default_collation_name= "utf8_general_ci";
245
235
/* Global variables */
247
bool server_id_supplied = 0;
248
bool opt_endinfo, using_udf_functions;
249
238
bool locked_in_memory;
250
239
bool volatile abort_loop;
251
240
bool volatile shutdown_in_progress;
262
251
StorageEngine *myisam_engine;
264
253
char* opt_secure_file_priv= 0;
266
True if there is at least one per-hour limit for some user, so we should
267
check them before each query (and possibly reset counters when hour is
268
changed). False otherwise.
272
255
#ifdef HAVE_INITGROUPS
273
256
static bool calling_initgroups= false; /**< Used in SIGSEGV handler. */
882
865
localtime_r(&curr_time, &tm);
883
866
Scheduler &thread_scheduler= get_thread_scheduler();
885
fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - drizzled got "
868
fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - drizzled got signal %d;\n"
887
869
"This could be because you hit a bug. It is also possible that "
888
870
"this binary\n or one of the libraries it was linked against is "
889
871
"corrupt, improperly built,\n or misconfigured. This error can "
1282
1264
/* Creates static regex matching for temporal values */
1283
1265
if (! init_temporal_formats())
1286
Process a comma-separated character set list and choose
1287
the first available character set. This is mostly for
1288
test purposes, to be able to start "mysqld" even if
1289
the requested character set is not available (see bug#18743).
1268
if (!(default_charset_info=
1269
get_charset_by_csname(default_character_set_name, MY_CS_PRIMARY)))
1293
char *next_character_set_name= strchr(default_character_set_name, ',');
1294
if (next_character_set_name)
1295
*next_character_set_name++= '\0';
1296
if (!(default_charset_info=
1297
get_charset_by_csname(default_character_set_name, MY_CS_PRIMARY)))
1299
if (next_character_set_name)
1301
default_character_set_name= next_character_set_name;
1302
default_collation_name= 0; // Ignore collation
1305
return 1; // Eof of the list
1271
return 1; // Eof of the list
1311
1274
if (default_collation_name)
1402
1365
if (ha_init_errors())
1405
if (plugin_init(&defaults_argc, defaults_argv,
1406
(opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) |
1407
(opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
1368
if (plugin_init(&defaults_argc, defaults_argv, (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
1409
errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize plugins."));
1370
errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize plugins."));
1410
1371
unireg_abort(1);
1818
1779
{"bind-address", OPT_BIND_ADDRESS, N_("IP address to bind to."),
1819
1780
(char**) &my_bind_addr_str, (char**) &my_bind_addr_str, 0, GET_STR,
1820
1781
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1821
{"character-set-filesystem", OPT_CHARACTER_SET_FILESYSTEM,
1822
N_("Set the filesystem character set."),
1823
(char**) &character_set_filesystem_name,
1824
(char**) &character_set_filesystem_name,
1825
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
1826
{"character-set-server", 'C',
1827
N_("Set the default character set."),
1828
(char**) &default_character_set_name, (char**) &default_character_set_name,
1829
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
1830
1782
{"chroot", 'r',
1831
1783
N_("Chroot drizzled daemon during startup."),
1832
1784
(char**) &drizzled_chroot, (char**) &drizzled_chroot, 0, GET_STR, REQUIRED_ARG,
2408
2360
cleanup_done= 0;
2409
2361
defaults_argc= 0;
2410
2362
defaults_argv= 0;
2411
server_id_supplied= 0;
2412
2363
dropping_tables= ha_open_options=0;
2413
2364
test_flags.reset();
2415
opt_endinfo= using_udf_functions= 0;
2416
2367
abort_loop= select_thread_in_use= false;
2417
2368
ready_to_exit= shutdown_in_progress= 0;
2418
2369
aborted_threads= aborted_connects= 0;
2455
2406
drizzle_data_home_len= 2;
2457
2408
/* Variables in libraries */
2458
default_character_set_name= (char*) DRIZZLE_DEFAULT_CHARSET_NAME;
2459
default_collation_name= compiled_default_collation_name;
2460
character_set_filesystem_name= (char*) "binary";
2409
default_character_set_name= "utf8";
2410
default_collation_name= (char *)compiled_default_collation_name;
2411
character_set_filesystem_name= "binary";
2461
2412
lc_time_names_name= (char*) "en_US";
2462
2413
/* Set default values for some option variables */
2463
2414
default_storage_engine_str= (char*) "innodb";
2848
2798
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
2849
2799
/* Used templates */
2850
template class I_List<Session>;
2851
template class I_List_iterator<Session>;
2852
2800
template class I_List<i_string>;
2853
2801
template class I_List<i_string_pair>;
2854
2802
template class I_List<NAMED_LIST>;