summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@station.>2007-10-09 14:53:15 +0400
committerunknown <anozdrin/alik@station.>2007-10-09 14:53:15 +0400
commit701ea230add519831031a27c18f2ad665b45d16c (patch)
tree017f41341ff685f1b8ced35fc1a2fe3d36d5165a /sql/sql_connect.cc
parent2e53f3631164bf88471f63cafc884072d4167686 (diff)
downloadmariadb-git-701ea230add519831031a27c18f2ad665b45d16c.tar.gz
Fix merge.
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r--sql/sql_connect.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 6bb0f62d843..9785b30ea00 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -973,21 +973,29 @@ void end_connection(THD *thd)
plugin_thdvar_cleanup(thd);
if (thd->user_connect)
decrease_user_connections(thd->user_connect);
+
+ if (thd->killed ||
+ net->error && net->vio != 0 && net->report_error)
+ {
+ statistic_increment(aborted_threads,&LOCK_status);
+ }
+
if (net->error && net->vio != 0 && net->report_error)
{
- Security_context *sctx= thd->security_ctx;
if (!thd->killed && thd->variables.log_warnings > 1)
+ {
+ Security_context *sctx= thd->security_ctx;
+
sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION),
thd->thread_id,(thd->db ? thd->db : "unconnected"),
sctx->user ? sctx->user : "unauthenticated",
sctx->host_or_ip,
(net->last_errno ? ER(net->last_errno) :
ER(ER_UNKNOWN_ERROR)));
+ }
+
net_send_error(thd, net->last_errno, NullS);
- statistic_increment(aborted_threads,&LOCK_status);
}
- else if (thd->killed)
- statistic_increment(aborted_threads,&LOCK_status);
}