Merge lp:~laurynas-biveinis/percona-server/bug805805-1060136-5.5 into lp:percona-server/5.5

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 317
Proposed branch: lp:~laurynas-biveinis/percona-server/bug805805-1060136-5.5
Merge into: lp:percona-server/5.5
Diff against target: 94 lines (+24/-3)
4 files modified
Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc (+4/-1)
Percona-Server/mysql-test/r/percona_signal_handling.result (+3/-0)
Percona-Server/mysql-test/t/percona_signal_handling.test (+11/-0)
Percona-Server/sql/net_serv.cc (+6/-2)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug805805-1060136-5.5
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Alexey Kopytov Pending
Review via email: mp+128631@code.launchpad.net

This proposal supersedes a proposal from 2012-10-04.

Description of the change

Auto-merge fixes for bug 1060136 and bug 805805 from 5.1.

Bug 805805 changes fix the code that is disabled on 5.1, but enabled
on 5.5.

Jenkins: http://jenkins.percona.com/job/percona-server-5.5-param/537/

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

OK to push after addressing the comments in 5.1 and re-merging to 5.5.

review: Approve
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Setting to WiP to avoid accidental merge :)

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc'
2--- Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc 2011-06-30 15:46:53 +0000
3+++ Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc 2012-10-09 10:55:12 +0000
4@@ -152,11 +152,14 @@
5 pid_t own_pid= getpid();
6 pid_t parent_pid= getppid();
7 bool nocore = false;
8+ struct sigaction sigchld_action;
9
10+ sigchld_action.sa_handler= handle_signal;
11+ sigchld_action.sa_flags= SA_NOCLDSTOP;
12 /* Install signal handlers */
13 signal(SIGTERM, handle_signal);
14 signal(SIGINT, handle_signal);
15- signal(SIGCHLD, handle_signal);
16+ sigaction(SIGCHLD, &sigchld_action, NULL);
17 signal(SIGABRT, handle_abort);
18
19 sprintf(safe_process_name, "safe_process[%ld]", (long) own_pid);
20
21=== added file 'Percona-Server/mysql-test/r/percona_signal_handling.result'
22--- Percona-Server/mysql-test/r/percona_signal_handling.result 1970-01-01 00:00:00 +0000
23+++ Percona-Server/mysql-test/r/percona_signal_handling.result 2012-10-09 10:55:12 +0000
24@@ -0,0 +1,3 @@
25+SELECT 2+2;
26+2+2
27+4
28
29=== added file 'Percona-Server/mysql-test/t/percona_signal_handling.test'
30--- Percona-Server/mysql-test/t/percona_signal_handling.test 1970-01-01 00:00:00 +0000
31+++ Percona-Server/mysql-test/t/percona_signal_handling.test 2012-10-09 10:55:12 +0000
32@@ -0,0 +1,11 @@
33+# A regression testcase for:
34+# - bug 1060136: verifies that the server is not killed on SIGSTOP;
35+# - bug 805805: verifies that the connection to the server is not killed on SIGSTOP/SIGCONT.
36+--source include/not_windows.inc
37+
38+let $mysqld_pid_file=`SELECT @@GLOBAL.pid_file`;
39+
40+system kill -STOP `cat $mysqld_pid_file`;
41+system kill -CONT `cat $mysqld_pid_file`;
42+
43+SELECT 2+2;
44
45=== modified file 'Percona-Server/sql/net_serv.cc'
46--- Percona-Server/sql/net_serv.cc 2012-05-10 07:49:14 +0000
47+++ Percona-Server/sql/net_serv.cc 2012-10-09 10:55:12 +0000
48@@ -632,11 +632,12 @@
49 if ((long) (length= vio_write(net->vio,pos,(size_t) (end-pos))) <= 0)
50 {
51 my_bool interrupted = vio_should_retry(net->vio);
52-#if !defined(NO_ALARM) && !defined(__WIN__)
53+#if !defined(__WIN__)
54 if ((interrupted || length == 0) && !thr_alarm_in_use(&alarmed))
55 {
56 if (!thr_alarm(&alarmed, net->write_timeout, &alarm_buff))
57 { /* Always true for client */
58+#if !defined(NO_ALARM)
59 my_bool old_mode;
60 while (vio_blocking(net->vio, TRUE, &old_mode) < 0)
61 {
62@@ -654,6 +655,7 @@
63 #endif
64 goto end;
65 }
66+#endif /* !defined(NO_ALARM) */
67 retry_count=0;
68 continue;
69 }
70@@ -835,7 +837,7 @@
71
72 DBUG_PRINT("info",("vio_read returned %ld errno: %d",
73 (long) length, vio_errno(net->vio)));
74-#if !defined(NO_ALARM) && (!defined(__WIN__) || defined(MYSQL_SERVER))
75+#if !defined(__WIN__) || defined(MYSQL_SERVER)
76 /*
77 We got an error that there was no data on the socket. We now set up
78 an alarm to not 'read forever', change the socket to non blocking
79@@ -845,6 +847,7 @@
80 {
81 if (!thr_alarm(&alarmed,net->read_timeout,&alarm_buff)) /* Don't wait too long */
82 {
83+#if !defined(NO_ALARM)
84 my_bool old_mode;
85 while (vio_blocking(net->vio, TRUE, &old_mode) < 0)
86 {
87@@ -867,6 +870,7 @@
88 #endif
89 goto end;
90 }
91+#endif /* !defined(NO_ALARM) */
92 retry_count=0;
93 continue;
94 }

Subscribers

People subscribed via source and target branches