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 | 64dbe379d702c50151b88868e84ccf903e8fcf03 (patch) | |
tree | f4b1025df0074aacaf5f04f64aac370a80806ee1 /storage/federated | |
parent | 902f99bcba04b2de8ad226365278bc0c4f0ebe44 (diff) | |
download | mariadb-git-64dbe379d702c50151b88868e84ccf903e8fcf03.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/federated')
-rw-r--r-- | storage/federated/ha_federated.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index a3fa42d7d05..cf39e306067 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -459,8 +459,8 @@ int federated_db_init(void *p) if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST)) goto error; - if (!hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0, - (hash_get_key) federated_get_key, 0, 0)) + if (!my_hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0, + (my_hash_get_key) federated_get_key, 0, 0)) { DBUG_RETURN(FALSE); } @@ -483,7 +483,7 @@ error: int federated_done(void *p) { - hash_free(&federated_open_tables); + my_hash_free(&federated_open_tables); VOID(pthread_mutex_destroy(&federated_mutex)); return 0; @@ -1495,10 +1495,10 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) goto error; /* TODO: change tmp_share.scheme to LEX_STRING object */ - if (!(share= (FEDERATED_SHARE *) hash_search(&federated_open_tables, - (uchar*) tmp_share.share_key, - tmp_share. - share_key_length))) + if (!(share= (FEDERATED_SHARE *) my_hash_search(&federated_open_tables, + (uchar*) tmp_share.share_key, + tmp_share. + share_key_length))) { query.set_charset(system_charset_info); query.append(STRING_WITH_LEN("SELECT ")); @@ -1560,7 +1560,7 @@ static int free_share(FEDERATED_SHARE *share) pthread_mutex_lock(&federated_mutex); if (!--share->use_count) { - hash_delete(&federated_open_tables, (uchar*) share); + my_hash_delete(&federated_open_tables, (uchar*) share); thr_lock_delete(&share->lock); VOID(pthread_mutex_destroy(&share->mutex)); free_root(&mem_root, MYF(0)); |