@@ -386,7 +386,8 @@ static DYNAMIC_ARRAY all_options;
386
386
/* Global variables */
387
387
388
388
bool opt_bin_log, opt_bin_log_used=0 , opt_ignore_builtin_innodb= 0 ;
389
- my_bool opt_log, debug_assert_if_crashed_table= 0 , opt_help= 0 ;
389
+ my_bool opt_log, debug_assert_if_crashed_table= 0 , opt_help= 0 , opt_silent= 0 ;
390
+ my_bool disable_log_notes;
390
391
static my_bool opt_abort;
391
392
ulonglong log_output_options;
392
393
my_bool opt_userstat_running;
@@ -2012,6 +2013,8 @@ extern "C" void unireg_abort(int exit_code)
2012
2013
usage ();
2013
2014
if (exit_code)
2014
2015
sql_print_error (" Aborting\n " );
2016
+ /* Don't write more notes to the log to not hide error message */
2017
+ disable_log_notes= 1 ;
2015
2018
2016
2019
#ifdef WITH_WSREP
2017
2020
/* Check if wsrep class is used. If yes, then cleanup wsrep */
@@ -4396,7 +4399,7 @@ static int init_common_variables()
4396
4399
DBUG_PRINT (" warning" ,
4397
4400
(" Changed limits: max_open_files: %u max_connections: %ld table_cache: %ld" ,
4398
4401
files, max_connections, tc_size));
4399
- if (global_system_variables.log_warnings )
4402
+ if (global_system_variables.log_warnings > 1 )
4400
4403
sql_print_warning (" Changed limits: max_open_files: %u max_connections: %ld table_cache: %ld" ,
4401
4404
files, max_connections, tc_size);
4402
4405
}
@@ -5934,6 +5937,7 @@ int mysqld_main(int argc, char **argv)
5934
5937
unireg_abort (1 );
5935
5938
}
5936
5939
5940
+ disable_log_notes= 0 ; /* Startup done, now we can give notes again */
5937
5941
sql_print_information (ER_DEFAULT (ER_STARTUP),my_progname,server_version,
5938
5942
((mysql_socket_getfd (unix_sock) == INVALID_SOCKET) ?
5939
5943
(char *) " " : mysqld_unix_port),
@@ -7491,6 +7495,8 @@ struct my_option my_long_options[]=
7491
7495
" Show user and password in SHOW SLAVE HOSTS on this master." ,
7492
7496
&opt_show_slave_auth_info, &opt_show_slave_auth_info, 0 ,
7493
7497
GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
7498
+ {" silent" , OPT_SILENT, " Don't print [Note] to log during startup." ,
7499
+ &opt_silent, &opt_silent, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
7494
7500
{" skip-bdb" , OPT_DEPRECATED_OPTION,
7495
7501
" Deprecated option; Exist only for compatibility with old my.cnf files" ,
7496
7502
0 , 0 , 0 , GET_NO_ARG, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
@@ -8659,6 +8665,7 @@ static int mysql_init_variables(void)
8659
8665
opt_tc_log_file= (char *)" tc.log" ; // no hostname in tc_log file name !
8660
8666
opt_secure_auth= 0 ;
8661
8667
opt_bootstrap= opt_myisam_log= 0 ;
8668
+ disable_log_notes= 0 ;
8662
8669
mqh_used= 0 ;
8663
8670
kill_in_progress= 0 ;
8664
8671
cleanup_done= 0 ;
@@ -9164,7 +9171,9 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
9164
9171
}
9165
9172
}
9166
9173
break ;
9167
-
9174
+ case OPT_SILENT:
9175
+ disable_log_notes= opt_silent;
9176
+ break ;
9168
9177
case OPT_PLUGIN_LOAD:
9169
9178
free_list (opt_plugin_load_list_ptr);
9170
9179
/* fall through */
@@ -9398,6 +9407,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
9398
9407
global_system_variables.max_allowed_packet );
9399
9408
}
9400
9409
9410
+ #if MYSQL_VERSION_ID > 101001
9401
9411
/*
9402
9412
TIMESTAMP columns get implicit DEFAULT values when
9403
9413
--explicit_defaults_for_timestamp is not set.
@@ -9406,7 +9416,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
9406
9416
sql_print_warning (" TIMESTAMP with implicit DEFAULT value is deprecated. "
9407
9417
" Please use --explicit_defaults_for_timestamp server "
9408
9418
" option (see documentation for more details)." );
9409
-
9419
+ # endif
9410
9420
9411
9421
if (log_error_file_ptr != disabled_my_option)
9412
9422
opt_error_log= 1 ;
0 commit comments