mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
This commit is contained in:
commit
8f2c275746
2 changed files with 7 additions and 10 deletions
|
@ -80,10 +80,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
|||
|
||||
if ((net->last_errno= thd->net.last_errno))
|
||||
{
|
||||
memcpy(net->last_error, net->last_error,
|
||||
sizeof(net->last_error));
|
||||
memcpy(net->sqlstate, thd->net.sqlstate,
|
||||
sizeof(net->sqlstate));
|
||||
memcpy(net->last_error, thd->net.last_error, sizeof(net->last_error));
|
||||
memcpy(net->sqlstate, thd->net.sqlstate, sizeof(net->sqlstate));
|
||||
}
|
||||
mysql->warning_count= ((THD*)mysql->thd)->total_warn_count;
|
||||
return result;
|
||||
|
@ -482,15 +480,16 @@ bool Protocol_simple::store_null()
|
|||
|
||||
bool Protocol::net_store_data(const char *from, uint length)
|
||||
{
|
||||
if (!(*next_field=alloc_root(alloc, length + 1)))
|
||||
char *field_buf;
|
||||
if (!(field_buf=alloc_root(alloc, length + sizeof(uint))))
|
||||
return true;
|
||||
*(uint *)field_buf= length;
|
||||
*next_field= field_buf + sizeof(uint);
|
||||
memcpy(*next_field, from, length);
|
||||
(*next_field)[length]= 0;
|
||||
if (next_mysql_field->max_length < length)
|
||||
next_mysql_field->max_length=length;
|
||||
++next_field;
|
||||
++next_mysql_field;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,9 +176,7 @@ static void STDCALL emb_fetch_lengths(ulong *to, MYSQL_ROW column, uint field_co
|
|||
MYSQL_ROW end;
|
||||
|
||||
for (end=column + field_count; column != end ; column++,to++)
|
||||
{
|
||||
*to= *column ? strlen(*column) : 0;
|
||||
}
|
||||
*to= *column ? *(uint *)((*column) - sizeof(uint)) : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue