diff options
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 62573da54f9..da363a478fd 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -103,8 +103,7 @@ void send_error(THD *thd, uint sql_errno, const char *err) { /* The first # is to make the protocol backward compatible */ buff[2]= '#'; - strmov(buff+3, mysql_errno_to_sqlstate(sql_errno)); - pos= buff + 2 + SQLSTATE_LENGTH +1; + pos= strmov(buff+3, mysql_errno_to_sqlstate(sql_errno)); } length= (uint) (strmake(pos, err, MYSQL_ERRMSG_SIZE-1) - buff); err=buff; |