8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/access/gin/ginbtree.c,v 1.1 2006/05/02 11:28:54 teodor Exp $
11
+ * $PostgreSQL: pgsql/src/backend/access/gin/ginbtree.c,v 1.2 2006/05/26 08:01:17 teodor Exp $
12
12
*-------------------------------------------------------------------------
13
13
*/
14
14
@@ -202,7 +202,7 @@ findParents( GinBtree btree, GinBtreeStack *stack,
202
202
for (;;) {
203
203
buffer = ReadBuffer (btree -> index ,blkno );
204
204
LockBuffer (buffer ,GIN_EXCLUSIVE );
205
- page = BufferGetPage (root -> buffer );
205
+ page = BufferGetPage (buffer );
206
206
if (GinPageIsLeaf (page ) )
207
207
elog (ERROR ,"Lost path" );
208
208
@@ -224,6 +224,7 @@ findParents( GinBtree btree, GinBtreeStack *stack,
224
224
ptr -> blkno = blkno ;
225
225
ptr -> buffer = buffer ;
226
226
ptr -> parent = root ;/* it's may be wrong, but in next call we will correct */
227
+ ptr -> off = offset ;
227
228
stack -> parent = ptr ;
228
229
return ;
229
230
}