From 22204807317c467b2f09dd0dcd13898a48501b10 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 25 Apr 2016 18:59:41 +0200 Subject: MDEV-7775 Wrong error message (Unknown error) when idle sessions are killed after wait_timeout restore the error message that was removed by mistake in ec38c1bbd709 --- sql/sql_connect.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_connect.cc') diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 16b53da1ebd..61f8b4081eb 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1092,7 +1092,8 @@ void end_connection(THD *thd) } if (!thd->killed && (net->error && net->vio != 0)) - thd->print_aborted_warning(1, ER(ER_UNKNOWN_ERROR)); + thd->print_aborted_warning(1, + thd->stmt_da->is_error() ? thd->stmt_da->message() : ER(ER_UNKNOWN_ERROR)); } -- cgit v1.2.1