|
To verify the problem patch mysqld_safe like following:
@@ -969,8 +961,6 @@
|
have_sleep=1
|
|
# close stdout and stderr, everything goes to $logging now
|
+log_error this is error message before closing descriptors
|
+log_notice this is notice message before closing descriptos
|
if expr "${-}" : '.*x' > /dev/null
|
then
|
:
|
@@ -979,9 +969,6 @@
|
exec 2>&-
|
fi
|
|
+log_error this is error message after closing descriptors
|
+log_notice this is notice message after closing descriptos
|
+
|
# maximum number of wsrep restarts
|
max_wsrep_restarts=0
|
Now start mysqld_safe with --log-error and observe output like below, which is expected:
# mysqld_safe --log-error=/var/lib/mysql/test.err
|
171109 12:50:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
|
171109 12:50:55 mysqld_safe this is error message before closing descriptors
|
171109 12:50:55 mysqld_safe this is notice message before closing descriptos
|
Now examine error log and observe that message 'error message after closing descriptors' is missing:
# cat /var/lib/mysql/test.err
|
171109 12:50:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
|
171109 12:50:55 mysqld_safe this is error message before closing descriptors
|
171109 12:50:55 mysqld_safe this is notice message before closing descriptos
|
171109 12:50:55 mysqld_safe this is notice message after closing descriptos
|
2017-11-09 12:50:55 140399771674752 [Note] /usr/sbin/mysqld (mysqld 10.2.10-MariaDB) starting as process 4649 ...
|
|