Commit eb9c8e0a authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

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

parent fc96d50a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment