>>>>> "Yan" == Yan Yu <yan2yu2@stripped> writes:
Yan> Dear MySQL experts:
Yan> Thank you so much for your reply to my previous Qs, they are very
Yan> Could someone please help me understand function my_hash_insert()
Yan> in mysys/hash.cc?
Yan> what are lines 352 -429 trying to achieve? Are they just some
Yan> optimization to shuffle existing
Yan> hash entries in the table (since the existing hash entries may be in
Yan> the wrong slot due to chaining
Yan> in the case of hash collision)?
The hash algorithm is based on dynamic hashing without empty slots.
This means that when you insert a new key, in some cases a small set
of old keys needs to be moved to other buckets. This is what the code
|• mysys/hash.c||Yan Yu||24 Dec|
| • re: mysys/hash.c||Michael Widenius||24 Dec|