mysqld_safe does not honour underscores in options like mysqld does
Bug #290190 reported by
Arjen Lentz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OurDelta |
Fix Released
|
Medium
|
Erik Ljungstrom |
Bug Description
mysqld accepts both dashes and underscores in server options, however mysqld_safe does not.
Since it's unclear from the user's perspective (and they shouldn't NEED to know!) which options get processed only by mysqld_safe, this can mean that they use an option in the wrong way but don't notice it.
Example... open_files_limit
When written like that, it mysqld_safe will not recognise it and thus not call ulimit -n
...
The option WILL be feed to mysqld so it shows the "correct" number in SHOW GLOBAL VARIABLES. Except, since ulimit wasn't called, it's not actually in effect!
Related branches
lp:~erik-ibiblio/ourdelta/ourdelta-erik
- OurDelta-core: Pending requested
Changed in ourdelta: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
To post a comment you must log in.
This ought to do it:
--- ./mysql- 5.0.67- sail-erik- build/scripts/ mysqld_ safe 2008-10-20 02:13:55.000000000 +0100
+++ mysqld_safe 2008-10-28 11:19:51.000000000 +0000
@@ -63,6 +63,10 @@
fi
for arg do .\)\(.* \)=\(.* \)/\2/' ); a/$substr_ b/g`
--skip- kill-mysqld* )
KILL_ MYSQLD= 0;
+ substr_a=$(echo $arg | sed -e 's/\(..
+ substr_b=$(echo $substr_a | sed s/_/-/g);
+ arg=`echo $arg | sed s/$substr_
+
case "$arg" in
It replaces all underscores with dashes, apart from the two initial dashes and any underscores trailing the = character
So --some_ option= argument_ to_option would become --some- option= argument_ to_option
Can anyone see an issue with this?