diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2006-05-26 08:01:17 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2006-05-26 08:01:17 +0000 |
commit | 5d1a066e64d775369a072bd0a323b2972f7ef979 (patch) | |
tree | 1dec755420e99a62eede3fd302fe388b21f5eee7 /src | |
parent | 0a5fdb0d914756798885403f63c0bda4dd8cea82 (diff) | |
download | postgresql-5d1a066e64d775369a072bd0a323b2972f7ef979.tar.gz postgresql-5d1a066e64d775369a072bd0a323b2972f7ef979.zip |
Fix findParents() in case of multiple levels to find.
By Andreas Seltenreich <andreas+pg@gate450.dyndns.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/gin/ginbtree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c index 821822c8a94..6db094031e8 100644 --- a/src/backend/access/gin/ginbtree.c +++ b/src/backend/access/gin/ginbtree.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/gin/ginbtree.c,v 1.1 2006/05/02 11:28:54 teodor Exp $ + * $PostgreSQL: pgsql/src/backend/access/gin/ginbtree.c,v 1.2 2006/05/26 08:01:17 teodor Exp $ *------------------------------------------------------------------------- */ @@ -202,7 +202,7 @@ findParents( GinBtree btree, GinBtreeStack *stack, for(;;) { buffer = ReadBuffer(btree->index, blkno); LockBuffer(buffer, GIN_EXCLUSIVE); - page = BufferGetPage(root->buffer); + page = BufferGetPage(buffer); if ( GinPageIsLeaf(page) ) elog(ERROR, "Lost path"); @@ -224,6 +224,7 @@ findParents( GinBtree btree, GinBtreeStack *stack, ptr->blkno = blkno; ptr->buffer = buffer; ptr->parent = root; /* it's may be wrong, but in next call we will correct */ + ptr->off = offset; stack->parent = ptr; return; } |