From 876a96cd0233d8ed5befa247220f57beff7f582a Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 13:12:52 +0300 Subject: [PATCH 1/3] make it compile with -ansi -pedantic --- sql/net_serv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index ca82c49b62d..5699b5a2f55 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -251,7 +251,7 @@ my_bool my_net_write(NET *net,const char *packet,ulong len) { uchar buff[NET_HEADER_SIZE]; - if (unlikely(!net->vio)) // nowhere to write + if (unlikely(!net->vio)) /* nowhere to write */ return 0; /* Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH From 067d13f63244957241b34556e72883ebe9c6ac1c Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 13:53:10 +0300 Subject: [PATCH 2/3] A fix for linking failure of MySQL client when linking with imap libraries (Bug#7428) (renamed: hash_reset -> my_hash_reset) --- mysys/hash.c | 6 +++--- sql/sql_class.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mysys/hash.c b/mysys/hash.c index 451bc1eb7f5..6091ef39a4e 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -122,13 +122,13 @@ void hash_free(HASH *hash) Delete all elements from the hash (the hash itself is to be reused). SYNOPSIS - hash_reset() + my_hash_reset() hash the hash to delete elements of */ -void hash_reset(HASH *hash) +void my_hash_reset(HASH *hash) { - DBUG_ENTER("hash_reset"); + DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash: 0x%lxd",hash)); hash_free_elements(hash); diff --git a/sql/sql_class.h b/sql/sql_class.h index 169835f3324..7978aec8f1d 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -648,8 +648,8 @@ public: /* Erase all statements (calls Statement destructor) */ void reset() { - hash_reset(&names_hash); - hash_reset(&st_hash); + my_hash_reset(&names_hash); + my_hash_reset(&st_hash); last_found_statement= 0; } From 4073c11a7244baa3f3ab5d9838bdc76d1d84f020 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 13:57:07 +0300 Subject: [PATCH 3/3] Followup: rename the declaration (hash_reset -> my_hash_reset) --- include/hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hash.h b/include/hash.h index cd7210a290c..9a6d91036e1 100644 --- a/include/hash.h +++ b/include/hash.h @@ -47,7 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset, uint key_length, hash_get_key get_key, void (*free_element)(void*), uint flags CALLER_INFO_PROTO); void hash_free(HASH *tree); -void hash_reset(HASH *hash); +void my_hash_reset(HASH *hash); byte *hash_element(HASH *hash,uint idx); gptr hash_search(HASH *info,const byte *key,uint length); gptr hash_next(HASH *info,const byte *key,uint length);