1 |
Add a --nowatch option to mysqld_safe that causes it to exit after |
2 |
spawning mysqld. We don't need mysqld_safe to restart mysqld after |
3 |
a crash, because systemd can do that just fine. |
4 |
Filed upstream at https://bugs.launchpad.net/maria/+bug/886484 |
5 |
|
6 |
|
7 |
diff -Naur mysql-5.5.14.orig/scripts/mysqld_safe.sh mysql-5.5.14/scripts/mysqld_safe.sh |
8 |
--- mysql-5.5.14.orig/scripts/mysqld_safe.sh 2011-06-21 12:42:40.000000000 -0400 |
9 |
+++ mysql-5.5.14/scripts/mysqld_safe.sh 2011-07-25 13:52:40.363068060 -0400 |
10 |
@@ -15,6 +15,7 @@ |
11 |
KILL_MYSQLD=1; |
12 |
MYSQLD= |
13 |
niceness=0 |
14 |
+nowatch=0 |
15 |
mysqld_ld_preload= |
16 |
mysqld_ld_library_path= |
17 |
|
18 |
@@ -54,6 +55,7 @@ |
19 |
--mysqld=FILE Use the specified file as mysqld |
20 |
--mysqld-version=VERSION Use "mysqld-VERSION" as mysqld |
21 |
--nice=NICE Set the scheduling priority of mysqld |
22 |
+ --nowatch Exit after starting mysqld |
23 |
--plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if |
24 |
VERSION is given |
25 |
--skip-kill-mysqld Don't try to kill stray mysqld processes |
26 |
@@ -140,8 +142,16 @@ |
27 |
;; |
28 |
esac |
29 |
|
30 |
- #echo "Running mysqld: [$cmd]" |
31 |
- eval "$cmd" |
32 |
+ if test $nowatch -eq 1 |
33 |
+ then |
34 |
+ # We'd prefer to exec $cmd here, but SELinux needs to be fixed first |
35 |
+ #/usr/bin/logger "Running mysqld: $cmd" |
36 |
+ eval "$cmd &" |
37 |
+ exit 0 |
38 |
+ else |
39 |
+ #echo "Running mysqld: [$cmd]" |
40 |
+ eval "$cmd" |
41 |
+ fi |
42 |
} |
43 |
|
44 |
shell_quote_string() { |
45 |
@@ -202,6 +212,7 @@ |
46 |
fi |
47 |
;; |
48 |
--nice=*) niceness="$val" ;; |
49 |
+ --nowatch) nowatch=1 ;; |
50 |
--open-files-limit=*) open_files="$val" ;; |
51 |
--open_files_limit=*) open_files="$val" ;; |
52 |
--skip-kill-mysqld*) KILL_MYSQLD=0 ;; |