diff options
author | unknown <monty@hundin.mysql.fi> | 2001-06-21 01:12:29 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-06-21 01:12:29 +0300 |
commit | b5f7e2408fdb32f478688f384794e660da457e48 (patch) | |
tree | bbb285ed85ea96c80162ca59d98dff5b741aeaf7 /sql | |
parent | f12f40d050427aae55bf9520dc2c16f37fd01c76 (diff) | |
download | mariadb-git-b5f7e2408fdb32f478688f384794e660da457e48.tar.gz |
Added --warnings to mysqld
Docs/manual.texi:
Changelog
sql/mysql_priv.h:
Added --warnings
sql/mysqld.cc:
Added --warnings
sql/sql_parse.cc:
Added --warnings
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql_priv.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 21 | ||||
-rw-r--r-- | sql/sql_parse.cc | 1 |
3 files changed, 15 insertions, 9 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 9c134183fdd..f21c635dbdf 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -533,7 +533,7 @@ extern ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size, binlog_cache_size, max_binlog_cache_size; extern ulong specialflag, current_pid; extern bool low_priority_updates, using_update_log; -extern bool opt_sql_bin_update, opt_safe_show_db; +extern bool opt_sql_bin_update, opt_safe_show_db, opt_warnings; extern char language[LIBLEN],reg_ext[FN_EXTLEN],blob_newline; extern const char **errmesg; /* Error messages */ extern const char *default_tx_isolation_name; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ca912bb38dd..177d4ab1ab4 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -210,7 +210,7 @@ static char mysql_home[FN_REFLEN],pidfile_name[FN_REFLEN]; static pthread_t select_thread; static bool opt_log,opt_update_log,opt_bin_log,opt_slow_log,opt_noacl, opt_disable_networking=0, opt_bootstrap=0,opt_skip_show_db=0, - opt_ansi_mode=0,opt_myisam_log=0, + opt_ansi_mode=0,opt_myisam_log=0, opt_large_files=sizeof(my_off_t) > 4; bool opt_sql_bin_update = 0, opt_log_slave_updates = 0, opt_safe_show_db=0; FILE *bootstrap_file=0; @@ -275,7 +275,7 @@ ulong max_tmp_tables,max_heap_table_size; ulong bytes_sent = 0L, bytes_received = 0L; bool opt_endinfo,using_udf_functions,low_priority_updates, locked_in_memory; -bool opt_using_transactions, using_update_log; +bool opt_using_transactions, using_update_log, opt_warnings=0; bool volatile abort_loop,select_thread_in_use,grant_option; bool volatile ready_to_exit,shutdown_in_progress; ulong refresh_version=1L,flush_version=1L; /* Increments on each reload */ @@ -2455,7 +2455,7 @@ enum options { OPT_INNODB_LOG_ARCH_DIR, OPT_INNODB_LOG_ARCHIVE, OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT, - OPT_INNODB_UNIX_FILE_FLUSH_METHOD, + OPT_innodb_flush_method, OPT_SAFE_SHOW_DB, OPT_GEMINI_SKIP, OPT_INNODB_SKIP, OPT_TEMP_POOL, OPT_TX_ISOLATION, @@ -2516,7 +2516,7 @@ static struct option long_options[] = { OPT_INNODB_LOG_ARCHIVE}, {"innodb_flush_log_at_trx_commit", optional_argument, 0, OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT}, - {"innodb_unix_file_flush_method", required_argument, 0, + {"innodb_flush_method", required_argument, 0, OPT_INNODB_UNIX_FILE_FLUSH_METHOD}, #endif {"help", no_argument, 0, '?'}, @@ -2603,6 +2603,7 @@ static struct option long_options[] = { #endif {"user", required_argument, 0, 'u'}, {"version", no_argument, 0, 'V'}, + {"warnings", no_argument, 0, 'W'}, {0, 0, 0, 0} }; @@ -2796,7 +2797,7 @@ struct show_var_st init_vars[]= { {"innodb_log_arch_dir", (char*) &innobase_log_arch_dir, SHOW_CHAR_PTR}, {"innodb_log_archive", (char*) &innobase_log_archive, SHOW_MY_BOOL}, {"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR}, - {"innodb_unix_file_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, + {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, #endif {"interactive_timeout", (char*) &net_interactive_timeout, SHOW_LONG}, {"join_buffer_size", (char*) &join_buff_size, SHOW_LONG}, @@ -3033,7 +3034,8 @@ static void usage(void) Default transaction isolation level\n\ --temp-pool Use a pool of temporary files\n\ -u, --user=user_name Run mysqld daemon as user\n\ - -V, --version output version information and exit"); + -V, --version output version information and exit\n\ + -W, --warnings Log some not critical warnings to the log file\n"); #ifdef __WIN__ puts("NT and Win32 specific options:\n\ --console Don't remove the console window\n\ @@ -3073,7 +3075,7 @@ static void usage(void) puts("\ --innodb_data_home_dir=dir The common part for Innodb table spaces\n\ --innodb_data_file_path=dir Path to individual files and their sizes\n\ - --innodb_unix_file_flush_method=# With which method to flush data\n\ + --innodb_flush_method=# With which method to flush data\n\ --innodb_flush_log_at_trx_commit[=#]\n\ Set to 0 if you don't want to flush logs\n\ --innodb_log_arch_dir=dir Where full logs should be archived\n\ @@ -3167,7 +3169,7 @@ static void get_options(int argc,char **argv) int c,option_index=0; myisam_delay_key_write=1; // Allow use of this - while ((c=getopt_long(argc,argv,"ab:C:h:#::T::?l::L:O:P:sS::t:u:noVvI?", + while ((c=getopt_long(argc,argv,"ab:C:h:#::T::?l::L:O:P:sS::t:u:noVvWI?", long_options, &option_index)) != EOF) { switch(c) { @@ -3177,6 +3179,9 @@ static void get_options(int argc,char **argv) #endif opt_endinfo=1; /* unireg: memory allocation */ break; + case 'W': + opt_warnings=1; + break; case 'a': opt_ansi_mode=1; thd_startup_options|=OPTION_ANSI_MODE; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9b50be8a3c2..ef2919c2e6c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -554,6 +554,7 @@ pthread_handler_decl(handle_one_connection,arg) free_root(&thd->mem_root,MYF(0)); if (net->error && net->vio != 0) { + if (!thd->killed && ! opt_warnings) sql_print_error(ER(ER_NEW_ABORTING_CONNECTION), thd->thread_id,(thd->db ? thd->db : "unconnected"), thd->user ? thd->user : "unauthenticated", |