Cleaned up structs/enums in mysqld.cc

parent 66414270
...@@ -32,7 +32,7 @@ extern "C" { // Because of SCO 3.2V4.2 ...@@ -32,7 +32,7 @@ extern "C" { // Because of SCO 3.2V4.2
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifndef __GNU_LIBRARY__ #ifndef __GNU_LIBRARY__
#define __GNU_LIBRARY__ // Skipp warnings in getopt.h #define __GNU_LIBRARY__ // Skip warnings in getopt.h
#endif #endif
#include <getopt.h> #include <getopt.h>
#ifdef HAVE_SYSENT_H #ifdef HAVE_SYSENT_H
...@@ -2141,59 +2141,68 @@ pthread_handler_decl(handle_flush,arg __attribute__((unused))) ...@@ -2141,59 +2141,68 @@ pthread_handler_decl(handle_flush,arg __attribute__((unused)))
** handle start options ** handle start options
******************************************************************************/ ******************************************************************************/
enum options {OPT_ISAM_LOG=256,OPT_SKIP_NEW,OPT_SKIP_GRANT, enum options {
OPT_SKIP_LOCK,OPT_ENABLE_LOCK, OPT_ISAM_LOG=256, OPT_SKIP_NEW,
OPT_USE_LOCKING,OPT_SOCKET,OPT_UPDATE_LOG, OPT_BIN_LOG, OPT_SKIP_GRANT, OPT_SKIP_LOCK,
OPT_SKIP_RESOLVE,OPT_SKIP_NETWORKING, OPT_BIN_LOG_INDEX, OPT_ENABLE_LOCK, OPT_USE_LOCKING,
OPT_BIND_ADDRESS,OPT_PID_FILE,OPT_SKIP_PRIOR,OPT_BIG_TABLES, OPT_SOCKET, OPT_UPDATE_LOG,
OPT_STANDALONE,OPT_ONE_THREAD,OPT_CONSOLE, OPT_BIN_LOG, OPT_SKIP_RESOLVE,
OPT_LOW_PRIORITY_UPDATES,OPT_SKIP_HOST_CACHE,OPT_LONG_FORMAT, OPT_SKIP_NETWORKING, OPT_BIN_LOG_INDEX,
OPT_FLUSH, OPT_SAFE, OPT_BOOTSTRAP, OPT_SKIP_SHOW_DB, OPT_BIND_ADDRESS, OPT_PID_FILE,
OPT_TABLE_TYPE, OPT_INIT_FILE, OPT_DELAY_KEY_WRITE, OPT_SKIP_PRIOR, OPT_BIG_TABLES,
OPT_SLOW_QUERY_LOG, OPT_SKIP_DELAY_KEY_WRITE, OPT_STANDALONE, OPT_ONE_THREAD,
OPT_CHARSETS_DIR, OPT_CONSOLE, OPT_LOW_PRIORITY_UPDATES,
OPT_BDB_HOME, OPT_BDB_LOG, OPT_BDB_TMP, OPT_BDB_NOSYNC, OPT_SKIP_HOST_CACHE, OPT_LONG_FORMAT,
OPT_BDB_LOCK, OPT_BDB_SKIP, OPT_BDB_RECOVER, OPT_FLUSH, OPT_SAFE,
OPT_MASTER_HOST, OPT_MASTER_USER, OPT_MASTER_PASSWORD, OPT_BOOTSTRAP, OPT_SKIP_SHOW_DB,
OPT_MASTER_PORT, OPT_MASTER_INFO_FILE, OPT_MASTER_CONNECT_RETRY, OPT_TABLE_TYPE, OPT_INIT_FILE,
OPT_SQL_BIN_UPDATE_SAME, OPT_REPLICATE_DO_DB, OPT_DELAY_KEY_WRITE, OPT_SLOW_QUERY_LOG,
OPT_REPLICATE_IGNORE_DB, OPT_LOG_SLAVE_UPDATES, OPT_SKIP_DELAY_KEY_WRITE, OPT_CHARSETS_DIR,
OPT_BINLOG_DO_DB, OPT_BINLOG_IGNORE_DB, OPT_WANT_CORE}; OPT_BDB_HOME, OPT_BDB_LOG,
OPT_BDB_TMP, OPT_BDB_NOSYNC,
static struct option long_options[] = OPT_BDB_LOCK, OPT_BDB_SKIP,
{ OPT_BDB_RECOVER, OPT_MASTER_HOST,
{"ansi", no_argument,0, 'a'}, OPT_MASTER_USER, OPT_MASTER_PASSWORD,
OPT_MASTER_PORT, OPT_MASTER_INFO_FILE,
OPT_MASTER_CONNECT_RETRY, OPT_SQL_BIN_UPDATE_SAME,
OPT_REPLICATE_DO_DB, OPT_REPLICATE_IGNORE_DB,
OPT_LOG_SLAVE_UPDATES, OPT_BINLOG_DO_DB,
OPT_BINLOG_IGNORE_DB, OPT_WANT_CORE
};
static struct option long_options[] = {
{"ansi", no_argument, 0, 'a'},
{"basedir", required_argument, 0, 'b'}, {"basedir", required_argument, 0, 'b'},
#ifdef HAVE_BERKELEY_DB #ifdef HAVE_BERKELEY_DB
{"bdb-home", required_argument, 0, OPT_BDB_HOME}, {"bdb-home", required_argument, 0, (int) OPT_BDB_HOME},
{"bdb-lock-detect", required_argument, 0, OPT_BDB_LOCK}, {"bdb-lock-detect", required_argument, 0, (int) OPT_BDB_LOCK},
{"bdb-logdir", required_argument, 0, OPT_BDB_LOG}, {"bdb-logdir", required_argument, 0, (int) OPT_BDB_LOG},
{"bdb-recover", no_argument, 0, OPT_BDB_RECOVER}, {"bdb-recover", no_argument, 0, (int) OPT_BDB_RECOVER},
{"bdb-no-sync", no_argument, 0, OPT_BDB_NOSYNC}, {"bdb-no-sync", no_argument, 0, (int) OPT_BDB_NOSYNC},
{"bdb-tmpdir", required_argument, 0, OPT_BDB_TMP}, {"bdb-tmpdir", required_argument, 0, (int) OPT_BDB_TMP},
#endif #endif
{"big-tables", no_argument,0,(int) OPT_BIG_TABLES}, {"big-tables", no_argument, 0, (int) OPT_BIG_TABLES},
{"binlog-do-db", required_argument, 0, OPT_BINLOG_DO_DB}, {"binlog-do-db", required_argument, 0, (int) OPT_BINLOG_DO_DB},
{"binlog-ignore-db", required_argument, 0, OPT_BINLOG_IGNORE_DB}, {"binlog-ignore-db", required_argument, 0, (int) OPT_BINLOG_IGNORE_DB},
{"bind-address", required_argument, 0, OPT_BIND_ADDRESS}, {"bind-address", required_argument, 0, (int) OPT_BIND_ADDRESS},
{"bootstrap", no_argument,0,(int) OPT_BOOTSTRAP}, {"bootstrap", no_argument, 0, (int) OPT_BOOTSTRAP},
#ifdef __WIN__ #ifdef __WIN__
{"console", no_argument, 0, OPT_CONSOLE}, {"console", no_argument, 0, (int) OPT_CONSOLE},
#endif #endif
{"core-file", no_argument, 0, OPT_WANT_CORE}, {"core-file", no_argument, 0, (int) OPT_WANT_CORE},
{"chroot", required_argument,0, 'r'}, {"chroot", required_argument, 0, 'r'},
{"character-sets-dir",required_argument,0, OPT_CHARSETS_DIR}, {"character-sets-dir", required_argument, 0, (int) OPT_CHARSETS_DIR},
{"datadir", required_argument, 0, 'h'}, {"datadir", required_argument, 0, 'h'},
#ifndef DBUG_OFF #ifndef DBUG_OFF
{"debug", optional_argument, 0, '#'}, {"debug", optional_argument, 0, '#'},
#endif #endif
{"default-character-set",required_argument,0,'C'}, {"default-character-set", required_argument, 0, 'C'},
{"default-table-type",required_argument,0,OPT_TABLE_TYPE}, {"default-table-type", required_argument, 0, (int) OPT_TABLE_TYPE},
{"delay-key-write-for-all-tables", {"delay-key-write-for-all-tables",
no_argument, 0, (int) OPT_DELAY_KEY_WRITE}, no_argument, 0, (int) OPT_DELAY_KEY_WRITE},
{"enable-locking", no_argument, 0, (int) OPT_ENABLE_LOCK}, {"enable-locking", no_argument, 0, (int) OPT_ENABLE_LOCK},
{"exit-info", optional_argument, 0, 'T'}, {"exit-info", optional_argument, 0, 'T'},
{"flush", no_argument, 0, OPT_FLUSH}, {"flush", no_argument, 0, (int) OPT_FLUSH},
{"help", no_argument, 0, '?'}, {"help", no_argument, 0, '?'},
{"init-file", required_argument, 0, (int) OPT_INIT_FILE}, {"init-file", required_argument, 0, (int) OPT_INIT_FILE},
{"log", optional_argument, 0, 'l'}, {"log", optional_argument, 0, 'l'},
...@@ -2204,7 +2213,7 @@ static struct option long_options[] = ...@@ -2204,7 +2213,7 @@ static struct option long_options[] =
{"log-update", optional_argument, 0, (int) OPT_UPDATE_LOG}, {"log-update", optional_argument, 0, (int) OPT_UPDATE_LOG},
{"log-slow-queries", optional_argument, 0, (int) OPT_SLOW_QUERY_LOG}, {"log-slow-queries", optional_argument, 0, (int) OPT_SLOW_QUERY_LOG},
{"log-long-format", no_argument, 0, (int) OPT_LONG_FORMAT}, {"log-long-format", no_argument, 0, (int) OPT_LONG_FORMAT},
{"log-slave-updates", no_argument,0, (int) OPT_LOG_SLAVE_UPDATES}, {"log-slave-updates", no_argument, 0, (int) OPT_LOG_SLAVE_UPDATES},
{"low-priority-updates", no_argument, 0, (int) OPT_LOW_PRIORITY_UPDATES}, {"low-priority-updates", no_argument, 0, (int) OPT_LOW_PRIORITY_UPDATES},
{"master-host", required_argument, 0, (int) OPT_MASTER_HOST}, {"master-host", required_argument, 0, (int) OPT_MASTER_HOST},
{"master-user", required_argument, 0, (int) OPT_MASTER_USER}, {"master-user", required_argument, 0, (int) OPT_MASTER_USER},
...@@ -2215,36 +2224,36 @@ static struct option long_options[] = ...@@ -2215,36 +2224,36 @@ static struct option long_options[] =
{"new", no_argument, 0, 'n'}, {"new", no_argument, 0, 'n'},
{"old-protocol", no_argument, 0, 'o'}, {"old-protocol", no_argument, 0, 'o'},
#ifndef DBUG_OFF #ifndef DBUG_OFF
{"one-thread", no_argument, 0, OPT_ONE_THREAD}, {"one-thread", no_argument, 0, (int) OPT_ONE_THREAD},
#endif #endif
{"pid-file", required_argument, 0, (int) OPT_PID_FILE}, {"pid-file", required_argument, 0, (int) OPT_PID_FILE},
{"port", required_argument, 0, 'P'}, {"port", required_argument, 0, 'P'},
{"replicate-do-db", required_argument, 0, OPT_REPLICATE_DO_DB}, {"replicate-do-db", required_argument, 0, (int) OPT_REPLICATE_DO_DB},
{"replicate-ignore-db", required_argument, 0, OPT_REPLICATE_IGNORE_DB}, {"replicate-ignore-db", required_argument, 0, (int) OPT_REPLICATE_IGNORE_DB},
{"safe-mode", no_argument, 0, (int) OPT_SAFE}, {"safe-mode", no_argument, 0, (int) OPT_SAFE},
{"socket", required_argument, 0, (int) OPT_SOCKET}, {"socket", required_argument, 0, (int) OPT_SOCKET},
{"set-variable", required_argument, 0, 'O'}, {"set-variable", required_argument, 0, 'O'},
#ifdef HAVE_BERKELEY_DB #ifdef HAVE_BERKELEY_DB
{"skip-bdb", no_argument, 0, OPT_BDB_SKIP}, {"skip-bdb", no_argument, 0, (int) OPT_BDB_SKIP},
#endif #endif
{"skip-delay-key-write", no_argument, 0, (int) OPT_SKIP_DELAY_KEY_WRITE}, {"skip-delay-key-write", no_argument, 0, (int) OPT_SKIP_DELAY_KEY_WRITE},
{"skip-grant-tables", no_argument,0, (int) OPT_SKIP_GRANT}, {"skip-grant-tables", no_argument, 0, (int) OPT_SKIP_GRANT},
{"skip-locking", no_argument,0, (int) OPT_SKIP_LOCK}, {"skip-locking", no_argument, 0, (int) OPT_SKIP_LOCK},
{"skip-host-cache", no_argument,0, (int) OPT_SKIP_HOST_CACHE}, {"skip-host-cache", no_argument, 0, (int) OPT_SKIP_HOST_CACHE},
{"skip-name-resolve", no_argument,0, (int) OPT_SKIP_RESOLVE}, {"skip-name-resolve", no_argument, 0, (int) OPT_SKIP_RESOLVE},
{"skip-new", no_argument,0, (int) OPT_SKIP_NEW}, {"skip-new", no_argument, 0, (int) OPT_SKIP_NEW},
{"skip-show-database",no_argument,0, (int) OPT_SKIP_SHOW_DB}, {"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB},
{"skip-networking", no_argument,0, (int) OPT_SKIP_NETWORKING}, {"skip-networking", no_argument, 0, (int) OPT_SKIP_NETWORKING},
{"skip-thread-priority", no_argument,0,(int) OPT_SKIP_PRIOR}, {"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR},
{"sql-bin-update-same", no_argument, 0, (int)OPT_SQL_BIN_UPDATE_SAME}, {"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME},
#include "sslopt-longopts.h" #include "sslopt-longopts.h"
#ifdef __WIN__ #ifdef __WIN__
{"standalone", no_argument,0, (int) OPT_STANDALONE}, {"standalone", no_argument, 0, (int) OPT_STANDALONE},
#endif #endif
{"tmpdir", required_argument, 0, 't'}, {"tmpdir", required_argument, 0, 't'},
{"use-locking", no_argument, 0,(int) OPT_USE_LOCKING}, {"use-locking", no_argument, 0, (int) OPT_USE_LOCKING},
#ifdef USE_SYMDIR #ifdef USE_SYMDIR
{"use-symbolic-links",no_argument, 0, 's'}, {"use-symbolic-links", no_argument, 0, 's'},
#endif #endif
{"user", required_argument, 0, 'u'}, {"user", required_argument, 0, 'u'},
{"version", no_argument, 0, 'V'}, {"version", no_argument, 0, 'V'},
...@@ -2252,71 +2261,88 @@ static struct option long_options[] = ...@@ -2252,71 +2261,88 @@ static struct option long_options[] =
}; };
CHANGEABLE_VAR changeable_vars[] = { CHANGEABLE_VAR changeable_vars[] = {
{ "back_log", (long*) &back_log,50,1,65535,0,1}, { "back_log", (long*) &back_log,
50, 1, 65535, 0, 1 },
#ifdef HAVE_BERKELEY_DB #ifdef HAVE_BERKELEY_DB
{ "bdb_cache_size", (long*) &berkeley_cache_size, KEY_CACHE_SIZE, { "bdb_cache_size", (long*) &berkeley_cache_size,
20*1024, (long) ~0, 0, IO_SIZE}, KEY_CACHE_SIZE, 20*1024, (long) ~0, 0, IO_SIZE },
#endif #endif
{ "connect_timeout", (long*) &connect_timeout,CONNECT_TIMEOUT,2,65535,0,1}, { "connect_timeout", (long*) &connect_timeout,
{ "delayed_insert_timeout",(long*) &delayed_insert_timeout, CONNECT_TIMEOUT, 2, 65535, 0, 1 },
DELAYED_WAIT_TIMEOUT,1,~0L,0,1}, { "delayed_insert_timeout", (long*) &delayed_insert_timeout,
{ "delayed_insert_limit",(long*) &delayed_insert_limit, DELAYED_WAIT_TIMEOUT, 1, ~0L, 0, 1 },
DELAYED_LIMIT,1,~0L,0,1}, { "delayed_insert_limit", (long*) &delayed_insert_limit,
{ "delayed_queue_size", (long*) &delayed_queue_size,DELAYED_QUEUE_SIZE,1, DELAYED_LIMIT, 1, ~0L, 0, 1 },
~0L,0,1}, { "delayed_queue_size", (long*) &delayed_queue_size,
{ "flush_time", (long*) &flush_time,FLUSH_TIME,0,~0L,0,1}, DELAYED_QUEUE_SIZE, 1, ~0L, 0, 1 },
{ "flush_time", (long*) &flush_time,
FLUSH_TIME, 0, ~0L, 0, 1 },
{ "interactive_timeout", (long*) &net_interactive_timeout, { "interactive_timeout", (long*) &net_interactive_timeout,
NET_WAIT_TIMEOUT,1,31*24*60*60,0,1}, NET_WAIT_TIMEOUT, 1, 31*24*60*60, 0, 1 },
{ "join_buffer_size", (long*) &join_buff_size,128*1024L, { "join_buffer_size", (long*) &join_buff_size,
IO_SIZE*2+MALLOC_OVERHEAD,~0L,MALLOC_OVERHEAD,IO_SIZE }, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE },
{ "key_buffer_size", (long*) &keybuff_size,KEY_CACHE_SIZE,MALLOC_OVERHEAD, { "key_buffer_size", (long*) &keybuff_size,
(long) ~0, MALLOC_OVERHEAD, IO_SIZE }, KEY_CACHE_SIZE, MALLOC_OVERHEAD, (long) ~0, MALLOC_OVERHEAD, IO_SIZE },
{ "long_query_time", (long*) &long_query_time,10,1,~0L,0,1}, { "long_query_time", (long*) &long_query_time,
{ "lower_case_table_names", (long*) &lower_case_table_names,IF_WIN(1,0), 10, 1, ~0L, 0, 1 },
0,1,0,1}, { "lower_case_table_names", (long*) &lower_case_table_names,
{ "max_allowed_packet",(long*) &max_allowed_packet,1024*1024L,80, IF_WIN(1,0), 0, 1, 0, 1 },
17*1024*1024L, MALLOC_OVERHEAD,1024}, { "max_allowed_packet", (long*) &max_allowed_packet,
{ "max_connections", (long*) &max_connections,100,1,16384,0,1}, 1024*1024L, 80, 17*1024*1024L, MALLOC_OVERHEAD, 1024 },
{ "max_connect_errors", (long*) &max_connect_errors,MAX_CONNECT_ERRORS,1, { "max_connections", (long*) &max_connections,
~0L,0,1}, 100, 1, 16384, 0, 1 },
{ "max_delayed_threads", (long*) &max_insert_delayed_threads,20,1, { "max_connect_errors", (long*) &max_connect_errors,
16384,0,1}, MAX_CONNECT_ERRORS, 1, ~0L, 0, 1 },
{ "max_heap_table_size",(long*) &max_heap_table_size,16*1024*1024L,16384,~0L, { "max_delayed_threads", (long*) &max_insert_delayed_threads,
MALLOC_OVERHEAD,1024}, 20, 1, 16384, 0, 1 },
{ "max_join_size",(long*) &max_join_size,~0L,1,~0L,0,1}, { "max_heap_table_size", (long*) &max_heap_table_size,
{ "max_sort_length",(long*) &max_item_sort_length,1024,4,8192*1024L,0,1}, 16*1024*1024L, 16384, ~0L, MALLOC_OVERHEAD, 1024 },
{ "max_tmp_tables",(long*) &max_tmp_tables,32,1,~0L,0,1}, { "max_join_size", (long*) &max_join_size,
{ "max_write_lock_count",(long*) &max_write_lock_count,~0L,1,~0L,0,1}, ~0L, 1, ~0L, 0, 1 },
{ "myisam_sort_buffer_size", (long*) &myisam_sort_buffer_size,8192*1024,4, { "max_sort_length", (long*) &max_item_sort_length,
~0L,0,1}, 1024, 4, 8192*1024L, 0, 1 },
{ "net_buffer_length",(long*) &net_buffer_length,16384,1024,1024*1024L, { "max_tmp_tables", (long*) &max_tmp_tables,
MALLOC_OVERHEAD,1024}, 32, 1, ~0L, 0, 1 },
{ "net_retry_count",(long*) &mysqld_net_retry_count,MYSQLD_NET_RETRY_COUNT, { "max_write_lock_count", (long*) &max_write_lock_count,
1,~0L, 0,1}, ~0L, 1, ~0L, 0, 1 },
{ "net_read_timeout", (long*) &net_read_timeout, NET_READ_TIMEOUT,1,65535,0,1}, { "myisam_sort_buffer_size", (long*) &myisam_sort_buffer_size,
{ "net_write_timeout", (long*) &net_write_timeout,NET_WRITE_TIMEOUT,1,65535,0,1}, 8192*1024, 4, ~0L, 0, 1 },
{ "query_buffer_size", (long*) &query_buff_size,0,MALLOC_OVERHEAD, { "net_buffer_length", (long*) &net_buffer_length,
(long) ~0, MALLOC_OVERHEAD, IO_SIZE }, 16384, 1024, 1024*1024L, MALLOC_OVERHEAD, 1024 },
{ "record_buffer", (long*) &my_default_record_cache_size,128*1024L, { "net_retry_count", (long*) &mysqld_net_retry_count,
IO_SIZE*2+MALLOC_OVERHEAD,~0L,MALLOC_OVERHEAD,IO_SIZE }, MYSQLD_NET_RETRY_COUNT, 1, ~0L, 0, 1 },
{ "slow_launch_time", (long*) &slow_launch_time, 2L, { "net_read_timeout", (long*) &net_read_timeout,
0L,~0L,0,1 }, NET_READ_TIMEOUT, 1, 65535, 0, 1 },
{ "sort_buffer", (long*) &sortbuff_size,MAX_SORT_MEMORY, { "net_write_timeout", (long*) &net_write_timeout,
MIN_SORT_MEMORY+MALLOC_OVERHEAD*2,~0L,MALLOC_OVERHEAD,1 }, NET_WRITE_TIMEOUT, 1, 65535, 0, 1 },
{ "table_cache", (long*) &table_cache_size,64,1,16384,0,1}, { "query_buffer_size", (long*) &query_buff_size,
{ "thread_concurrency", (long*) &concurrency,DEFAULT_CONCURRENCY,1,512,0,1}, 0, MALLOC_OVERHEAD, (long) ~0, MALLOC_OVERHEAD, IO_SIZE },
{ "thread_cache_size", (long*) &thread_cache_size, 0,1,16384,0,1}, { "record_buffer", (long*) &my_default_record_cache_size,
{ "tmp_table_size", (long*) &tmp_table_size,1024*1024L,1024,~0L, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE },
MALLOC_OVERHEAD,1}, { "slow_launch_time", (long*) &slow_launch_time,
{ "thread_stack", (long*) &thread_stack,1024*64,1024*32,~0L,0,1024}, 2L, 0L, ~0L, 0, 1 },
{ "wait_timeout", (long*) &net_wait_timeout,NET_WAIT_TIMEOUT,1,~0L,0,1}, { "sort_buffer", (long*) &sortbuff_size,
{ NullS,(long*) 0,0,0,0,0,0,} }; MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ~0L, MALLOC_OVERHEAD, 1 },
{ "table_cache", (long*) &table_cache_size,
64, 1, 16384, 0, 1 },
{ "thread_concurrency", (long*) &concurrency,
DEFAULT_CONCURRENCY, 1, 512, 0, 1 },
{ "thread_cache_size", (long*) &thread_cache_size,
0, 1, 16384, 0, 1 },
{ "tmp_table_size", (long*) &tmp_table_size,
1024*1024L, 1024, ~0L, MALLOC_OVERHEAD, 1 },
{ "thread_stack", (long*) &thread_stack,
1024*64, 1024*32, ~0L, 0, 1024 },
{ "wait_timeout", (long*) &net_wait_timeout,
NET_WAIT_TIMEOUT, 1, ~0L, 0, 1 },
{ NullS, (long*) 0, 0, 0, 0, 0, 0}
};
struct show_var_st init_vars[]= { struct show_var_st init_vars[]= {
{"ansi_mode",(char*) &opt_ansi_mode ,SHOW_BOOL}, {"ansi_mode", (char*) &opt_ansi_mode, SHOW_BOOL},
{"back_log", (char*) &back_log, SHOW_LONG}, {"back_log", (char*) &back_log, SHOW_LONG},
{"basedir", mysql_home,SHOW_CHAR}, {"basedir", mysql_home, SHOW_CHAR},
#ifdef HAVE_BERKELEY_DB #ifdef HAVE_BERKELEY_DB
{"bdb_cache_size", (char*) &berkeley_cache_size, SHOW_LONG}, {"bdb_cache_size", (char*) &berkeley_cache_size, SHOW_LONG},
{"bdb_home", (char*) &berkeley_home, SHOW_CHAR_PTR}, {"bdb_home", (char*) &berkeley_home, SHOW_CHAR_PTR},
...@@ -2326,23 +2352,23 @@ struct show_var_st init_vars[]= { ...@@ -2326,23 +2352,23 @@ struct show_var_st init_vars[]= {
{"character_set", default_charset, SHOW_CHAR}, {"character_set", default_charset, SHOW_CHAR},
{"character_sets", (char*) &charsets_list, SHOW_CHAR_PTR}, {"character_sets", (char*) &charsets_list, SHOW_CHAR_PTR},
{"connect_timeout", (char*) &connect_timeout, SHOW_LONG}, {"connect_timeout", (char*) &connect_timeout, SHOW_LONG},
{"concurrent_insert",(char*) &myisam_concurrent_insert, SHOW_MY_BOOL}, {"concurrent_insert", (char*) &myisam_concurrent_insert, SHOW_MY_BOOL},
{"datadir", mysql_real_data_home,SHOW_CHAR}, {"datadir", mysql_real_data_home, SHOW_CHAR},
{"delay_key_write",(char*) &myisam_delay_key_write, SHOW_MY_BOOL}, {"delay_key_write", (char*) &myisam_delay_key_write, SHOW_MY_BOOL},
{"delayed_insert_limit",(char*) &delayed_insert_limit,SHOW_LONG}, {"delayed_insert_limit", (char*) &delayed_insert_limit, SHOW_LONG},
{"delayed_insert_timeout",(char*) &delayed_insert_timeout,SHOW_LONG}, {"delayed_insert_timeout", (char*) &delayed_insert_timeout, SHOW_LONG},
{"delayed_queue_size", (char*) &delayed_queue_size,SHOW_LONG}, {"delayed_queue_size", (char*) &delayed_queue_size, SHOW_LONG},
{"join_buffer_size", (char*) &join_buff_size, SHOW_LONG}, {"join_buffer_size", (char*) &join_buff_size, SHOW_LONG},
{"flush", (char*) &myisam_flush, SHOW_MY_BOOL}, {"flush", (char*) &myisam_flush, SHOW_MY_BOOL},
{"flush_time",(char*) &flush_time, SHOW_LONG}, {"flush_time", (char*) &flush_time, SHOW_LONG},
{"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR}, {"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR},
{"interactive_timeout", (char*) &net_interactive_timeout, SHOW_LONG}, {"interactive_timeout", (char*) &net_interactive_timeout, SHOW_LONG},
{"key_buffer_size", (char*) &keybuff_size, SHOW_LONG}, {"key_buffer_size", (char*) &keybuff_size, SHOW_LONG},
{"language", language, SHOW_CHAR}, {"language", language, SHOW_CHAR},
{"log", (char*) &opt_log, SHOW_BOOL}, {"log", (char*) &opt_log, SHOW_BOOL},
{"log_update",(char*) &opt_update_log,SHOW_BOOL}, {"log_update", (char*) &opt_update_log, SHOW_BOOL},
{"log_bin",(char*) &opt_bin_log,SHOW_BOOL}, {"log_bin", (char*) &opt_bin_log, SHOW_BOOL},
{"log_slave_updates",(char*) &opt_log_slave_updates,SHOW_BOOL}, {"log_slave_updates", (char*) &opt_log_slave_updates, SHOW_BOOL},
{"long_query_time", (char*) &long_query_time, SHOW_LONG}, {"long_query_time", (char*) &long_query_time, SHOW_LONG},
{"low_priority_updates", (char*) &low_priority_updates, SHOW_BOOL}, {"low_priority_updates", (char*) &low_priority_updates, SHOW_BOOL},
{"lower_case_table_names", (char*) &lower_case_table_names, SHOW_LONG}, {"lower_case_table_names", (char*) &lower_case_table_names, SHOW_LONG},
...@@ -2350,39 +2376,39 @@ struct show_var_st init_vars[]= { ...@@ -2350,39 +2376,39 @@ struct show_var_st init_vars[]= {
{"max_connections", (char*) &max_connections, SHOW_LONG}, {"max_connections", (char*) &max_connections, SHOW_LONG},
{"max_connect_errors", (char*) &max_connect_errors, SHOW_LONG}, {"max_connect_errors", (char*) &max_connect_errors, SHOW_LONG},
{"max_delayed_threads", (char*) &max_insert_delayed_threads, SHOW_LONG}, {"max_delayed_threads", (char*) &max_insert_delayed_threads, SHOW_LONG},
{"max_heap_table_size", (char*) &max_heap_table_size,SHOW_LONG}, {"max_heap_table_size", (char*) &max_heap_table_size, SHOW_LONG},
{"max_join_size", (char*) &max_join_size, SHOW_LONG}, {"max_join_size", (char*) &max_join_size, SHOW_LONG},
{"max_sort_length", (char*) &max_item_sort_length,SHOW_LONG}, {"max_sort_length", (char*) &max_item_sort_length, SHOW_LONG},
{"max_tmp_tables", (char*) &max_tmp_tables,SHOW_LONG}, {"max_tmp_tables", (char*) &max_tmp_tables, SHOW_LONG},
{"max_write_lock_count",(char*) &max_write_lock_count,SHOW_LONG}, {"max_write_lock_count", (char*) &max_write_lock_count, SHOW_LONG},
{"myisam_sort_buffer_size", (char*) &myisam_sort_buffer_size,SHOW_LONG}, {"myisam_sort_buffer_size", (char*) &myisam_sort_buffer_size, SHOW_LONG},
{"net_buffer_length", (char*) &net_buffer_length, SHOW_LONG}, {"net_buffer_length", (char*) &net_buffer_length, SHOW_LONG},
{"net_retry_count", (char*) &mysqld_net_retry_count, SHOW_LONG}, {"net_retry_count", (char*) &mysqld_net_retry_count, SHOW_LONG},
{"pid_file", (char*) pidfile_name, SHOW_CHAR}, {"pid_file", (char*) pidfile_name, SHOW_CHAR},
{"port", (char*) &mysql_port, SHOW_INT}, {"port", (char*) &mysql_port, SHOW_INT},
{"protocol_version", (char*) &protocol_version, SHOW_INT}, {"protocol_version", (char*) &protocol_version, SHOW_INT},
{"record_buffer", (char*) &my_default_record_cache_size,SHOW_LONG}, {"record_buffer", (char*) &my_default_record_cache_size, SHOW_LONG},
{"skip_locking", (char*) &my_disable_locking, SHOW_MY_BOOL}, {"skip_locking", (char*) &my_disable_locking, SHOW_MY_BOOL},
{"skip_networking", (char*) &opt_disable_networking, SHOW_BOOL}, {"skip_networking", (char*) &opt_disable_networking, SHOW_BOOL},
{"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL}, {"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL},
{"slow_launch_time", (char*) &slow_launch_time, SHOW_LONG}, {"slow_launch_time", (char*) &slow_launch_time, SHOW_LONG},
{"socket", (char*) &mysql_unix_port, SHOW_CHAR_PTR}, {"socket", (char*) &mysql_unix_port, SHOW_CHAR_PTR},
{"sort_buffer", (char*) &sortbuff_size,SHOW_LONG}, {"sort_buffer", (char*) &sortbuff_size, SHOW_LONG},
{"table_cache", (char*) &table_cache_size,SHOW_LONG}, {"table_cache", (char*) &table_cache_size, SHOW_LONG},
{"table_type", (char*) (&default_table_type_name), SHOW_CHAR_PTR}, {"table_type", (char*) &default_table_type_name, SHOW_CHAR_PTR},
#ifdef HAVE_THR_SETCONCURRENCY #ifdef HAVE_THR_SETCONCURRENCY
{"thread_concurrency", (char*) &concurrency, SHOW_LONG}, {"thread_concurrency", (char*) &concurrency, SHOW_LONG},
#endif #endif
{"thread_stack", (char*) &thread_stack,SHOW_LONG}, {"thread_stack", (char*) &thread_stack, SHOW_LONG},
{"thread_cache_size", (char*) &thread_cache_size,SHOW_LONG}, {"thread_cache_size", (char*) &thread_cache_size, SHOW_LONG},
#ifdef HAVE_TZNAME #ifdef HAVE_TZNAME
{"timezone", time_zone, SHOW_CHAR}, {"timezone", time_zone, SHOW_CHAR},
#endif #endif
{"tmp_table_size", (char*) &tmp_table_size,SHOW_LONG}, {"tmp_table_size", (char*) &tmp_table_size, SHOW_LONG},
{"tmpdir", (char*) &mysql_tmpdir,SHOW_CHAR_PTR}, {"tmpdir", (char*) &mysql_tmpdir, SHOW_CHAR_PTR},
{"version", server_version, SHOW_CHAR}, {"version", server_version, SHOW_CHAR},
{"wait_timeout",(char*) &net_wait_timeout,SHOW_LONG}, {"wait_timeout", (char*) &net_wait_timeout, SHOW_LONG},
{NullS,NullS,SHOW_LONG} {NullS, NullS, SHOW_LONG}
}; };
struct show_var_st status_vars[]= { struct show_var_st status_vars[]= {
...@@ -2391,13 +2417,13 @@ struct show_var_st status_vars[]= { ...@@ -2391,13 +2417,13 @@ struct show_var_st status_vars[]= {
{"Bytes_received", (char*) &bytes_received, SHOW_LONG}, {"Bytes_received", (char*) &bytes_received, SHOW_LONG},
{"Bytes_sent", (char*) &bytes_sent, SHOW_LONG}, {"Bytes_sent", (char*) &bytes_sent, SHOW_LONG},
{"Connections", (char*) &thread_id, SHOW_LONG_CONST}, {"Connections", (char*) &thread_id, SHOW_LONG_CONST},
{"Created_tmp_tables",(char*) &created_tmp_tables, SHOW_LONG}, {"Created_tmp_tables", (char*) &created_tmp_tables, SHOW_LONG},
{"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG}, {"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG},
{"Delayed_writes", (char*) &delayed_insert_writes, SHOW_LONG}, {"Delayed_writes", (char*) &delayed_insert_writes, SHOW_LONG},
{"Delayed_errors", (char*) &delayed_insert_errors, SHOW_LONG}, {"Delayed_errors", (char*) &delayed_insert_errors, SHOW_LONG},
{"Flush_commands", (char*) &refresh_version, SHOW_LONG_CONST}, {"Flush_commands", (char*) &refresh_version, SHOW_LONG_CONST},
{"Handler_delete", (char*) &ha_delete_count, SHOW_LONG}, {"Handler_delete", (char*) &ha_delete_count, SHOW_LONG},
{"Handler_read_first",(char*) &ha_read_first_count, SHOW_LONG}, {"Handler_read_first", (char*) &ha_read_first_count, SHOW_LONG},
{"Handler_read_key", (char*) &ha_read_key_count, SHOW_LONG}, {"Handler_read_key", (char*) &ha_read_key_count, SHOW_LONG},
{"Handler_read_next", (char*) &ha_read_next_count, SHOW_LONG}, {"Handler_read_next", (char*) &ha_read_next_count, SHOW_LONG},
{"Handler_read_prev", (char*) &ha_read_prev_count, SHOW_LONG}, {"Handler_read_prev", (char*) &ha_read_prev_count, SHOW_LONG},
...@@ -2408,7 +2434,7 @@ struct show_var_st status_vars[]= { ...@@ -2408,7 +2434,7 @@ struct show_var_st status_vars[]= {
{"Key_blocks_used", (char*) &_my_blocks_used, SHOW_LONG_CONST}, {"Key_blocks_used", (char*) &_my_blocks_used, SHOW_LONG_CONST},
{"Key_read_requests", (char*) &_my_cache_r_requests, SHOW_LONG}, {"Key_read_requests", (char*) &_my_cache_r_requests, SHOW_LONG},
{"Key_reads", (char*) &_my_cache_read, SHOW_LONG}, {"Key_reads", (char*) &_my_cache_read, SHOW_LONG},
{"Key_write_requests",(char*) &_my_cache_w_requests, SHOW_LONG}, {"Key_write_requests", (char*) &_my_cache_w_requests, SHOW_LONG},
{"Key_writes", (char*) &_my_cache_write, SHOW_LONG}, {"Key_writes", (char*) &_my_cache_write, SHOW_LONG},
{"Max_used_connections", (char*) &max_used_connections, SHOW_LONG}, {"Max_used_connections", (char*) &max_used_connections, SHOW_LONG},
{"Not_flushed_key_blocks", (char*) &_my_blocks_changed, SHOW_LONG_CONST}, {"Not_flushed_key_blocks", (char*) &_my_blocks_changed, SHOW_LONG_CONST},
...@@ -2425,7 +2451,7 @@ struct show_var_st status_vars[]= { ...@@ -2425,7 +2451,7 @@ struct show_var_st status_vars[]= {
{"Threads_connected", (char*) &thread_count, SHOW_INT_CONST}, {"Threads_connected", (char*) &thread_count, SHOW_INT_CONST},
{"Threads_running", (char*) &thread_running, SHOW_INT_CONST}, {"Threads_running", (char*) &thread_running, SHOW_INT_CONST},
{"Uptime", (char*) 0, SHOW_STARTTIME}, {"Uptime", (char*) 0, SHOW_STARTTIME},
{NullS,NullS,SHOW_LONG} {NullS, NullS, SHOW_LONG}
}; };
static void print_version(void) static void print_version(void)
...@@ -2444,7 +2470,8 @@ static void usage(void) ...@@ -2444,7 +2470,8 @@ static void usage(void)
{ {
print_version(); print_version();
puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB, by Monty and others"); puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB, by Monty and others");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
puts("and you are welcome to modify and redistribute it under the GPL license\n");
puts("Starts the MySQL server\n"); puts("Starts the MySQL server\n");
printf("Usage: %s [OPTIONS]\n", my_progname); printf("Usage: %s [OPTIONS]\n", my_progname);
...@@ -2489,7 +2516,8 @@ static void usage(void) ...@@ -2489,7 +2516,8 @@ static void usage(void)
--log-long-format Log some extra information to update log\n\ --log-long-format Log some extra information to update log\n\
--low-priority-updates INSERT/DELETE/UPDATE has lower priority than selects\n\ --low-priority-updates INSERT/DELETE/UPDATE has lower priority than selects\n\
--log-slow-queries=[file]\n\ --log-slow-queries=[file]\n\
Log slow queries to this log file\n\ Log slow queries to this log file. Defaults logging\n\
to hostname-slow.log\n\
--pid-file=path Pid file used by safe_mysqld\n\ --pid-file=path Pid file used by safe_mysqld\n\
-P, --port=... Port number to use for connection\n\ -P, --port=... Port number to use for connection\n\
-n, --new Use very new possible 'unsafe' functions\n\ -n, --new Use very new possible 'unsafe' functions\n\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment