mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 22:25:32 +02:00
Merge from mysql-next-mr.
This commit is contained in:
commit
2dc132b209
497 changed files with 23009 additions and 19317 deletions
|
|
@ -381,6 +381,9 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
|
|||
/*
|
||||
buff[]: sql_errno:2 + ('#':1 + SQLSTATE_LENGTH:5) + MYSQL_ERRMSG_SIZE:512
|
||||
*/
|
||||
uint error;
|
||||
uchar converted_err[MYSQL_ERRMSG_SIZE];
|
||||
uint32 converted_err_len;
|
||||
uchar buff[2+1+SQLSTATE_LENGTH+MYSQL_ERRMSG_SIZE], *pos;
|
||||
|
||||
DBUG_ENTER("send_error_packet");
|
||||
|
|
@ -403,7 +406,12 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
|
|||
buff[2]= '#';
|
||||
pos= (uchar*) strmov((char*) buff+3, sqlstate);
|
||||
}
|
||||
length= (uint) (strmake((char*) pos, err, MYSQL_ERRMSG_SIZE-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);
|
||||
length= (uint) (strmake((char*) pos, (char*)converted_err, MYSQL_ERRMSG_SIZE) -
|
||||
(char*) buff);
|
||||
err= (char*) buff;
|
||||
DBUG_RETURN(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) err,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue