mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge with public tree
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union client/mysql.cc: Auto merged configure.in: Auto merged include/config-win.h: Auto merged include/mysql.h: Auto merged include/mysql_version.h.in: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/ctype_collate.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/subselect.test: Auto merged mysys/default.c: Auto merged sql/Makefile.am: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/protocol.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_string.cc: Auto merged sql/sql_string.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
@ -102,7 +102,8 @@ void send_error(THD *thd, uint sql_errno, const char *err)
|
||||
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
|
||||
{
|
||||
/* The first # is to make the protocol backward compatible */
|
||||
strmov(buff+2, "#000000");
|
||||
buff[2]= '#';
|
||||
strmov(buff+3, mysql_errno_to_sqlstate(sql_errno));
|
||||
pos= buff + 2 + SQLSTATE_LENGTH +1;
|
||||
}
|
||||
length= (uint) (strmake(pos, err, MYSQL_ERRMSG_SIZE-1) - buff);
|
||||
@ -222,8 +223,8 @@ net_printf(THD *thd, uint errcode, ...)
|
||||
int2store(pos, errcode);
|
||||
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
|
||||
{
|
||||
/* The first # is to make the protocol backward compatible */
|
||||
memcpy(pos+2, "#000000", SQLSTATE_LENGTH +1);
|
||||
pos[2]= '#'; /* To make the protocol backward compatible */
|
||||
memcpy(pos+3, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
|
||||
}
|
||||
}
|
||||
VOID(net_real_write(net,(char*) net->buff,length+head_length+1+offset));
|
||||
|
Reference in New Issue
Block a user