diff options
author | unknown <sergefp@mysql.com> | 2004-11-16 21:36:31 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-11-16 21:36:31 +0300 |
commit | f2db7d57f5a3735d36a6c53c27f5ad5dc77c5603 (patch) | |
tree | e0894041b167c4643344aaa4a8bf1281db3ac3e4 /heap/hp_hash.c | |
parent | c9a09e12db31c530ffa763e9657dd502db26c5d7 (diff) | |
parent | 612c83b845822e13a6653af3985c4e3395cb8259 (diff) | |
download | mariadb-git-f2db7d57f5a3735d36a6c53c27f5ad5dc77c5603.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-heap-bug
heap/hp_hash.c:
Auto merged
mysql-test/r/heap.result:
Auto merged
sql/ha_heap.cc:
Auto merged
Diffstat (limited to 'heap/hp_hash.c')
-rw-r--r-- | heap/hp_hash.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c index b54e76d79fe..ee5b4958e62 100644 --- a/heap/hp_hash.c +++ b/heap/hp_hash.c @@ -196,7 +196,18 @@ byte *hp_search_next(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *key, } - /* Calculate pos according to keys */ +/* + Calculate position number for hash value. + SYNOPSIS + hp_mask() + hashnr Hash value + buffmax Value such that + 2^(n-1) < maxlength <= 2^n = buffmax + maxlength + + RETURN + Array index, in [0..maxlength) +*/ ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength) { @@ -205,7 +216,12 @@ ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength) } - /* Change link from pos to new_link */ +/* + Change + next_link -> ... -> X -> pos + to + next_link -> ... -> X -> newlink +*/ void hp_movelink(HASH_INFO *pos, HASH_INFO *next_link, HASH_INFO *newlink) { |