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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix hash_update_hash_key() to handle same-bucket case correctly.
Date: 2013-01-15 02:57:22
Message-ID: E1TuwiI-00077y-Ae@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1b794d3f3286036eec1d09d5cbea989162657331

Modified Files
--------------
src/backend/utils/hash/dynahash.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-01-15 13:47:27 pgsql: Give a proper error message if connecting to incompatible server
Previous Message Heikki Linnakangas 2013-01-14 22:48:38 pgsql: Return value of lseek() can be negative on failure.