diff options
author | Vladislav Vaintroub <vvaintroub@linux-rbsx> | 2009-12-19 03:21:49 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@linux-rbsx> | 2009-12-19 03:21:49 +0100 |
commit | 106bb1652ed8918ee580e0aa83d59bf46053f7e9 (patch) | |
tree | 9ccfada701764a2476975250d029acbe812b12b1 /include/hash.h | |
parent | 27c0d595e9e3a35232672209219ecc9b74004ab4 (diff) | |
parent | 4e8d1c6bf30abfd45a993b058ff2a33d4671b73d (diff) | |
download | mariadb-git-106bb1652ed8918ee580e0aa83d59bf46053f7e9.tar.gz |
merge
Diffstat (limited to 'include/hash.h')
-rw-r--r-- | include/hash.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hash.h b/include/hash.h index d870e17c341..515c764214d 100644 --- a/include/hash.h +++ b/include/hash.h @@ -30,6 +30,7 @@ extern "C" { /* flags for hash_init */ #define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */ +typedef uint my_hash_value_type; typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool); typedef void (*my_hash_free_key)(void *); @@ -60,8 +61,18 @@ void my_hash_free(HASH *tree); void my_hash_reset(HASH *hash); uchar *my_hash_element(HASH *hash, ulong idx); uchar *my_hash_search(const HASH *info, const uchar *key, size_t length); +uchar *my_hash_search_using_hash_value(const HASH *info, + my_hash_value_type hash_value, + const uchar *key, size_t length); +my_hash_value_type my_calc_hash(const HASH *info, + const uchar *key, size_t length); uchar *my_hash_first(const HASH *info, const uchar *key, size_t length, HASH_SEARCH_STATE *state); +uchar *my_hash_first_from_hash_value(const HASH *info, + my_hash_value_type hash_value, + const uchar *key, + size_t length, + HASH_SEARCH_STATE *state); uchar *my_hash_next(const HASH *info, const uchar *key, size_t length, HASH_SEARCH_STATE *state); my_bool my_hash_insert(HASH *info, const uchar *data); |