Andreas Seltenreich schrob:
> Teodor Sigaev schrob:
>
>> Thanks a lot, applied. Can you describe test suite? It may be useful
>> for test more...
>
> Here's a shell script that triggers the bug when I revert the patch.
Just tried the script on HEAD, and it was triggering an assertion. I
guess it is because we are still returning InvalidOffsetNumber in the
trivial case (looks like a typo to me). I've attached a patch.
regards,
andreas
Index: ginbtree.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/access/gin/ginbtree.c,v
retrieving revision 1.2
diff -c -r1.2 ginbtree.c
*** ginbtree.c 26 May 2006 08:01:17 -0000 1.2
--- ginbtree.c 26 May 2006 20:09:45 -0000
***************
*** 189,195 **** Assert( !GinPageIsLeaf(page) ); /* check trivial case */
! if ( (root->off != btree->findChildPtr(btree, page, stack->blkno, InvalidOffsetNumber)) != InvalidBuffer ) {
stack->parent = root; return; }
--- 189,195 ---- Assert( !GinPageIsLeaf(page) ); /* check trivial case */
! if ( (root->off = btree->findChildPtr(btree, page, stack->blkno, InvalidOffsetNumber)) != InvalidOffsetNumber ) {
stack->parent = root; return; }