mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug #33693 general log name and location depend on PID file,
not on predefined values The default name of the PID file was constructed, as documented, based on the hostname. This name was subsequently used as the base for the general log file name. If the name of the PID file was overridden in the configuration, and no explicit name was set for the general log file, the path location for the PID file was used also for the general log file. A new variable, 'default_logfile_name', has been introduced. This name is constructed based on the hostname, and is then used to construct both the PID file and the general log file. The general log file will now, unless explicitly set, be located in the server data directory (as documentated in the server docs) mysql-test/t/log_state.test: run/mysqld.log was created as a consequence of this bug. After the fix it is no longer created, and will thus not be deleted.
This commit is contained in:
@ -390,7 +390,6 @@ if(!$fixed_bug38124)
|
||||
--enable_query_log
|
||||
}
|
||||
|
||||
# Remove the log files that was created in the "default location"
|
||||
# Remove the log file that was created in the "default location"
|
||||
# i.e var/run
|
||||
--remove_file $MYSQLTEST_VARDIR/run/mysqld.log
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/log.master
|
||||
|
1
mysql-test/t/log_state_bug33693-master.opt
Normal file
1
mysql-test/t/log_state_bug33693-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--pid-file=$MYSQLTEST_VARDIR/run/mysqld.1.pid --log=
|
18
mysql-test/t/log_state_bug33693.test
Normal file
18
mysql-test/t/log_state_bug33693.test
Normal file
@ -0,0 +1,18 @@
|
||||
### t/log_state_bug33693.test
|
||||
#
|
||||
# Regression test for bug #33693
|
||||
# "general log name and location depend on PID
|
||||
# file, not on predefined values"
|
||||
#
|
||||
# The server is started with a hard-coded
|
||||
# PID file in the $MYSQLTEST_VARDIR/run
|
||||
# directory, and an unspecified general log
|
||||
# file name.
|
||||
#
|
||||
# The correct result should show the log file to
|
||||
# rest in the database directory. Unfixed, the
|
||||
# log file will be in the same directory as the
|
||||
# PID.
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval SELECT INSTR(@@general_log_file, '$MYSQLTEST_VARDIR/run');
|
Reference in New Issue
Block a user