diff options
author | unknown <monty@mysql.com> | 2003-11-22 03:21:40 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-11-22 03:21:40 +0200 |
commit | bab6d9f74ba495e333a334e03f3ae509361dada5 (patch) | |
tree | f843dfed18127f94f90e6cffa6456e545f7b6b57 /sql/hostname.cc | |
parent | 52521cc8c76f99d2046a72a09440e616797e672a (diff) | |
download | mariadb-git-bab6d9f74ba495e333a334e03f3ae509361dada5.tar.gz |
Don't flush cur_log (relay log) on flush_relay_log_info becasue this crashes the server if cur_log is 'hot' and the io_thread has changed log file.
Updated project files for windows
Made rpl_change_master.test portable
Ensure that mutex are not freed if not initilized
VC++Files/client/mysql.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/comp_err/comp_err.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/innobase/innobase.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/libmysqld/examples/test_libmysqld.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/libmysqld/libmysqld.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/myisamchk/myisamchk.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/myisamlog/myisamlog.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/myisampack/myisampack.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/mysqlmanager/MySqlManager.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/mysqlshutdown/mysqlshutdown.dsp:
Updated project files for windows according to suggestions from Intel
VC++Files/mysys/mysys.dsp:
Updated project files for windows according to suggestions from Intel
libmysql/libmysql.c:
Removed not used include files (which caused problems on Win64)
mysql-test/r/rpl_change_master.result:
Made test portable
mysql-test/t/rpl_change_master.test:
Made test portable
sql-common/client.c:
Removed not used include files (which caused problems on Win64)
sql/ha_innodb.cc:
Ensure that mutex is not freed if not initilized
sql/hostname.cc:
Ensure that mutex is not freed if not initilized
sql/slave.cc:
Don't flush cur_log (relay log) on flush_relay_log_info becasue this crashes the server if cur_log is 'hot' and the io_thread has changed log file.
Diffstat (limited to 'sql/hostname.cc')
-rw-r--r-- | sql/hostname.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/hostname.cc b/sql/hostname.cc index 5c4bde99256..c9cb2a43963 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -61,23 +61,27 @@ 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, offset, sizeof(struct in_addr),NULL, (hash_free_key) free, &my_charset_latin1))) return 1; hostname_cache->clear(); + (void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW); return 0; } void hostname_cache_free() { - (void) pthread_mutex_destroy(&LOCK_hostname); - delete hostname_cache; + if (hostname_cache) + { + (void) pthread_mutex_destroy(&LOCK_hostname); + delete hostname_cache; + hostname_cache= 0; + } } + static void add_hostname(struct in_addr *in,const char *name) { if (!(specialflag & SPECIAL_NO_HOST_CACHE)) |