~percona-dev/percona-server/release-5.5.11-20.2-fix-bug-764138

« back to all changes in this revision

Viewing changes to build/debian/patches/30_scripts__mysqld_safe.sh__signals.patch

  • Committer: Ignacio Nin
  • Date: 2011-03-13 17:18:23 UTC
  • mfrom: (33.3.17 release-5.5.8-20)
  • Revision ID: ignacio.nin@percona.com-20110313171823-m06xs104nekulywb
Merge changes from release-5.5.8-20 to 5.5.9

Merge changes from the release branch of 5.5.8 to 5.5.9. These include
the HandlerSocket and UDF directories and the building scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
30_scripts__mysqld_safe.sh__signals.patch by  <ch@debian.org>
 
2
 
 
3
Executes /etc/init.d/mysql on signals
 
4
Reported as http://bugs.mysql.com/bug.php?id=31361
 
5
 
 
6
--- a/scripts/mysqld_safe.sh
 
7
+++ b/scripts/mysqld_safe.sh
 
8
@@ -29,8 +29,6 @@
 
9
 syslog_tag_mysqld=mysqld
 
10
 syslog_tag_mysqld_safe=mysqld_safe
 
11
 
 
12
-trap '' 1 2 3 15                       # we shouldn't let anyone kill us
 
13
-
 
14
 umask 007
 
15
 
 
16
 defaults=
 
17
@@ -707,6 +705,12 @@
 
18
   fi
 
19
 fi
 
20
 
 
21
+# From now on, we catch signals to do a proper shutdown of mysqld
 
22
+# when signalled to do so.
 
23
+#
 
24
+trap '@bindir@/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf refresh' 1 # HUP
 
25
+trap '@bindir@/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf shutdown' 2 3 15 # INT QUIT and TERM
 
26
+
 
27
 #
 
28
 # Uncomment the following lines if you want all tables to be automatically
 
29
 # checked and repaired during startup. You should add sensible key_buffer