summaryrefslogtreecommitdiff
path: root/sql/hash_filo.h
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-10-14 20:37:38 +0400
committerKonstantin Osipov <kostja@sun.com>2009-10-14 20:37:38 +0400
commit9b41c7532d18b04d2f430932ad916886c77fbff6 (patch)
treef4b1025df0074aacaf5f04f64aac370a80806ee1 /sql/hash_filo.h
parent2b75d952e68375eb1727040074266bbe1b436653 (diff)
downloadmariadb-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 'sql/hash_filo.h')
-rw-r--r--sql/hash_filo.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/hash_filo.h b/sql/hash_filo.h
index ab13d338695..5d17b880b4d 100644
--- a/sql/hash_filo.h
+++ b/sql/hash_filo.h
@@ -38,8 +38,8 @@ class hash_filo_element
class hash_filo
{
const uint size, key_offset, key_length;
- const hash_get_key get_key;
- hash_free_key free_element;
+ const my_hash_get_key get_key;
+ my_hash_free_key free_element;
bool init;
CHARSET_INFO *hash_charset;
@@ -49,7 +49,7 @@ public:
HASH cache;
hash_filo(uint size_arg, uint key_offset_arg , uint key_length_arg,
- hash_get_key get_key_arg, hash_free_key free_element_arg,
+ my_hash_get_key get_key_arg, my_hash_free_key free_element_arg,
CHARSET_INFO *hash_charset_arg)
:size(size_arg), key_offset(key_offset_arg), key_length(key_length_arg),
get_key(get_key_arg), free_element(free_element_arg),init(0),
@@ -63,7 +63,7 @@ public:
if (init)
{
if (cache.array.buffer) /* Avoid problems with thread library */
- (void) hash_free(&cache);
+ (void) my_hash_free(&cache);
pthread_mutex_destroy(&lock);
}
}
@@ -76,8 +76,8 @@ public:
}
if (!locked)
(void) pthread_mutex_lock(&lock);
- (void) hash_free(&cache);
- (void) hash_init(&cache,hash_charset,size,key_offset,
+ (void) my_hash_free(&cache);
+ (void) my_hash_init(&cache,hash_charset,size,key_offset,
key_length, get_key, free_element,0);
if (!locked)
(void) pthread_mutex_unlock(&lock);
@@ -87,7 +87,7 @@ public:
hash_filo_element *search(uchar* key, size_t length)
{
hash_filo_element *entry=(hash_filo_element*)
- hash_search(&cache,(uchar*) key,length);
+ my_hash_search(&cache,(uchar*) key,length);
if (entry)
{ // Found; link it first
if (entry != first_link)
@@ -113,7 +113,7 @@ public:
{
hash_filo_element *tmp=last_link;
last_link=last_link->prev_used;
- hash_delete(&cache,(uchar*) tmp);
+ my_hash_delete(&cache,(uchar*) tmp);
}
if (my_hash_insert(&cache,(uchar*) entry))
{