1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

minor post review fixes

This commit is contained in:
petr@mysql.com
2004-10-25 14:23:31 +04:00
parent a8e2db4ecd
commit 1e46fea310
13 changed files with 77 additions and 84 deletions

View File

@ -105,9 +105,9 @@ void store_to_string(Buffer *buf, const char *string, uint *position)
uint string_len;
string_len= strlen(string);
buf->check_and_add(*position, 2);
buf->reserve(*position, 2);
currpos= net_store_length(buf->buffer + *position, string_len);
buf->put_to_buffer(currpos, string, string_len);
buf->append(currpos, string, string_len);
*position= *position + string_len + (currpos - buf->buffer - *position);
}
@ -147,7 +147,7 @@ int send_fields(struct st_net *net, LIST *fields)
store_to_string(&send_buff, (char *) "", &position); /* table name alias */
store_to_string(&send_buff, field->name, &position); /* column name */
store_to_string(&send_buff, field->name, &position); /* column name alias */
send_buff.check_and_add(position, 12);
send_buff.reserve(position, 12);
send_buff.buffer[position++]= 12;
int2store(send_buff.buffer + position, 1); /* charsetnr */
int4store(send_buff.buffer + position + 2, field->length); /* field length */