summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2009-10-21 15:48:22 +0500
committerAlexander Barkov <bar@mysql.com>2009-10-21 15:48:22 +0500
commit344ddc85faa7b6936f0f2d9b925af112cbaa1d79 (patch)
treed2522e7182d47f0be16e18e95d3830f7ff496ce0 /libmysqld
parent479b602fd6453e9e5907d7a2554f9682bac6a1b8 (diff)
parentac2a0348a24f501fdd2ffb1dcf3bde5d3ce101db (diff)
downloadmariadb-git-344ddc85faa7b6936f0f2d9b925af112cbaa1d79.tar.gz
Merging mysql-next-mr-merge to mysql-next-mr.
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index dc39fb54f8c..ccf3d0a847b 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -1090,6 +1090,9 @@ net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
const char *sqlstate)
{
+ uint error;
+ uchar converted_err[MYSQL_ERRMSG_SIZE];
+ uint32 converted_err_len;
MYSQL_DATA *data= thd->cur_data;
struct embedded_query_result *ei;
@@ -1104,7 +1107,12 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
ei= data->embedded_info;
ei->last_errno= sql_errno;
- strmake(ei->info, err, sizeof(ei->info)-1);
+ converted_err_len= convert_error_message((char*)converted_err,
+ sizeof(converted_err),
+ thd->variables.character_set_results,
+ err, strlen(err),
+ system_charset_info, &error);
+ strmake(ei->info, (const char*) converted_err, sizeof(ei->info)-1);
strmov(ei->sqlstate, sqlstate);
ei->server_status= thd->server_status;
thd->cur_data= 0;