Re: signal handling in mysql cli

2016-06-30 Thread shawn l.green
Hello Sebastien, You should stop top-posting, it inverts the flow of your investigation making it harder to follow. (see bottom) On 6/21/2016 12:45 PM, Sebastien FLAESCH wrote: The process list show my (killed) thread as follows: mysql> show processlist; ++-+-+---

Re: signal handling in mysql cli

2016-06-21 Thread Sebastien FLAESCH
The process list show my (killed) thread as follows: mysql> show processlist; ++-+-+---+-+--+--+--+ | Id | User| Host| db| Command | Time | State| Info | ++-+-+

Re: signal handling in mysql cli

2016-06-21 Thread Sebastien FLAESCH
FYI, I get the same problem with MySQL 5.7.13. Seb On 06/21/2016 04:59 PM, Sebastien FLAESCH wrote: Seems that after KILL QUERY mysql-thread-id, a call to mysql_stmt_close(stmt-handle) hangs... This did not happen in 5.6 ... Will try 5.7.13 ... Seb On 06/21/2016 04:03 PM, Sebastien FLAESCH

Re: signal handling in mysql cli

2016-06-21 Thread Sebastien FLAESCH
Seems that after KILL QUERY mysql-thread-id, a call to mysql_stmt_close(stmt-handle) hangs... This did not happen in 5.6 ... Will try 5.7.13 ... Seb On 06/21/2016 04:03 PM, Sebastien FLAESCH wrote: Hi all, The technique described in this thread is working fine with MySQL 5.6 (libmysqlclien

Re: signal handling in mysql cli

2016-06-21 Thread Sebastien FLAESCH
Hi all, The technique described in this thread is working fine with MySQL 5.6 (libmysqlclient). Basically, in a SIGINT signal handler, we establish a new connection to perform a KILL QUERY pid ... But with 5.7 (5.7.11) we get now a different result: A) The query is still interrupted, bu

Re: signal handling in mysql cli

2014-12-12 Thread Sebastien FLAESCH
Thank you Rafal for your answer! We do not use threads, it's a single threaded program. So we cannot set a flag to exec the KILL QUERY later on in another thread. The only flag I use is to avoid subsequent KILL QUERY attempts when one has already been sent... The code in the sigint handler is q

Re: Re: signal handling in mysql cli

2014-12-12 Thread rafal somla
Hello Sebastein, On 2014-12-03 17:25, Sebastien FLAESCH wrote: Hi all, I have a similar question regarding KILL QUERY usage: We have a C client program using libmysqlclient.so, it is a single-threaded program. When running a long query, how can I send the KILL QUERY command when a SIGINT (CTR

Re: signal handling in mysql cli

2014-12-10 Thread Johan De Meersman
- Original Message - > From: "Sebastien FLAESCH" > Subject: Re: signal handling in mysql cli > Nobody concerned by this case? > Simple question: is it safe or not to do a KILL QUERY in a SIGINT signal > handler? I don't see what the extra risk would be

Re: signal handling in mysql cli

2014-12-10 Thread Sebastien FLAESCH
Nobody concerned by this case? Simple question: is it safe or not to do a KILL QUERY in a SIGINT signal handler? S. On 12/03/2014 05:25 PM, Sebastien FLAESCH wrote: Hi all, I have a similar question regarding KILL QUERY usage: We have a C client program using libmysqlclient.so, it is a single

Re: signal handling in mysql cli

2014-12-03 Thread Sebastien FLAESCH
Hi all, I have a similar question regarding KILL QUERY usage: We have a C client program using libmysqlclient.so, it is a single-threaded program. When running a long query, how can I send the KILL QUERY command when a SIGINT (CTRL-C) is caught? (of course we implement a signal handler, so we

Re: signal handling in mysql cli

2014-12-03 Thread walter harms
Am 02.12.2014 18:31, schrieb Johan De Meersman: > - Original Message - >> From: "wharms" >> Subject: signal handling in mysql cli >> >> when i use CTRL-C to break a query that works fine in interactive mode. >> >> but when i use the no

Re: signal handling in mysql cli

2014-12-02 Thread Johan De Meersman
- Original Message - > From: "wharms" > Subject: signal handling in mysql cli > > when i use CTRL-C to break a query that works fine in interactive mode. > > but when i use the noninteractive mode > i looks like that but "show full processlist;&

signal handling in mysql cli

2014-12-02 Thread walter harms
hi list, when i use CTRL-C to break a query that works fine in interactive mode. mysql> select sleep(10) ; ^CCtrl-C -- sending "KILL QUERY 24289" to server ... Ctrl-C -- query aborted. +---+ | sleep(10) | +---+ +---+ 1 row in set (0.86 sec) but when i use the noninteracti