|
|||||||||||
|
bk commit into 5.0 tree (anozdrin:1.2524) BUG#16918
From: Alexander Nozdrin <alik(at)mysql.com>
Date: Thu Sep 13 2007 - 09:30:51 EDT
ChangeSet@1.2524, 2007-09-13 17:30:44+04:00, anozdrin@station. +2 -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. sql/mysql_priv.h@1.461, 2007-09-13 17:30:42+04:00, anozdrin@station. +0 -1 Make do_command() a private function. sql/sql_parse.cc@1.636, 2007-09-13 17:30:43+04:00, anozdrin@station. +17 -10
diff -Nrup a/sql/mysql_priv.h b/sql/mysql_priv.h --- a/sql/mysql_priv.h 2007-08-16 20:56:08 +04:00@@ -726,7 +726,6 @@ pthread_handler_t handle_bootstrap(void void end_thread(THD *thd,bool put_in_cache); void flush_thread_cache(); bool mysql_execute_command(THD *thd); -bool do_command(THD *thd); bool dispatch_command(enum enum_server_command command, THD *thd,
char* packet, uint packet_length);
void log_slow_statement(THD *thd);
--- a/sql/sql_parse.cc 2007-08-05 07:53:13 +04:00@@ -93,6 +93,8 @@ const char *xa_state_names[]={ "NON-EXISTING", "ACTIVE", "IDLE", "PREPARED" }; +static bool do_command(THD *thd);
}
if (thd->user_connect)
decrease_user_connections(thd->user_connect);
+ + if (thd->killed || + net->vio && net->error && net->report_error) + { + statistic_increment(aborted_threads, &LOCK_status); + } +
if (net->error && net->vio != 0 && net->report_error)
{
if (!thd->killed && thd->variables.log_warnings > 1)
- sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION),
- }
- + end_thread:
close_connection(thd, 0, 1);
end_thread(thd,1);
@@ -1550,12 +1557,12 @@ bool do_command(THD *thd)
DBUG_PRINT("info",("Got error %d reading command from socket %s",
net->error,
vio_description(net->vio)));
- }
+
net_send_error(thd, net->last_errno, NullS);
net->error= 0;
DBUG_RETURN(FALSE);
-- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Thu Sep 13 09:29:14 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 09:24:41 EDT |
||||||||||
|
|||||||||||