diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-11-16 23:16:44 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-11-16 23:16:44 +0400 |
commit | e971334eced6516f92ea5b63b06ac703e145192b (patch) | |
tree | 5400912843b70b171dc06c8cdc96a6f3329a25db /sql/protocol.cc | |
parent | daaddeb656c26c685962fef69d19e7f264620e2b (diff) | |
parent | e78fd1d14b7b151c4968702a28292d1d41b4f2ea (diff) | |
download | mariadb-git-e971334eced6516f92ea5b63b06ac703e145192b.tar.gz |
Merge mysql.com:/home/hf/work/mysql-4.1-mrg
into mysql.com:/home/hf/work/mysql-5.0-mrg
client/mysqltest.c:
Auto merged
mysql-test/t/flush.test:
Auto merged
mysql-test/t/flush_block_commit.test:
Auto merged
mysql-test/t/innodb-deadlock.test:
Auto merged
mysql-test/t/innodb-lock.test:
Auto merged
mysql-test/t/lock_multi.test:
Auto merged
mysql-test/t/rename.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/status.test:
Auto merged
sql/item.cc:
Auto merged
sql/protocol.h:
Auto merged
sql-common/client.c:
Auto merged
Makefile.am:
merging
BitKeeper/deleted/.del-mysql_client.test:
merging
include/mysql.h:
SCCS merged
libmysql/libmysql.c:
merging
libmysqld/lib_sql.cc:
merging
mysql-test/r/order_by.result:
SCCS merged
mysql-test/r/subselect.result:
SCCS merged
mysql-test/t/order_by.test:
merging
mysql-test/t/subselect.test:
SCCS merged
sql/item_subselect.cc:
merging
sql/item_subselect.h:
merging
sql/protocol.cc:
merging
sql/sql_class.h:
merging
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 5de24ebdcb3..e7a8d493341 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -46,7 +46,7 @@ bool Protocol_prep::net_store_data(const char *from, uint length) packet->realloc(packet_length+9+length)) return 1; char *to=(char*) net_store_length((char*) packet->ptr()+packet_length, - (ulonglong) length); + length); memcpy(to,from,length); packet->length((uint) (to+length-packet->ptr())); return 0; @@ -280,8 +280,8 @@ send_ok(THD *thd, ha_rows affected_rows, ulonglong id, const char *message) } buff[0]=0; // No fields - pos=net_store_length(buff+1,(ulonglong) affected_rows); - pos=net_store_length(pos, (ulonglong) id); + pos=net_store_length(buff+1,affected_rows); + pos=net_store_length(pos, id); if (thd->client_capabilities & CLIENT_PROTOCOL_41) { DBUG_PRINT("info", @@ -456,7 +456,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err) ulonglong for bigger numbers. */ -char *net_store_length(char *pkg, uint length) +static char *net_store_length_fast(char *pkg, uint length) { uchar *packet=(uchar*) pkg; if (length < 251) @@ -479,7 +479,7 @@ char *net_store_length(char *pkg, uint length) char *net_store_data(char *to,const char *from, uint length) { - to=net_store_length(to,length); + to=net_store_length_fast(to,length); memcpy(to,from,length); return to+length; } @@ -488,7 +488,7 @@ char *net_store_data(char *to,int32 from) { char buff[20]; uint length=(uint) (int10_to_str(from,buff,10)-buff); - to=net_store_length(to,length); + to=net_store_length_fast(to,length); memcpy(to,buff,length); return to+length; } @@ -497,7 +497,7 @@ char *net_store_data(char *to,longlong from) { char buff[22]; uint length=(uint) (longlong10_to_str(from,buff,10)-buff); - to=net_store_length(to,length); + to=net_store_length_fast(to,length); memcpy(to,buff,length); return to+length; } @@ -561,7 +561,7 @@ bool Protocol::send_fields(List<Item> *list, uint flags) if (flags & SEND_NUM_ROWS) { // Packet with number of elements - char *pos=net_store_length(buff, (uint) list->elements); + char *pos=net_store_length(buff, list->elements); (void) my_net_write(&thd->net, buff,(uint) (pos-buff)); } |