Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit eb9c8e0

Browse files
committed
_hash_first: release buf & metabuf if no tuples found for a key.
1 parent fc96d50 commit eb9c8e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/access/hash/hashsearch.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.9 1997/04/30 06:31:16 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.10 1997/06/28 05:45:40 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -227,7 +227,11 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
227227
* tuples from all buckets. - vadim 04/29/97
228228
*/
229229
if ( scan->numberOfKeys >= 1 )
230+
{
231+
_hash_relbuf(rel, buf, HASH_READ);
232+
_hash_relbuf(rel, metabuf, HASH_READ);
230233
return ((RetrieveIndexResult) NULL);
234+
}
231235
}
232236
}
233237
if (ScanDirectionIsBackward(dir)) {

0 commit comments

Comments
 (0)