From ba5f900b3d22ca0dfab923abaab4b331595c96b3 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Tue, 30 Aug 2005 08:48:16 +0000 Subject: Fix missing rows in query update a=.. where a... with GiST index on column 'a' Backpatch from 8.0 branch --- src/backend/access/gist/gist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/backend/access/gist/gist.c') diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index c238ea273e5..950d75abd5d 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.96 2002/09/04 20:31:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.96.2.1 2005/08/30 08:48:16 teodor Exp $ * *------------------------------------------------------------------------- */ @@ -502,7 +502,7 @@ gistlayerinsert(Relation r, BlockNumber blkno, * changed beginning from 'child' offset */ if (ret & SPLITED) - gistadjscans(r, GISTOP_SPLIT, blkno, child); + gistadjscans(r, GISTOP_SPLIT, nblkno, FirstOffsetNumber); } ret = INSERTED; @@ -1437,6 +1437,9 @@ gistnewroot(Relation r, IndexTuple *itup, int len) Page p; b = ReadBuffer(r, GISTP_ROOT); + + gistadjscans(r, GISTOP_SPLIT, GISTP_ROOT, FirstOffsetNumber); + GISTInitBuffer(b, 0); p = BufferGetPage(b); -- cgit v1.2.3