Fix hash_update_hash_key() to handle same-bucket case correctly.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 1b794d3f3286036eec1d09d5cbea989162657331
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2013-01-15T02:57:15Z
Releases: 9.3.0
Fix hash_update_hash_key() to handle same-bucket case correctly.

Original coding would corrupt the hashtable if the item being updated was
at the end of its bucket chain and the new hash key hashed to that same
bucket.  Diagnosis and fix by Heikki Linnakangas.

Files

PathChange+/−
src/backend/utils/hash/dynahash.c modified +19 −8