summaryrefslogtreecommitdiff
path: root/include/hash.h
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-10-09 14:22:22 +0200
committerMikael Ronstrom <mikael@mysql.com>2009-10-09 14:22:22 +0200
commitd3540b216f2d39126d77985db3f7639eb45bf967 (patch)
treebd91284ce826b8e44b1a50008e69d8dc56a5d5a1 /include/hash.h
parentee696e4163354b85c60c68cb791005fa127abcea (diff)
downloadmariadb-git-d3540b216f2d39126d77985db3f7639eb45bf967.tar.gz
A minor change to MySQL's hash where calculation of hash can be done separately to avoid doing it under contended mutex locks
Diffstat (limited to 'include/hash.h')
-rw-r--r--include/hash.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hash.h b/include/hash.h
index 629b404e8a7..b6fc365ab76 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -45,6 +45,7 @@ extern "C" {
#define hash_element my_hash_element
#define hash_search my_hash_search
#define hash_first my_hash_first
+#define hash_first_from_hash_value my_hash_first_from_hash_value
#define hash_next my_hash_next
#define hash_insert my_hash_insert
#define hash_delete my_hash_delete
@@ -94,8 +95,16 @@ 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, uint hash_value,
+ const uchar *key, size_t length);
+uint 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,
+ uint 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);