Merge lp:~gaul/mysql-server/mysqld-safe-file into lp:mysql-server

Proposed by Andrew Gaul
Status: Needs review
Proposed branch: lp:~gaul/mysql-server/mysqld-safe-file
Merge into: lp:mysql-server
Diff against target: 23 lines (+9/-1)
1 file modified
scripts/mysqld_safe.sh (+9/-1)
To merge this branch: bzr merge lp:~gaul/mysql-server/mysqld-safe-file
Reviewer Review Type Date Requested Status
Oracle/MySQL Engineering Pending
Review via email: mp+202969@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrew Gaul (gaul) wrote :

Unmerged revisions

6865. By Andrew Gaul <email address hidden>

Cooperate with log rotation when logging to a file.

6864. By Bjorn Munch

Merged Bug #17675622 cset 6979 from trunk

6863. By Bjorn Munch

Merge post-push fix WL 1509, cset 6909 from trunk

6862. By Bjorn Munch

Merge Bug #17738935 cset 6906 from trunk

6861. By Bjorn Munch

Merge Bug #17752288 cset 6890 from trunk

6860. By Bjorn Munch

Merge post-push fix WL 7231, cset 6873 from trunk

6859. By Bjorn Munch

Merge Bug #17720294 cset 6866 from trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/mysqld_safe.sh'
2--- scripts/mysqld_safe.sh 2013-09-21 03:10:54 +0000
3+++ scripts/mysqld_safe.sh 2014-01-23 23:37:39 +0000
4@@ -143,10 +143,18 @@
5 log_generic daemon.notice "$@"
6 }
7
8+# Open and close the log file to output to the correct file during log rotation.
9+log_to_file() {
10+ while read line
11+ do
12+ echo $line >> "`shell_quote_string "$err_log"`"
13+ done
14+}
15+
16 eval_log_error () {
17 cmd="$1"
18 case $logging in
19- file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;;
20+ file) cmd="$cmd 2>&1 | log_to_file" ;;
21 syslog)
22 # mysqld often prefixes its messages with a timestamp, which is
23 # redundant when logging to syslog (which adds its own timestamp)