Commit 9d0dbb18 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2322], replace hash_ functions with my_hash_

git-svn-id: file:///svn/mysql/tokudb-engine/src@17142 c7de825b-a66e-492c-adef-691d508d4ae1
parent f56a0572
...@@ -143,7 +143,7 @@ static TOKUDB_SHARE *get_share(const char *table_name, TABLE_SHARE* table_share) ...@@ -143,7 +143,7 @@ static TOKUDB_SHARE *get_share(const char *table_name, TABLE_SHARE* table_share)
pthread_mutex_lock(&tokudb_mutex); pthread_mutex_lock(&tokudb_mutex);
length = (uint) strlen(table_name); length = (uint) strlen(table_name);
if (!(share = (TOKUDB_SHARE *) hash_search(&tokudb_open_tables, (uchar *) table_name, length))) { if (!(share = (TOKUDB_SHARE *) my_hash_search(&tokudb_open_tables, (uchar *) table_name, length))) {
char *tmp_name; char *tmp_name;
// //
...@@ -240,7 +240,7 @@ static int free_share(TOKUDB_SHARE * share, bool mutex_is_locked) { ...@@ -240,7 +240,7 @@ static int free_share(TOKUDB_SHARE * share, bool mutex_is_locked) {
} }
hash_delete(&tokudb_open_tables, (uchar *) share); my_hash_delete(&tokudb_open_tables, (uchar *) share);
thr_lock_delete(&share->lock); thr_lock_delete(&share->lock);
pthread_mutex_destroy(&share->mutex); pthread_mutex_destroy(&share->mutex);
my_free((uchar *) share, MYF(0)); my_free((uchar *) share, MYF(0));
......
...@@ -134,7 +134,7 @@ static int tokudb_init_func(void *p) { ...@@ -134,7 +134,7 @@ static int tokudb_init_func(void *p) {
VOID(pthread_mutex_init(&tokudb_mutex, MY_MUTEX_INIT_FAST)); VOID(pthread_mutex_init(&tokudb_mutex, MY_MUTEX_INIT_FAST));
VOID(pthread_mutex_init(&tokudb_meta_mutex, MY_MUTEX_INIT_FAST)); VOID(pthread_mutex_init(&tokudb_meta_mutex, MY_MUTEX_INIT_FAST));
(void) hash_init(&tokudb_open_tables, system_charset_info, 32, 0, 0, (hash_get_key) tokudb_get_key, 0, 0); (void) my_hash_init(&tokudb_open_tables, system_charset_info, 32, 0, 0, (my_hash_get_key) tokudb_get_key, 0, 0);
tokudb_hton->state = SHOW_OPTION_YES; tokudb_hton->state = SHOW_OPTION_YES;
// tokudb_hton->flags= HTON_CAN_RECREATE; // QQQ this came from skeleton // tokudb_hton->flags= HTON_CAN_RECREATE; // QQQ this came from skeleton
...@@ -338,7 +338,7 @@ static int tokudb_done_func(void *p) { ...@@ -338,7 +338,7 @@ static int tokudb_done_func(void *p) {
if (tokudb_open_tables.records) if (tokudb_open_tables.records)
error = 1; error = 1;
hash_free(&tokudb_open_tables); my_hash_free(&tokudb_open_tables);
pthread_mutex_destroy(&tokudb_mutex); pthread_mutex_destroy(&tokudb_mutex);
pthread_mutex_destroy(&tokudb_meta_mutex); pthread_mutex_destroy(&tokudb_meta_mutex);
#if defined(_WIN32) #if defined(_WIN32)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment