diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-10-14 20:37:38 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-10-14 20:37:38 +0400 |
commit | 9b41c7532d18b04d2f430932ad916886c77fbff6 (patch) | |
tree | f4b1025df0074aacaf5f04f64aac370a80806ee1 /storage/blackhole | |
parent | 2b75d952e68375eb1727040074266bbe1b436653 (diff) | |
download | mariadb-git-9b41c7532d18b04d2f430932ad916886c77fbff6.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2617.22.5
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Tue 2009-01-27 05:08:48 +0300
message:
Remove non-prefixed use of HASH.
Always use my_hash_init(), my_hash_inited(), my_hash_search(),
my_hash_element(), my_hash_delete(), my_hash_free() rather
than non-prefixed counterparts (hash_init(), etc).
Remove the backward-compatible defines.
Diffstat (limited to 'storage/blackhole')
-rw-r--r-- | storage/blackhole/ha_blackhole.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc index 03ed57f38e8..e64933f6629 100644 --- a/storage/blackhole/ha_blackhole.cc +++ b/storage/blackhole/ha_blackhole.cc @@ -319,8 +319,9 @@ static st_blackhole_share *get_share(const char *table_name) length= (uint) strlen(table_name); pthread_mutex_lock(&blackhole_mutex); - if (!(share= (st_blackhole_share*) hash_search(&blackhole_open_tables, - (uchar*) table_name, length))) + if (!(share= (st_blackhole_share*) + my_hash_search(&blackhole_open_tables, + (uchar*) table_name, length))) { if (!(share= (st_blackhole_share*) my_malloc(sizeof(st_blackhole_share) + length, @@ -350,7 +351,7 @@ static void free_share(st_blackhole_share *share) { pthread_mutex_lock(&blackhole_mutex); if (!--share->use_count) - hash_delete(&blackhole_open_tables, (uchar*) share); + my_hash_delete(&blackhole_open_tables, (uchar*) share); pthread_mutex_unlock(&blackhole_mutex); } @@ -377,16 +378,16 @@ static int blackhole_init(void *p) blackhole_hton->flags= HTON_CAN_RECREATE; VOID(pthread_mutex_init(&blackhole_mutex, MY_MUTEX_INIT_FAST)); - (void) hash_init(&blackhole_open_tables, system_charset_info,32,0,0, - (hash_get_key) blackhole_get_key, - (hash_free_key) blackhole_free_key, 0); + (void) my_hash_init(&blackhole_open_tables, system_charset_info,32,0,0, + (my_hash_get_key) blackhole_get_key, + (my_hash_free_key) blackhole_free_key, 0); return 0; } static int blackhole_fini(void *p) { - hash_free(&blackhole_open_tables); + my_hash_free(&blackhole_open_tables); pthread_mutex_destroy(&blackhole_mutex); return 0; |