Yes, I neglected the manual does not define ";" as a comment starter in the middle of a line. However, it really could start a comment at the beginning of line with whitespace trimmed, as cited:
Comment lines start with “#” or “;”. A “#” comment can start in the middle of a line as well.
Yes, I neglected the manual does not define ";" as a comment starter in the middle of a line. However, it really could start a comment at the beginning of line with whitespace trimmed, as cited:
Comment lines start with “#” or “;”. A “#” comment can start in the middle of a line as well.
I verified it by
[kc@dns1 msb_5_1_46]$ grep datadir my.sandbox.cnf;./my _print_defaults mysqld | grep datadir sandboxes/ msb_5_1_ 46/data sandboxes/ msb_5_1_ 46/data
;datadir = /home/kc/
[kc@dns1 msb_5_1_46]$ grep datadir my.sandbox.cnf;./my _print_defaults mysqld | grep datadir
#datadir = /home/kc/
[kc@dns1 msb_5_1_46]$ grep datadir my.sandbox.cnf;./my _print_defaults mysqld | grep datadir kc/sandboxes/ msb_5_1_ 46/data ;/home/ kc/sandboxes/ msb_5_1_ 46/data kc/sandboxes/ msb_5_1_ 46/data
datadir = ;/home/
--datadir=
[kc@dns1 msb_5_1_46]$ grep datadir my.sandbox.cnf;./my _print_defaults mysqld | grep datadir
datadir = #/home/
--datadir=
Additionally I found my original patch is not against the right place. Enclosed is fixed version and with more tests.