Re: [Maria-developers] [Commits] 2b3bffb: MDEV-8491 - On shutdown, report the user and the host executed that.

Hi, Sergey! On Nov 25, Sergey Vojtovich wrote:
First, a test would be nice. I suppose you can add it to the main.shutdown test.
this will be the fifth time this expression shows up in the source code. turn it into a function, perhaps? Like, an inline method of THD? also, sometimes it's "SQL_SLAVE", sometimes it's "", sometimes it's "unauthenticated", etc. I hope these differences can be removed and there will be one method that works identically for all occasions. Btw, you can use safe_str() helper here.
Interesting. Why is that?
can it, really, be "unknown" here? when?
Here you've fixed only the english and russian messages. Others would look pretty weird. Normal procedure in such a case is to remove all other languages and only keep those that you've fixed. In this case you can, perhaps, fix all of them in some easy way, like ger "%s: Normal heruntergefahren (%s)\n" ger "%s: Normal heruntergefahren / %s\n" ger "%s (%s): Normal heruntergefahren\n" ger "%s / %s: Normal heruntergefahren\n" or something else along these lines. See how it'll look like in the log: mysqld: Normal heruntergefahren foo [bar] @ localhost [127.0.0.1] mysqld: Normal heruntergefahren (foo [bar] @ localhost [127.0.0.1]) mysqld: Normal heruntergefahren / foo [bar] @ localhost [127.0.0.1] mysqld (foo [bar] @ localhost [127.0.0.1]): Normal heruntergefahren mysqld / foo [bar] @ localhost [127.0.0.1]: Normal heruntergefahren Regards, Sergei

Hi Sergei, On Thu, Nov 26, 2015 at 10:09:19AM +0100, Sergei Golubchik wrote:
Ok.
It supposed to be safe concurrent shutdown.
Yes, in a few cases. E.g. killed by signal.
Ok. Thanks, Sergey

Hi, Sergey! On Nov 26, Sergey Vojtovich wrote:
Okay, but please add a comment about it.
Oh, right, sorry. I thought that if() filters that out (because signals have a special message ER_DEFAULT(ER_GOT_SIGNAL) below). Any other cases? Otherwise I'd suggest - user ? user : "unknown"); + user ? user : STRINGIFY_ARG(MYSQL_KILL_SIGNAL)) Regards, Sergei

Hi Sergei, On Thu, Nov 26, 2015 at 02:55:49PM +0100, Sergei Golubchik wrote:
No user info in following cases: - if listening socket is closed and SIGNALS_DONT_BREAK_READ is defined (which is never seem to be defined), kill_server is called with MYSQL_KILL_SIGNAL - if signal SIG{TERM|QUIT|KILL} received and USE_ONE_SIGNAL_HAND defined (is it guaranteed to be defined properly, kill_server is called with 0 - special handling of SIGINT - wsrep applier thread may call kill_server() without thd, but that's probably fixable Regards, Sergey
participants (2)
-
Sergei Golubchik
-
Sergey Vojtovich