1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Backport to 5.4 the following changesets:

revno: 2476.785.24
committer: kostja@bodhi.(none)
timestamp: Tue 2007-10-16 20:19:00 +0400
message:
  Reflect a rename of a member in the client ABI (a compatible change).
----------------------------------------------------------
revno: 2476.423.26
committer: kostja@bodhi.(none)
timestamp: Tue 2007-10-16 20:12:37 +0400
message:
  Update the client ABI to reflect member rename
  (this is a backward-compatible change).
----------------------------------------------------------
revno: 2476.785.22
committer: kostja@bodhi.(none)
timestamp: Tue 2007-10-16 19:37:25 +0400
message:
  Remove some remains of support of 3.22 protocol. This was in fact dead code,
  since the option to talk 3.22 protocol was removed in 4.1 and there
  is no other protocol negotiation mechanism besides this option.
This commit is contained in:
Konstantin Osipov
2009-10-09 13:06:41 +04:00
parent a7b0148057
commit 62672568bd
6 changed files with 22 additions and 34 deletions

View File

@ -394,27 +394,19 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
DBUG_RETURN(FALSE);
}
if (net->return_errno)
{ // new client code; Add errno before message
int2store(buff,sql_errno);
pos= buff+2;
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
{
/* The first # is to make the protocol backward compatible */
buff[2]= '#';
pos= (uchar*) strmov((char*) buff+3, sqlstate);
}
length= (uint) (strmake((char*) pos, err, MYSQL_ERRMSG_SIZE-1) -
(char*) buff);
err= (char*) buff;
}
else
int2store(buff,sql_errno);
pos= buff+2;
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
{
length=(uint) strlen(err);
set_if_smaller(length,MYSQL_ERRMSG_SIZE-1);
/* The first # is to make the protocol backward compatible */
buff[2]= '#';
pos= (uchar*) strmov((char*) buff+3, sqlstate);
}
length= (uint) (strmake((char*) pos, err, MYSQL_ERRMSG_SIZE-1) -
(char*) buff);
err= (char*) buff;
DBUG_RETURN(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) err,
length));
length));
}
#endif /* EMBEDDED_LIBRARY */