OSDN Git Service

Still more paranoia in PageAddItem: disallow specification of an item
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Aug 2002 19:41:23 +0000 (19:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Aug 2002 19:41:23 +0000 (19:41 +0000)
commitba053de197eaec975e611b2969526363915e58c2
treec86a09d2913e2fd862b1ea8f646a3afc908e20ac
parent4038e8610c0fc8473ba40f186f4230024e4eadcc
Still more paranoia in PageAddItem: disallow specification of an item
offset past the last-used-item-plus-one, since that would result in
leaving uninitialized holes in the item pointer array.  AFAICT the only
place that was depending on this was btree index build, which was being
cavalier about when to fill in the P_HIKEY pointer; easily fixed.
Also a small performance improvement: shuffle itemid's by means of
memmove, not a one-at-a-time loop.
src/backend/access/nbtree/nbtsort.c
src/backend/storage/page/bufpage.c