Bug #56010 | Spaces cause mysqld_safe not to start,my_print_defaults generated invalid output | ||
---|---|---|---|
Submitted: | 16 Aug 2010 12:20 | Modified: | 3 Sep 2010 15:04 |
Reporter: | P Lekensteyn | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.1.49, 4.1, 5.0, 5.1, 5.6.99 | OS: | Linux (Debian Lenny) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution, my_print_defaults, mysqld_safe, spaces |
[16 Aug 2010 12:20]
P Lekensteyn
[16 Aug 2010 12:21]
P Lekensteyn
Patch file for scripts/mysqld_safe.sh, based on MySQL 5.1.49
Attachment: mysqld_safe.sh.patch (text/x-diff), 2.32 KiB.
[16 Aug 2010 13:57]
P Lekensteyn
A temporary fix in mysqld_safe for my_print_defaults. Insert the following between 'parse_arguments `"$print_defaults" "$defaults" --loose-verbose mysqld server' and the last backtick: |sed -e "s,',$BACKSLASH'," -e "s,.*,'\0'," And define BACKSLASH='\\' above that (dash and bash does not need the same amount of backslashes between backticks) (line 316 and 322)
[16 Aug 2010 14:27]
P Lekensteyn
Ignore my last comment, it's causing all options to be ignored.
[16 Aug 2010 18:31]
Sveta Smirnova
Thank you for the report. Verified as described.
[17 Aug 2010 11:29]
P Lekensteyn
Patch for mysqld_safe, parse arguments line by line
Attachment: mysqld_safe.sh-print_defaults.patch (text/x-diff), 902 bytes.
[23 Aug 2010 13:08]
P Lekensteyn
Patch for mysqld_safe, parse_arguments line by line and import variables in local scope. The old patch wasn't working fully.
Attachment: mysqld_safe-print_defaults-rv2.patch (text/x-diff), 921 bytes.
[3 Sep 2010 15:04]
P Lekensteyn
My last patch did not satisfy fully. IFS=`echo` does not work. It should be replaced with: IFS=' '