summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r--sql/sql_connect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 44ad0d42d47..b7cdda993d6 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1106,7 +1106,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));
}