List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:September 12 2007 1:40pm
Subject:Re: bk commit into 5.0 tree (anozdrin:1.2524) BUG#16918
View as plain text  
* Alexander Nozdrin <alik@stripped> [07/09/12 15:14]:
> ChangeSet@stripped, 2007-09-12 14:56:06+04:00, anozdrin@station. +4 -0
>   Bug#16918: Aborted_clients > Connections.
>   
>   The problem was that aborted_threads variable was updated
>   twice when a client connection had been aborted.
>   
>   The fix is to refactor a code to have aborted_threads updated
>   only in one place.

OK to push, but please see below.
> +#
> +# Bug#16918: Aborted_clients > Connections.
> +#
> +
> +SHOW STATUS LIKE 'Aborted_clients';
> +Variable_name	Value
> +Aborted_clients	2

Please issue FLUSH STATUS first.
> +
> +SHOW STATUS LIKE 'Aborted_clients';
> +Variable_name	Value
> +Aborted_clients	3
> diff -Nrup a/mysql-test/t/kill.test b/mysql-test/t/kill.test
> --- a/mysql-test/t/kill.test	2007-06-22 05:39:48 +04:00
> +++ b/mysql-test/t/kill.test	2007-09-12 14:56:04 +04:00
> @@ -304,3 +304,30 @@ while ($i)
>    dec $i ;
>  }
>  --enable_query_log
> +
> +###########################################################################
> +
> +#
> +# Bug#16918: Aborted_clients > Connections.
> +#
> +
> +--echo #
> +--echo # Bug#16918: Aborted_clients > Connections.
> +--echo #
> +
> +--echo
> +SHOW STATUS LIKE 'Aborted_clients';
> +
> +--perl
> +my $pid = `$ENV{'MYSQL'} >/dev/null 2>&1 </dev/zero & echo \$!`;
> +chomp $pid;

use SELECT connection_id(); --connect, and KILL statements to kill
the query. Do not use shell.
> +
> +sleep (1);

Do not use sleep.
> +
> +system ("kill -9 $pid");
> +EOF
> +
> +--echo
> +SHOW STATUS LIKE 'Aborted_clients';

Wait synchronously till the connectoin has died, use
--wait_condition.inc and SELECT from information_schema.processlist.

-- 
-- Konstantin Osipov              Software Developer, Moscow, Russia
-- MySQL AB, www.mysql.com   The best DATABASE COMPANY in the GALAXY
Thread
bk commit into 5.0 tree (anozdrin:1.2524) BUG#16918Alexander Nozdrin12 Sep
  • Re: bk commit into 5.0 tree (anozdrin:1.2524) BUG#16918Konstantin Osipov12 Sep