diff options
Diffstat (limited to 'sql/net_pkg.cc')
-rw-r--r-- | sql/net_pkg.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/net_pkg.cc b/sql/net_pkg.cc index 55c9bd3cfab..1e7536e3007 100644 --- a/sql/net_pkg.cc +++ b/sql/net_pkg.cc @@ -48,6 +48,7 @@ void send_error(NET *net, uint sql_errno, const char *err) } } } + push_error(sql_errno, err); if (net->vio == 0) { if (thd && thd->bootstrap) @@ -82,7 +83,14 @@ void send_error(NET *net, uint sql_errno, const char *err) void send_warning(NET *net, uint sql_errno, const char *err) { - DBUG_ENTER("send_warning"); + DBUG_ENTER("send_warning"); + push_warning(sql_errno, err ? err : ER(sql_errno)); + + /* + TODO : + Try to return ok with warning status to client, instead + of returning error .. + */ send_error(net,sql_errno,err); DBUG_VOID_RETURN; } @@ -124,6 +132,7 @@ net_printf(NET *net, uint errcode, ...) length=sizeof(net->last_error)-1; /* purecov: inspected */ va_end(args); + push_error(errcode, text_pos); if (net->vio == 0) { if (thd && thd->bootstrap) @@ -335,7 +344,7 @@ net_store_data(String *packet,struct tm *tmp) bool net_store_data(String* packet, I_List<i_string>* str_list) { char buf[256]; - String tmp(buf, sizeof(buf)); + String tmp(buf, sizeof(buf), default_charset_info); tmp.length(0); I_List_iterator<i_string> it(*str_list); i_string* s; |