summaryrefslogtreecommitdiff
path: root/mysql-test/t/log_state_bug33693.test
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@sun.com>2009-10-12 15:35:30 +0200
committerMagne Mahre <magne.mahre@sun.com>2009-10-12 15:35:30 +0200
commit9a65687bd9e76783d3e34cb35b5c8cc05421134d (patch)
tree5bfb8dc2f12d9720b7cff556cac673c461708b28 /mysql-test/t/log_state_bug33693.test
parent16537b0336c88bf030e74b421446bdd86f0a0989 (diff)
downloadmariadb-git-9a65687bd9e76783d3e34cb35b5c8cc05421134d.tar.gz
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.
Diffstat (limited to 'mysql-test/t/log_state_bug33693.test')
-rw-r--r--mysql-test/t/log_state_bug33693.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/log_state_bug33693.test b/mysql-test/t/log_state_bug33693.test
new file mode 100644
index 00000000000..d67b28fc3e9
--- /dev/null
+++ b/mysql-test/t/log_state_bug33693.test
@@ -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');