List:Commits« Previous MessageNext Message »
From:Alexey Kopytov Date:July 20 2010 12:15pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3492)
Bug#52515
View as plain text  
Hi Joro,

A few comments on the patch.

On 19.07.10 19:12, Georgi.Kodinov@stripped wrote:
> #At file:///C:/mysql/work/B52515-5.1-bugteam/ based on
> revid:jon.hauglid@stripped
>
>   3492 Georgi.Kodinov@stripped	2010-07-19
>        Bug #52515: mysql sessions are not terminated properly
>
>        The mysql command line client was not reacting at all on
>        closing its controlling terminal.

It was. The default action for SIGHUP on Unix-like systems is to 
terminate the process.

>        Now it intercepts the SIGHUP on unix-alikes (and the
>        corresponding windows way of notification) and issues
>        a KILL command before closing similarly to how Ctrl-C
>        is handled.

Not exactly. Since you are reusing the same signal handler that is used 
for SIGINT, the actual behavior on Unix-like systems now is:

1. If no query is running, just quit on SIGHUP.
2. Otherwise, issue a KILL QUERY when SIGHUP is delivered and then 
continue execution.
(I don't consider cases of repeated SIGHUP deliveries)

I don't think that's what you meant it to be.

>        Added a command line option to turn this new behaviour
>        off if needed.
>

With --sighup-ignore we actually get a new behavior too. Instead of 
terminating the client process (and leaving a query running, if any), 
mysql started with --sighup-ignore now ignores the signal, i.e. both the 
query and the client process are left running.

I vote on removing this option from the patch. I doubt there is anyone 
exploiting the old behavior (terminate process, leave query), and if 
anyone wants the new --sighup-ignore behavior there are standard OS 
facilities (nohup on Unix, scheduled tasks on Windows).

Best regards,
Alexey.
Thread
bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3492) Bug#52515Georgi.Kodinov19 Jul
Re: bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3492)Bug#52515Alexey Kopytov20 Jul
Re: bzr commit into mysql-5.1-bugteam branch (Georgi.Kodinov:3492)Bug#52515Konstantin Osipov21 Jul