diff options
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r-- | sql/sql_connect.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 7869f7f540c..fe6a101f999 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1165,7 +1165,8 @@ void end_connection(THD *thd) } if (!thd->killed && (net->error && net->vio != 0)) - thd->print_aborted_warning(1, ER_THD(thd, ER_UNKNOWN_ERROR)); + thd->print_aborted_warning(1, thd->get_stmt_da()->is_error() + ? thd->get_stmt_da()->message() : ER_THD(thd, ER_UNKNOWN_ERROR)); } |