Commit 6bdf1d07 authored by unknown's avatar unknown

Bug#27070 server logs are created unrequested and in wrong directory

 - Avoid defaault log file names looking like <hostname>.pid.slow.log
  by using the FN_REPLACE_EXT flag to 'fn_format'
 - Remove the default log files generated by log_state.test before
   test completes


mysql-test/t/log_state.test:
  Tess sets location of log files to default location ie. they will be
  created in var/run form which the mysqld was started. Remove the
  files when test are completed
sql/log.cc:
  Replace the extension formatting the default log file name
  from "pidfile_name" which already contains an extension
parent 83f639ee
......@@ -132,3 +132,8 @@ select * from mysql.general_log;
# Cleanup (must be done last to avoid delayed 'Quit' message in general log)
#
disconnect con1;
# Remove the log files that was created in the "default location"
# i.e var/run
--remove_file $MYSQLTEST_VARDIR/run/master.log
--remove_file $MYSQLTEST_VARDIR/run/master-slow.log
......@@ -68,7 +68,7 @@ char *make_default_log_name(char *buff,const char* log_ext)
{
strmake(buff, pidfile_name, FN_REFLEN-5);
return fn_format(buff, buff, mysql_data_home, log_ext,
MYF(MY_UNPACK_FILENAME|MY_APPEND_EXT));
MYF(MY_UNPACK_FILENAME|MY_REPLACE_EXT));
}
/*
......
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