_hash_first: release buf & metabuf if no tuples found for a key.

This commit is contained in:
Vadim B. Mikheev 1997-06-28 05:45:40 +00:00
parent fc96d50a5c
commit eb9c8e0a59

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.9 1997/04/30 06:31:16 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.10 1997/06/28 05:45:40 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@ -227,9 +227,13 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
* tuples from all buckets. - vadim 04/29/97
*/
if ( scan->numberOfKeys >= 1 )
{
_hash_relbuf(rel, buf, HASH_READ);
_hash_relbuf(rel, metabuf, HASH_READ);
return ((RetrieveIndexResult) NULL);
}
}
}
if (ScanDirectionIsBackward(dir)) {
while (BlockNumberIsValid(opaque->hasho_nextblkno)) {
_hash_readnext(rel, &buf, &page, &opaque);