397
415
static char *character_set_filesystem_name;
398
416
static char *lc_time_names_name;
399
417
static char *my_bind_addr_str;
400
static char *default_collation_name;
418
static char *default_collation_name;
401
419
static char *default_storage_engine_str;
402
420
static char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME;
403
421
static I_List<THD> thread_cache;
404
422
static double long_query_time;
423
static ulong opt_my_crc_dbug_check;
406
425
static pthread_cond_t COND_thread_cache, COND_flush_thread_cache;
508
530
ulonglong thd_startup_options;
509
531
ulong back_log, connect_timeout, concurrency, server_id;
510
532
ulong table_cache_size, table_def_size;
511
ulong thread_stack, what_to_log;
512
534
ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
513
535
ulong open_files_limit, max_binlog_size, max_relay_log_size;
514
536
ulong slave_net_timeout, slave_trans_retries;
656
678
pthread_key(THD*, THR_THD);
657
679
pthread_mutex_t LOCK_mysql_create_db, LOCK_Acl, LOCK_open, LOCK_thread_count,
658
680
LOCK_mapped_file, LOCK_status, LOCK_global_read_lock,
659
LOCK_error_log, LOCK_uuid_generator,
660
682
LOCK_delayed_insert, LOCK_delayed_status, LOCK_delayed_create,
661
683
LOCK_crypt, LOCK_bytes_sent, LOCK_bytes_received,
662
684
LOCK_global_system_variables,
663
LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
685
LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
664
686
LOCK_connection_count;
665
pthread_mutex_t LOCK_backup;
668
689
The below lock protects access to two global server variables:
862
883
(void) pthread_mutex_lock(&LOCK_manager);
863
884
if (manager_thread_in_use)
865
DBUG_PRINT("quit", ("killing manager thread: 0x%lx",
866
(ulong)manager_thread));
886
DBUG_PRINT("quit", ("killing manager thread: 0x%llx",
887
(ulonglong)manager_thread));
867
888
(void) pthread_cond_signal(&COND_manager);
869
890
(void) pthread_mutex_unlock(&LOCK_manager);
871
892
/* kill connection thread */
872
893
#if !defined(__WIN__) && !defined(__NETWARE__)
873
DBUG_PRINT("quit", ("waiting for select thread: 0x%lx",
874
(ulong) select_thread));
894
DBUG_PRINT("quit", ("waiting for select thread: 0x%llx",
895
(ulonglong)select_thread));
875
896
(void) pthread_mutex_lock(&LOCK_thread_count);
877
898
while (select_thread_in_use)
1061
1082
unix_sock=INVALID_SOCKET;
1062
1083
DBUG_PRINT("info",("calling shutdown on unix socket"));
1063
VOID(shutdown(tmp_sock, SHUT_RDWR));
1084
(void) shutdown(tmp_sock, SHUT_RDWR);
1064
1085
#if defined(__NETWARE__)
1066
1087
The following code is disabled for normal systems as it may cause MySQL
1067
1088
to hang on AIX 4.3 during shutdown
1069
1090
DBUG_PRINT("info",("calling closesocket on unix/IP socket"));
1070
VOID(closesocket(tmp_sock));
1091
(void) closesocket(tmp_sock);
1072
VOID(unlink(mysqld_unix_port));
1093
(void) unlink(mysqld_unix_port);
1074
1095
DBUG_VOID_RETURN;
1163
1184
sql_print_error(ER(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */
1165
#if defined(HAVE_SMEM) && defined(__WIN__)
1167
Send event to smem_event_connect_request for aborting
1169
if (!SetEvent(smem_event_connect_request))
1172
("Got error: %ld from SetEvent of smem_event_connect_request",
1186
#if defined(HAVE_SMEM) && defined(__WIN__)
1188
Send event to smem_event_connect_request for aborting
1190
if (!SetEvent(smem_event_connect_request))
1193
("Got error: %ld from SetEvent of smem_event_connect_request",
1177
1198
close_connections();
1178
1199
if (sig != MYSQL_KILL_SIGNAL &&
2511
2543
We will try our best to scrape up some info that will hopefully help diagnose\n\
2512
2544
the problem, but since we have already crashed, something is definitely wrong\n\
2513
2545
and this may fail.\n\n");
2514
fprintf(stderr, "key_buffer_size=%lu\n",
2546
fprintf(stderr, "key_buffer_size=%lu\n",
2515
2547
(ulong) dflt_key_cache->key_cache_mem_size);
2516
2548
fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size);
2517
2549
fprintf(stderr, "max_used_connections=%lu\n", max_used_connections);
2702
2736
sigaddset(&set,THR_SERVER_ALARM);
2703
2737
if (test_flags & TEST_SIGINT)
2705
my_sigset(thr_kill_signal, end_thread_signal);
2706
2739
// May be SIGINT
2707
2740
sigdelset(&set, thr_kill_signal);
2741
sigdelset(&set, SIGINT);
2742
my_sigset(thr_kill_signal, end_thread_signal);
2743
my_sigset(SIGINT, end_thread_signal);
2710
2746
sigaddset(&set,SIGINT);
2711
2748
sigprocmask(SIG_SETMASK,&set,NULL);
2712
2749
pthread_sigmask(SIG_SETMASK,&set,NULL);
2713
2750
DBUG_VOID_RETURN;
2905
2942
for the client.
2908
extern "C" int my_message_sql(uint error, const char *str, myf MyFlags);
2945
extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
2910
int my_message_sql(uint error, const char *str, myf MyFlags)
2947
void my_message_sql(uint error, const char *str, myf MyFlags)
2950
MYSQL_ERROR::enum_warning_level level;
2951
sql_print_message_func func;
2913
2952
DBUG_ENTER("my_message_sql");
2914
2953
DBUG_PRINT("error", ("error: %u message: '%s'", error, str));
2918
2957
DBUG_ASSERT(error != 0);
2959
if (MyFlags & ME_JUST_INFO)
2961
level= MYSQL_ERROR::WARN_LEVEL_NOTE;
2962
func= sql_print_information;
2964
else if (MyFlags & ME_JUST_WARNING)
2966
level= MYSQL_ERROR::WARN_LEVEL_WARN;
2967
func= sql_print_warning;
2971
level= MYSQL_ERROR::WARN_LEVEL_ERROR;
2972
func= sql_print_error;
2920
2975
if ((thd= current_thd))
2977
if (MyFlags & ME_FATALERROR)
2978
thd->is_fatal_error= 1;
2980
#ifdef BUG_36098_FIXED
2922
2981
mysql_audit_general(thd,MYSQL_AUDIT_GENERAL_ERROR,error,my_time(0),
2923
2982
0,0,str,str ? strlen(str) : 0,
2924
2983
thd->query,thd->query_length,
2925
2984
thd->variables.character_set_client,
2926
2985
thd->row_count);
2930
2990
TODO: There are two exceptions mechanism (THD and sp_rcontext),
2931
2991
this could be improved by having a common stack of handlers.
2933
if (thd->handle_error(error, str,
2934
MYSQL_ERROR::WARN_LEVEL_ERROR))
2993
if (thd->handle_error(error, str, level))
2996
if (level == MYSQL_ERROR::WARN_LEVEL_WARN)
2997
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, error, str);
2998
if (level != MYSQL_ERROR::WARN_LEVEL_ERROR)
2937
3001
thd->is_slave_error= 1; // needed to catch query errors during replication
2966
3030
If a continue handler is found, the error message will be cleared
2967
3031
by the stored procedures code.
3033
if (!thd->is_fatal_error && thd->spcont &&
3034
! (MyFlags & ME_NO_SP_HANDLER) &&
2970
3035
thd->spcont->handle_error(error, MYSQL_ERROR::WARN_LEVEL_ERROR, thd))
2973
3038
Do not push any warnings, a handled error must be completely
2979
if (!thd->no_warnings_for_error)
3044
if (!thd->is_fatal_error && !thd->no_warnings_for_error &&
3045
!(MyFlags & ME_NO_WARNING_FOR_ERROR))
2982
3048
Suppress infinite recursion if there a memory allocation error
3164
3231
{"savepoint", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SAVEPOINT]), SHOW_LONG_STATUS},
3165
3232
{"select", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SELECT]), SHOW_LONG_STATUS},
3166
3233
{"set_option", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SET_OPTION]), SHOW_LONG_STATUS},
3167
{"show_archive", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ARCHIVE]), SHOW_LONG_STATUS},
3168
3234
{"show_authors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_AUTHORS]), SHOW_LONG_STATUS},
3169
3235
{"show_binlog_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOG_EVENTS]), SHOW_LONG_STATUS},
3170
3236
{"show_binlogs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOGS]), SHOW_LONG_STATUS},
3171
3237
{"show_charsets", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CHARSETS]), SHOW_LONG_STATUS},
3172
3238
{"show_collations", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLLATIONS]), SHOW_LONG_STATUS},
3173
{"show_column_types", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLUMN_TYPES]), SHOW_LONG_STATUS},
3174
3239
{"show_contributors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CONTRIBUTORS]), SHOW_LONG_STATUS},
3175
3240
{"show_create_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
3176
3241
{"show_create_event", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_EVENT]), SHOW_LONG_STATUS},
3218
3283
{"stmt_execute", (char*) offsetof(STATUS_VAR, com_stmt_execute), SHOW_LONG_STATUS},
3219
3284
{"stmt_fetch", (char*) offsetof(STATUS_VAR, com_stmt_fetch), SHOW_LONG_STATUS},
3220
3285
{"stmt_prepare", (char*) offsetof(STATUS_VAR, com_stmt_prepare), SHOW_LONG_STATUS},
3286
{"stmt_reprepare", (char*) offsetof(STATUS_VAR, com_stmt_reprepare), SHOW_LONG_STATUS},
3221
3287
{"stmt_reset", (char*) offsetof(STATUS_VAR, com_stmt_reset), SHOW_LONG_STATUS},
3222
3288
{"stmt_send_long_data", (char*) offsetof(STATUS_VAR, com_stmt_send_long_data), SHOW_LONG_STATUS},
3223
3289
{"truncate", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_TRUNCATE]), SHOW_LONG_STATUS},
3595
3668
(void) my_rwlock_init(&LOCK_system_variables_hash, NULL);
3596
3669
(void) pthread_mutex_init(&LOCK_global_read_lock, MY_MUTEX_INIT_FAST);
3597
3670
(void) pthread_mutex_init(&LOCK_prepared_stmt_count, MY_MUTEX_INIT_FAST);
3598
(void) pthread_mutex_init(&LOCK_uuid_generator, MY_MUTEX_INIT_FAST);
3599
(void) pthread_mutex_init(&LOCK_backup, MY_MUTEX_INIT_FAST);
3671
(void) pthread_mutex_init(&LOCK_uuid_short, MY_MUTEX_INIT_FAST);
3600
3672
(void) pthread_mutex_init(&LOCK_connection_count, MY_MUTEX_INIT_FAST);
3601
3673
#ifdef HAVE_OPENSSL
3602
3674
(void) pthread_mutex_init(&LOCK_des_key_file,MY_MUTEX_INIT_FAST);
3656
3730
#if defined(HAVE_OPENSSL) && !defined(HAVE_YASSL)
3657
3731
static unsigned long openssl_id_function()
3659
3733
return (unsigned long) pthread_self();
3663
3737
static openssl_lock_t *openssl_dynlock_create(const char *file, int line)
3665
3739
openssl_lock_t *lock= new openssl_lock_t;
3666
3740
my_rwlock_init(&lock->lock, NULL);
3671
static void openssl_dynlock_destroy(openssl_lock_t *lock, const char *file,
3745
static void openssl_dynlock_destroy(openssl_lock_t *lock, const char *file,
3674
3748
rwlock_destroy(&lock->lock);
3774
3848
We need to call each of these following functions to ensure that
3775
3849
all things are initialized so that unireg_abort() doesn't fail
3777
if (table_cache_init() | table_def_init() | hostname_cache_init())
3852
if (table_def_init() | hostname_cache_init())
3778
3853
unireg_abort(1);
3780
3855
query_cache_result_size_limit(query_cache_limit);
3781
3856
query_cache_set_min_res_unit(query_cache_min_res_unit);
3782
3857
query_cache_init();
3783
3858
query_cache_resize(query_cache_size);
3784
randominit(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
3859
my_rnd_init(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
3786
3861
init_thr_lock();
3862
my_uuid_init((ulong) (my_rnd(&sql_rand))*12345,12345);
3787
3863
#ifdef HAVE_REPLICATION
3788
3864
init_slave_list();
4075
Need to unlock as global_system_variables.table_plugin
4169
Need to unlock as global_system_variables.table_plugin
4076
4170
was acquired during plugin_init()
4078
4172
plugin_unlock(0, global_system_variables.table_plugin);
4079
4173
global_system_variables.table_plugin= plugin;
4176
#if defined(WITH_MARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)
4177
if (!ha_storage_engine_is_enabled(maria_hton) && !opt_bootstrap)
4179
sql_print_error("Maria engine is not enabled or did not start. The Maria engine must be enabled to continue as mysqld was configured with --with-maria-tmp-tables");
4083
4184
tc_log= (total_ha_2pc > 1 ? (opt_bin_log ?
4084
4185
(TC_LOG *) &mysql_bin_log :
4324
4422
stack_size/= 2;
4326
4424
/* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */
4327
if (stack_size && stack_size < thread_stack)
4425
if (stack_size && stack_size < my_thread_stack_size)
4329
4427
if (global_system_variables.log_warnings)
4330
4428
sql_print_warning("Asked for %lu thread stack, but got %ld",
4331
thread_stack, (long) stack_size);
4429
my_thread_stack_size, (long) stack_size);
4332
4430
#if defined(__ia64__) || defined(__ia64)
4333
thread_stack= stack_size*2;
4431
my_thread_stack_size= stack_size*2;
4335
thread_stack= stack_size;
4433
my_thread_stack_size= stack_size;
5489
5586
enum options_mysqld
5491
OPT_ISAM_LOG=256, OPT_SKIP_NEW,
5492
OPT_SKIP_GRANT, OPT_SKIP_LOCK,
5588
OPT_ISAM_LOG=256, OPT_SKIP_NEW,
5589
OPT_SKIP_GRANT, OPT_SKIP_LOCK,
5493
5590
OPT_ENABLE_LOCK, OPT_USE_LOCKING,
5494
5591
OPT_SOCKET, OPT_UPDATE_LOG,
5495
5592
OPT_BIN_LOG, OPT_SKIP_RESOLVE,
5513
5610
#ifndef DBUG_OFF
5514
5611
OPT_BINLOG_SHOW_XID,
5516
OPT_BINLOG_ROWS_EVENT_MAX_SIZE,
5613
OPT_BINLOG_ROWS_EVENT_MAX_SIZE,
5517
5614
OPT_WANT_CORE, OPT_CONCURRENT_INSERT,
5518
5615
OPT_MEMLOCK, OPT_MYISAM_RECOVER,
5519
5616
OPT_REPLICATE_REWRITE_DB, OPT_SERVER_ID,
5520
OPT_SKIP_SLAVE_START, OPT_SAFE_SHOW_DB,
5617
OPT_SKIP_SLAVE_START, OPT_SAFE_SHOW_DB,
5521
5618
OPT_SAFEMALLOC_MEM_LIMIT, OPT_REPLICATE_DO_TABLE,
5522
5619
OPT_REPLICATE_IGNORE_TABLE, OPT_REPLICATE_WILD_DO_TABLE,
5523
5620
OPT_REPLICATE_WILD_IGNORE_TABLE, OPT_REPLICATE_SAME_SERVER_ID,
5524
5621
OPT_DISCONNECT_SLAVE_EVENT_COUNT, OPT_TC_HEURISTIC_RECOVER,
5525
5622
OPT_ABORT_SLAVE_EVENT_COUNT,
5526
5623
OPT_LOG_BIN_TRUST_FUNCTION_CREATORS,
5527
OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDB_CONNECTSTRING,
5624
OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDB_CONNECTSTRING,
5528
5625
OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS,
5529
5626
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
5530
5627
OPT_NDB_SHM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_NDB_CACHE_CHECK_TIME,
5572
5669
OPT_MAX_SEEKS_FOR_KEY, OPT_MAX_TMP_TABLES, OPT_MAX_USER_CONNECTIONS,
5573
5670
OPT_MAX_LENGTH_FOR_SORT_DATA,
5574
5671
OPT_MAX_WRITE_LOCK_COUNT, OPT_BULK_INSERT_BUFFER_SIZE,
5575
OPT_MAX_ERROR_COUNT, OPT_MULTI_RANGE_COUNT, OPT_MYISAM_DATA_POINTER_SIZE,
5672
OPT_MAX_ERROR_COUNT, OPT_MYISAM_DATA_POINTER_SIZE,
5576
5674
OPT_MYISAM_BLOCK_SIZE, OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
5577
5675
OPT_MYISAM_MAX_SORT_FILE_SIZE, OPT_MYISAM_SORT_BUFFER_SIZE,
5578
OPT_MYISAM_USE_MMAP,
5676
OPT_MYISAM_USE_MMAP, OPT_MYISAM_REPAIR_THREADS,
5579
5677
OPT_MYISAM_STATS_METHOD,
5679
OPT_PAGECACHE_BUFFER_SIZE,
5680
OPT_PAGECACHE_DIVISION_LIMIT, OPT_PAGECACHE_AGE_THRESHOLD,
5580
5682
OPT_NET_BUFFER_LENGTH, OPT_NET_RETRY_COUNT,
5581
5683
OPT_NET_READ_TIMEOUT, OPT_NET_WRITE_TIMEOUT,
5582
5684
OPT_OPEN_FILES_LIMIT,
5721
5827
"The maximum size of a row-based binary log event in bytes. Rows will be "
5722
5828
"grouped into events smaller than this size if possible. "
5723
5829
"The value has to be a multiple of 256.",
5724
(uchar**) &opt_binlog_rows_event_max_size,
5725
(uchar**) &opt_binlog_rows_event_max_size, 0,
5726
GET_ULONG, REQUIRED_ARG,
5727
/* def_value */ 1024, /* min_value */ 256, /* max_value */ ULONG_MAX,
5728
/* sub_size */ 0, /* block_size */ 256,
5830
(uchar**) &opt_binlog_rows_event_max_size,
5831
(uchar**) &opt_binlog_rows_event_max_size, 0,
5832
GET_ULONG, REQUIRED_ARG,
5833
/* def_value */ 1024, /* min_value */ 256,
5834
/* max_value */ (longlong) ULONG_MAX,
5835
/* sub_size */ 0, /* block_size */ 256,
5729
5836
/* app_type */ 0
5731
5838
#ifndef DISABLE_GRANT_OPTIONS
5772
5879
#ifndef DBUG_OFF
5773
5880
{"debug", '#', "Debug log.", (uchar**) &default_dbug_option,
5774
5881
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
5882
{"debug-crc-break", OPT_DEBUG_CRC,
5883
"Call my_debug_put_break_here() if crc matches this number (for debug).",
5884
(uchar**) &opt_my_crc_dbug_check, (uchar**) &opt_my_crc_dbug_check,
5885
0, GET_ULONG, REQUIRED_ARG, 0, 0, ~(ulong) 0L, 0, 0, 0},
5776
5887
{"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).",
5777
5888
(uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
5921
6032
(uchar**) &log_error_file_ptr, (uchar**) &log_error_file_ptr, 0, GET_STR,
5922
6033
OPT_ARG, 0, 0, 0, 0, 0, 0},
5923
6034
{"log-isam", OPT_ISAM_LOG, "Log all MyISAM changes to file.",
5924
(uchar**) &myisam_log_filename, (uchar**) &myisam_log_filename, 0, GET_STR,
5925
OPT_ARG, 0, 0, 0, 0, 0, 0},
6035
(uchar**) &myisam_logical_log_filename, (uchar**)
6036
&myisam_logical_log_filename, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
5926
6037
{"log-long-format", '0',
5927
"Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
6038
"Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
5928
6039
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
5929
6040
#ifdef WITH_CSV_STORAGE_ENGINE
5930
6041
{"log-output", OPT_LOG_OUTPUT,
5967
6078
#ifdef HAVE_MMAP
5968
6079
{"log-tc-size", OPT_LOG_TC_SIZE, "Size of transaction coordinator log.",
5969
6080
(uchar**) &opt_tc_log_size, (uchar**) &opt_tc_log_size, 0, GET_ULONG,
5970
REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
6081
REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, (longlong) ULONG_MAX, 0,
5971
6082
TC_LOG_PAGE_SIZE, 0},
5973
6084
{"log-update", OPT_UPDATE_LOG,
6390
6501
"Decision to use in heuristic recover process. Possible values are COMMIT or ROLLBACK.",
6391
6502
(uchar**) &opt_tc_heuristic_recover, (uchar**) &opt_tc_heuristic_recover,
6392
6503
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
6504
#if defined(ENABLED_DEBUG_SYNC)
6505
{"debug-sync-timeout", OPT_DEBUG_SYNC_TIMEOUT,
6506
"Enable the debug sync facility "
6507
"and optionally specify a default wait timeout in seconds. "
6508
"A zero value keeps the facility disabled.",
6509
(uchar**) &opt_debug_sync_timeout, 0,
6510
0, GET_UINT, OPT_ARG, 0, 0, UINT_MAX, 0, 0, 0},
6511
#endif /* defined(ENABLED_DEBUG_SYNC) */
6393
6512
{"temp-pool", OPT_TEMP_POOL,
6394
6513
"Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file.",
6395
6514
(uchar**) &use_temp_pool, (uchar**) &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
6396
6515
0, 0, 0, 0, 0},
6397
6516
{"timed_mutexes", OPT_TIMED_MUTEXES,
6398
6517
"Specify whether to time mutexes (only InnoDB mutexes are currently supported)",
6399
(uchar**) &timed_mutexes, (uchar**) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0,
6518
(uchar**) &timed_mutexes, (uchar**) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0,
6400
6519
0, 0, 0, 0, 0},
6401
6520
{"tmpdir", 't',
6402
6521
"Path for temporary files. Several paths may be specified, separated by a "
6424
6543
{"warnings", 'W', "Deprecated; use --log-warnings instead.",
6425
6544
(uchar**) &global_system_variables.log_warnings,
6426
6545
(uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG,
6427
1, 0, ULONG_MAX, 0, 0, 0},
6546
1, 0, (longlong) ULONG_MAX, 0, 0, 0},
6428
6547
{ "back_log", OPT_BACK_LOG,
6429
6548
"The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.",
6430
6549
(uchar**) &back_log, (uchar**) &back_log, 0, GET_ULONG,
6432
6551
{"binlog_cache_size", OPT_BINLOG_CACHE_SIZE,
6433
6552
"The size of the cache to hold the SQL statements for the binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance.",
6434
6553
(uchar**) &binlog_cache_size, (uchar**) &binlog_cache_size, 0, GET_ULONG,
6435
REQUIRED_ARG, 32*1024L, IO_SIZE, ULONG_MAX, 0, IO_SIZE, 0},
6554
REQUIRED_ARG, 32*1024L, IO_SIZE, (longlong) ULONG_MAX, 0, IO_SIZE, 0},
6436
6555
{"bulk_insert_buffer_size", OPT_BULK_INSERT_BUFFER_SIZE,
6437
6556
"Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!",
6438
6557
(uchar**) &global_system_variables.bulk_insert_buff_size,
6439
6558
(uchar**) &max_system_variables.bulk_insert_buff_size,
6440
0, GET_ULONG, REQUIRED_ARG, 8192*1024, 0, ULONG_MAX, 0, 1, 0},
6559
0, GET_ULONG, REQUIRED_ARG, 8192*1024, 0, (longlong) ULONG_MAX, 0, 1, 0},
6441
6560
{"connect_timeout", OPT_CONNECT_TIMEOUT,
6442
6561
"The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'.",
6443
6562
(uchar**) &connect_timeout, (uchar**) &connect_timeout,
6460
6579
{"delayed_insert_limit", OPT_DELAYED_INSERT_LIMIT,
6461
6580
"After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.",
6462
6581
(uchar**) &delayed_insert_limit, (uchar**) &delayed_insert_limit, 0, GET_ULONG,
6463
REQUIRED_ARG, DELAYED_LIMIT, 1, ULONG_MAX, 0, 1, 0},
6582
REQUIRED_ARG, DELAYED_LIMIT, 1, (longlong) ULONG_MAX, 0, 1, 0},
6464
6583
{"delayed_insert_timeout", OPT_DELAYED_INSERT_TIMEOUT,
6465
6584
"How long a INSERT DELAYED thread should wait for INSERT statements before terminating.",
6466
6585
(uchar**) &delayed_insert_timeout, (uchar**) &delayed_insert_timeout, 0,
6468
6587
{ "delayed_queue_size", OPT_DELAYED_QUEUE_SIZE,
6469
6588
"What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again.",
6470
6589
(uchar**) &delayed_queue_size, (uchar**) &delayed_queue_size, 0, GET_ULONG,
6471
REQUIRED_ARG, DELAYED_QUEUE_SIZE, 1, ULONG_MAX, 0, 1, 0},
6590
REQUIRED_ARG, DELAYED_QUEUE_SIZE, 1, (longlong) ULONG_MAX, 0, 1, 0},
6472
6591
{"div_precision_increment", OPT_DIV_PRECINCREMENT,
6473
6592
"Precision of the result of '/' operator will be increased on that value.",
6474
6593
(uchar**) &global_system_variables.div_precincrement,
6508
6627
"The maximum length of the result of function group_concat.",
6509
6628
(uchar**) &global_system_variables.group_concat_max_len,
6510
6629
(uchar**) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
6511
REQUIRED_ARG, 1024, 4, ULONG_MAX, 0, 1, 0},
6630
REQUIRED_ARG, 1024, 4, (longlong) ULONG_MAX, 0, 1, 0},
6512
6631
{"interactive_timeout", OPT_INTERACTIVE_TIMEOUT,
6513
6632
"The number of seconds the server waits for activity on an interactive connection before closing it.",
6514
6633
(uchar**) &global_system_variables.net_interactive_timeout,
6518
6637
"The size of the buffer that is used for full joins.",
6519
6638
(uchar**) &global_system_variables.join_buff_size,
6520
6639
(uchar**) &max_system_variables.join_buff_size, 0, GET_ULONG,
6521
REQUIRED_ARG, 128*1024L, 128+MALLOC_OVERHEAD, ULONG_MAX,
6640
REQUIRED_ARG, 128*1024L, 128+MALLOC_OVERHEAD, (longlong) ULONG_MAX,
6522
6641
MALLOC_OVERHEAD, 128, 0},
6523
6642
{"join_cache_level", OPT_JOIN_CACHE_LEVEL,
6524
6643
"Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers",
6525
6644
(uchar**) &global_system_variables.join_cache_level,
6526
6645
(uchar**) &max_system_variables.join_cache_level,
6527
6646
0, GET_ULONG, REQUIRED_ARG, 1, 0, 8, 0, 1, 0},
6528
{"keep_files_on_create", OPT_KEEP_FILES_ON_CREATE,
6647
{"keep_files_on_create", OPT_KEEP_FILES_ON_CREATE,
6529
6648
"Don't overwrite stale .MYD and .MYI even if no directory is specified.",
6530
6649
(uchar**) &global_system_variables.keep_files_on_create,
6531
6650
(uchar**) &max_system_variables.keep_files_on_create,
6541
6660
"This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
6542
6661
(uchar**) &dflt_key_cache_var.param_age_threshold,
6544
0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
6545
300, 100, ULONG_MAX, 0, 100, 0},
6663
0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
6664
300, 100, (longlong) ULONG_MAX, 0, 100, 0},
6546
6665
{"key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,
6547
6666
"The default size of key cache blocks",
6548
6667
(uchar**) &dflt_key_cache_var.param_block_size,
6574
6693
"Max packetlength to send/receive from to server.",
6575
6694
(uchar**) &global_system_variables.max_allowed_packet,
6576
6695
(uchar**) &max_system_variables.max_allowed_packet, 0, GET_ULONG,
6577
REQUIRED_ARG, 1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
6696
REQUIRED_ARG, 1024*1024L, 1024, 1024L*1024L*1024L, 0, 1024, 0},
6578
6697
{"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE,
6579
6698
"Can be used to restrict the total size used to cache a multi-transaction query.",
6580
6699
(uchar**) &max_binlog_cache_size, (uchar**) &max_binlog_cache_size, 0,
6581
GET_ULONG, REQUIRED_ARG, ULONG_MAX, IO_SIZE, ULONG_MAX, 0, IO_SIZE, 0},
6700
GET_ULONG, REQUIRED_ARG, (longlong) ULONG_MAX, IO_SIZE,
6701
(longlong) ULONG_MAX, 0, IO_SIZE, 0},
6582
6702
{"max_binlog_size", OPT_MAX_BINLOG_SIZE,
6583
6703
"Binary log will be rotated automatically when the size exceeds this \
6584
6704
value. Will also apply to relay logs if max_relay_log_size is 0. \
6588
6708
{"max_connect_errors", OPT_MAX_CONNECT_ERRORS,
6589
6709
"If there is more than this number of interrupted connections from a host this host will be blocked from further connections.",
6590
6710
(uchar**) &max_connect_errors, (uchar**) &max_connect_errors, 0, GET_ULONG,
6591
REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ULONG_MAX, 0, 1, 0},
6711
REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, (longlong) ULONG_MAX, 0, 1, 0},
6592
6712
// Default max_connections of 151 is larger than Apache's default max
6593
6713
// children, to avoid "too many connections" error in a common setup
6594
6714
{"max_connections", OPT_MAX_CONNECTIONS,
6615
6735
"Joins that are probably going to read more than max_join_size records return an error.",
6616
6736
(uchar**) &global_system_variables.max_join_size,
6617
6737
(uchar**) &max_system_variables.max_join_size, 0, GET_HA_ROWS, REQUIRED_ARG,
6618
~0L, 1, ~0L, 0, 1, 0},
6738
HA_POS_ERROR, 1, HA_POS_ERROR, 0, 1, 0},
6619
6739
{"max_length_for_sort_data", OPT_MAX_LENGTH_FOR_SORT_DATA,
6620
6740
"Max number of bytes in sorted records.",
6621
6741
(uchar**) &global_system_variables.max_length_for_sort_data,
6633
6753
"Limit assumed max number of seeks when looking up rows based on a key",
6634
6754
(uchar**) &global_system_variables.max_seeks_for_key,
6635
6755
(uchar**) &max_system_variables.max_seeks_for_key, 0, GET_ULONG,
6636
REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0 },
6756
REQUIRED_ARG, (longlong) ULONG_MAX, 1, (longlong) ULONG_MAX, 0, 1, 0 },
6637
6757
{"max_sort_length", OPT_MAX_SORT_LENGTH,
6638
6758
"The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored).",
6639
6759
(uchar**) &global_system_variables.max_sort_length,
6648
6768
"Maximum number of temporary tables a client can keep open at a time.",
6649
6769
(uchar**) &global_system_variables.max_tmp_tables,
6650
6770
(uchar**) &max_system_variables.max_tmp_tables, 0, GET_ULONG,
6651
REQUIRED_ARG, 32, 1, ULONG_MAX, 0, 1, 0},
6771
REQUIRED_ARG, 32, 1, (longlong) ULONG_MAX, 0, 1, 0},
6652
6772
{"max_user_connections", OPT_MAX_USER_CONNECTIONS,
6653
6773
"The maximum number of active connections for a single user (0 = no limit).",
6654
6774
(uchar**) &max_user_connections, (uchar**) &max_user_connections, 0, GET_UINT,
6655
REQUIRED_ARG, 0, 1, UINT_MAX, 0, 1, 0},
6775
REQUIRED_ARG, 0, 0, UINT_MAX, 0, 1, 0},
6656
6776
{"max_write_lock_count", OPT_MAX_WRITE_LOCK_COUNT,
6657
6777
"After this many write locks, allow some read locks to run in between.",
6658
6778
(uchar**) &max_write_lock_count, (uchar**) &max_write_lock_count, 0, GET_ULONG,
6659
REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0},
6779
REQUIRED_ARG, (longlong) ULONG_MAX, 1, (longlong) ULONG_MAX, 0, 1, 0},
6660
6780
{"min_examined_row_limit", OPT_MIN_EXAMINED_ROW_LIMIT,
6661
6781
"Don't log queries which examine less than min_examined_row_limit rows to file.",
6662
6782
(uchar**) &global_system_variables.min_examined_row_limit,
6663
6783
(uchar**) &max_system_variables.min_examined_row_limit, 0, GET_ULONG,
6664
REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1L, 0},
6784
REQUIRED_ARG, 0, 0, (longlong) ULONG_MAX, 0, 1L, 0},
6665
6785
{"myisam_block_size", OPT_MYISAM_BLOCK_SIZE,
6666
6786
"Block size to be used for MyISAM index pages.",
6667
6787
(uchar**) &opt_myisam_block_size,
6673
6793
(uchar**) &myisam_data_pointer_size,
6674
6794
(uchar**) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG,
6675
6795
6, 2, 7, 0, 1, 0},
6676
{"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
6677
"Deprecated option",
6678
(uchar**) &global_system_variables.myisam_max_extra_sort_file_size,
6679
(uchar**) &max_system_variables.myisam_max_extra_sort_file_size,
6680
0, GET_ULL, REQUIRED_ARG, (ulonglong) MI_MAX_TEMP_LENGTH,
6681
0, (ulonglong) MAX_FILE_SIZE, 0, 1, 0},
6682
6796
{"myisam_max_sort_file_size", OPT_MYISAM_MAX_SORT_FILE_SIZE,
6683
6797
"Don't use the fast sort index method to created index if the temporary file would get bigger than this.",
6684
6798
(uchar**) &global_system_variables.myisam_max_sort_file_size,
6689
6803
"Number of threads to use when repairing MyISAM tables. The value of 1 disables parallel repair.",
6690
6804
(uchar**) &global_system_variables.myisam_repair_threads,
6691
6805
(uchar**) &max_system_variables.myisam_repair_threads, 0,
6692
GET_ULONG, REQUIRED_ARG, 1, 1, ULONG_MAX, 0, 1, 0},
6806
GET_ULONG, REQUIRED_ARG, 1, 1, (longlong) ULONG_MAX, 0, 1, 0},
6693
6807
{"myisam_sort_buffer_size", OPT_MYISAM_SORT_BUFFER_SIZE,
6694
6808
"The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.",
6695
6809
(uchar**) &global_system_variables.myisam_sort_buff_size,
6696
6810
(uchar**) &max_system_variables.myisam_sort_buff_size, 0,
6697
GET_ULONG, REQUIRED_ARG, 8192*1024, 4, ~0L, 0, 1, 0},
6811
GET_ULONG, REQUIRED_ARG, 8192*1024, 4, (longlong) ULONG_MAX, 0, 1, 0},
6698
6812
{"myisam_use_mmap", OPT_MYISAM_USE_MMAP,
6699
6813
"Use memory mapping for reading and writing MyISAM tables",
6700
6814
(uchar**) &opt_myisam_use_mmap,
6701
(uchar**) &opt_myisam_use_mmap, 0, GET_BOOL, NO_ARG, 0,
6815
(uchar**) &opt_myisam_use_mmap, 0, GET_BOOL, NO_ARG, 0,
6702
6816
0, 0, 0, 0, 0},
6703
6817
{"myisam_stats_method", OPT_MYISAM_STATS_METHOD,
6704
6818
"Specifies how MyISAM index statistics collection code should threat NULLs. "
6720
6834
"If a read on a communication port is interrupted, retry this many times before giving up.",
6721
6835
(uchar**) &global_system_variables.net_retry_count,
6722
6836
(uchar**) &max_system_variables.net_retry_count,0,
6723
GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ULONG_MAX, 0, 1, 0},
6837
GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, (longlong) ULONG_MAX,
6724
6839
{"net_write_timeout", OPT_NET_WRITE_TIMEOUT,
6725
6840
"Number of seconds to wait for a block to be written to a connection before aborting the write.",
6726
6841
(uchar**) &global_system_variables.net_write_timeout,
6727
6842
(uchar**) &max_system_variables.net_write_timeout, 0, GET_ULONG,
6728
6843
REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
6729
{ "old", OPT_OLD_MODE, "Use compatible behavior.",
6844
{"old", OPT_OLD_MODE, "Use compatible behavior.",
6730
6845
(uchar**) &global_system_variables.old_mode,
6731
(uchar**) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG,
6846
(uchar**) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG,
6732
6847
0, 0, 0, 0, 0, 0},
6733
6848
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
6734
6849
"If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of files.",
6754
6869
(uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0,
6755
6870
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
6756
6871
{"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
6757
"The size of the buffer that is allocated when preloading indexes",
6758
(uchar**) &global_system_variables.preload_buff_size,
6759
(uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
6760
REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
6872
"The size of the buffer that is allocated when preloading indexes",
6873
(uchar**) &global_system_variables.preload_buff_size,
6874
(uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
6875
REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
6761
6876
{"query_alloc_block_size", OPT_QUERY_ALLOC_BLOCK_SIZE,
6762
6877
"Allocation block size for query parsing and execution",
6763
6878
(uchar**) &global_system_variables.query_alloc_block_size,
6764
6879
(uchar**) &max_system_variables.query_alloc_block_size, 0, GET_ULONG,
6765
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
6880
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, (longlong) ULONG_MAX, 0, 1024,
6766
6882
#ifdef HAVE_QUERY_CACHE
6767
6883
{"query_cache_limit", OPT_QUERY_CACHE_LIMIT,
6768
6884
"Don't cache results that are bigger than this.",
6769
6885
(uchar**) &query_cache_limit, (uchar**) &query_cache_limit, 0, GET_ULONG,
6770
REQUIRED_ARG, 1024*1024L, 0, ULONG_MAX, 0, 1, 0},
6886
REQUIRED_ARG, 1024*1024L, 0, (longlong) ULONG_MAX, 0, 1, 0},
6771
6887
{"query_cache_min_res_unit", OPT_QUERY_CACHE_MIN_RES_UNIT,
6772
6888
"minimal size of unit in wich space for results is allocated (last unit will be trimed after writing all result data.",
6773
6889
(uchar**) &query_cache_min_res_unit, (uchar**) &query_cache_min_res_unit,
6774
6890
0, GET_ULONG, REQUIRED_ARG, QUERY_CACHE_MIN_RESULT_DATA_SIZE,
6775
0, ULONG_MAX, 0, 1, 0},
6891
0, (longlong) ULONG_MAX, 0, 1, 0},
6776
6892
#endif /*HAVE_QUERY_CACHE*/
6777
6893
{"query_cache_size", OPT_QUERY_CACHE_SIZE,
6778
6894
"The memory allocated to store results from old queries.",
6795
6911
(uchar**) &global_system_variables.query_prealloc_size,
6796
6912
(uchar**) &max_system_variables.query_prealloc_size, 0, GET_ULONG,
6797
6913
REQUIRED_ARG, QUERY_ALLOC_PREALLOC_SIZE, QUERY_ALLOC_PREALLOC_SIZE,
6798
ULONG_MAX, 0, 1024, 0},
6914
(longlong) ULONG_MAX, 0, 1024, 0},
6799
6915
{"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE,
6800
6916
"Allocation block size for storing ranges during optimization",
6801
6917
(uchar**) &global_system_variables.range_alloc_block_size,
6802
6918
(uchar**) &max_system_variables.range_alloc_block_size, 0, GET_ULONG,
6803
REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE, ULONG_MAX,
6919
REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE,
6920
(longlong) ULONG_MAX, 0, 1024, 0},
6805
6921
{"read_buffer_size", OPT_RECORD_BUFFER,
6806
6922
"Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.",
6807
6923
(uchar**) &global_system_variables.read_buff_size,
6863
6979
"Each thread that needs to do a sort allocates a buffer of this size.",
6864
6980
(uchar**) &global_system_variables.sortbuff_size,
6865
6981
(uchar**) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
6866
MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ULONG_MAX,
6982
MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, (longlong) ULONG_MAX,
6867
6983
MALLOC_OVERHEAD, 1, 0},
6868
6984
{"sync-binlog", OPT_SYNC_BINLOG,
6869
6985
"Synchronously flush binary log to disk after every #th event. "
6870
6986
"Use 0 (default) to disable synchronous flushing.",
6871
6987
(uchar**) &sync_binlog_period, (uchar**) &sync_binlog_period, 0, GET_ULONG,
6872
REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1, 0},
6988
REQUIRED_ARG, 0, 0, (longlong) ULONG_MAX, 0, 1, 0},
6873
6989
{"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
6874
6990
(uchar**) &opt_sync_frm, (uchar**) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
6880
6996
{"table_definition_cache", OPT_TABLE_DEF_CACHE,
6881
6997
"The number of cached table definitions.",
6882
6998
(uchar**) &table_def_size, (uchar**) &table_def_size,
6883
0, GET_ULONG, REQUIRED_ARG, 128, 1, 512*1024L, 0, 1, 0},
6999
0, GET_ULONG, REQUIRED_ARG, TABLE_DEF_CACHE_DEFAULT, TABLE_DEF_CACHE_MIN,
7000
512*1024L, 0, 1, 0},
6884
7001
{"table_open_cache", OPT_TABLE_OPEN_CACHE,
6885
7002
"The number of cached open tables.",
6886
7003
(uchar**) &table_cache_size, (uchar**) &table_cache_size, 0, GET_ULONG,
6905
7022
REQUIRED_ARG, 20, 1, 16384, 0, 1, 0},
6907
7024
{"thread_stack", OPT_THREAD_STACK,
6908
"The stack size for each thread.", (uchar**) &thread_stack,
6909
(uchar**) &thread_stack, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
6910
1024L*128L, ULONG_MAX, 0, 1024, 0},
7025
"The stack size for each thread.", (uchar**) &my_thread_stack_size,
7026
(uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
7027
1024L*128L, (longlong) ULONG_MAX, 0, 1024, 0},
6911
7028
{ "time_format", OPT_TIME_FORMAT,
6912
7029
"The TIME format (for future).",
6913
7030
(uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
6920
7037
(uchar**) &max_system_variables.tmp_table_size, 0, GET_ULL,
6921
7038
REQUIRED_ARG, 16*1024*1024L, 1024, MAX_MEM_TABLE_SIZE, 0, 1, 0},
6922
7039
{"transaction_alloc_block_size", OPT_TRANS_ALLOC_BLOCK_SIZE,
6923
"Allocation block size for various transaction-related structures",
7040
"Allocation block size for transactions to be stored in binary log",
6924
7041
(uchar**) &global_system_variables.trans_alloc_block_size,
6925
7042
(uchar**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
6926
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
7043
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, (longlong) ULONG_MAX, 0, 1024,
6927
7045
{"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE,
6928
"Persistent buffer for various transaction-related structures",
7046
"Persistent buffer for transactions to be stored in binary log",
6929
7047
(uchar**) &global_system_variables.trans_prealloc_size,
6930
7048
(uchar**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
6931
REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
7049
REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, (longlong) ULONG_MAX, 0,
6932
7051
{"thread_handling", OPT_THREAD_HANDLING,
6933
7052
"Define threads usage for handling queries: "
6934
7053
"one-thread-per-connection or no-threads", 0, 0,
6947
7066
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
6950
static int show_question(THD *thd, SHOW_VAR *var, char *buff)
6952
var->type= SHOW_LONGLONG;
6953
var->value= (char *)&thd->query_id;
6957
7069
static int show_net_compression(THD *thd, SHOW_VAR *var, char *buff)
6959
7071
var->type= SHOW_MY_BOOL;
7392
7504
{"Open_tables", (char*) &show_open_tables, SHOW_FUNC},
7393
7505
{"Opened_files", (char*) &my_file_total_opened, SHOW_LONG_NOFLUSH},
7394
7506
{"Opened_tables", (char*) offsetof(STATUS_VAR, opened_tables), SHOW_LONG_STATUS},
7507
{"Opened_table_definitions", (char*) offsetof(STATUS_VAR, opened_shares), SHOW_LONG_STATUS},
7395
7508
{"Prepared_stmt_count", (char*) &show_prepared_stmt_count, SHOW_FUNC},
7396
7509
#ifdef HAVE_QUERY_CACHE
7397
7510
{"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH},
7403
7516
{"Qcache_queries_in_cache", (char*) &query_cache.queries_in_cache, SHOW_LONG_NOFLUSH},
7404
7517
{"Qcache_total_blocks", (char*) &query_cache.total_blocks, SHOW_LONG_NOFLUSH},
7405
7518
#endif /*HAVE_QUERY_CACHE*/
7406
{"Questions", (char*) &show_question, SHOW_FUNC},
7519
{"Questions", (char*) offsetof(STATUS_VAR, questions), SHOW_LONG_STATUS},
7407
7520
#ifdef HAVE_REPLICATION
7408
7521
{"Rpl_status", (char*) &show_rpl_status, SHOW_FUNC},
8246
8378
lower_case_table_names= argument ? atoi(argument) : 1;
8247
8379
lower_case_table_names_used= 1;
8381
#if defined(ENABLED_DEBUG_SYNC)
8382
case OPT_DEBUG_SYNC_TIMEOUT:
8384
Debug Sync Facility. See debug_sync.cc.
8385
Default timeout for WAIT_FOR action.
8386
Default value is zero (facility disabled).
8387
If option is given without an argument, supply a non-zero value.
8391
/* purecov: begin tested */
8392
opt_debug_sync_timeout= DEBUG_SYNC_DEFAULT_WAIT_TIMEOUT;
8396
#endif /* defined(ENABLED_DEBUG_SYNC) */