1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Add more sanity-checking to PageAddItem and PageIndexTupleDelete,

to prevent spreading of corruption when page header pointers are bad.
Merge PageZero into PageInit, since it was never used separately, and
remove separate memset calls used at most other PageInit call points.
Remove IndexPageCleanup, which wasn't used at all.
This commit is contained in:
Tom Lane
2002-01-15 22:14:17 +00:00
parent 685a66cdfe
commit aa00e6134e
7 changed files with 94 additions and 144 deletions

View File

@ -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.86 2001/11/05 17:46:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.87 2002/01/15 22:14:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1437,7 +1437,7 @@ GISTInitBuffer(Buffer b, uint32 f)
pageSize = BufferGetPageSize(b);
page = BufferGetPage(b);
MemSet(page, 0, (int) pageSize);
PageInit(page, pageSize, sizeof(GISTPageOpaqueData));
opaque = (GISTPageOpaque) PageGetSpecialPointer(page);