summaryrefslogtreecommitdiff
path: root/sql/hostname.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-02 17:04:16 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-02 17:04:16 +0300
commit499ebe5459e655ede75f0d9c30608dd704e637a9 (patch)
tree94ea4566e60e0653e37c415afee1899dc3bac9d9 /sql/hostname.cc
parentd5adf39c85eb1a4acdf828ad4ea675beb30d4c81 (diff)
downloadmariadb-git-499ebe5459e655ede75f0d9c30608dd704e637a9.tar.gz
Fixed bug in wait_for_relay_log_space()
Added checking of sem_init() in configure. client/mysqltest.c: Cleanup configure.in: Added checking of sem_init sql/hostname.cc: Portability fix sql/slave.cc: Fixed bug in wait_for_relay_log_space()
Diffstat (limited to 'sql/hostname.cc')
-rw-r--r--sql/hostname.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/hostname.cc b/sql/hostname.cc
index 5359f876522..bd4ec06c083 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -57,8 +57,11 @@ void hostname_cache_refresh()
bool hostname_cache_init()
{
+ host_entry *tmp;
+ uint offset= (uint) ((char*) (&tmp->ip) - (char*) &tmp);
(void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW);
- if (!(hostname_cache=new hash_filo(HOST_CACHE_SIZE,offsetof(host_entry,ip),
+
+ if (!(hostname_cache=new hash_filo(HOST_CACHE_SIZE, offset,
sizeof(struct in_addr),NULL,
(void (*)(void*)) free)))
return 1;