diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2004-09-13 22:07:24 +0000 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2004-09-13 22:07:24 +0000 |
commit | 83c4913be174845c080c5ebb0ccf40b7f29b6773 (patch) | |
tree | 186a96edc967a1f7d4348246071d338c83f62c37 | |
parent | 24d594eda771f1858e326345856afecfe73af001 (diff) | |
download | FreeBSD-src-83c4913be174845c080c5ebb0ccf40b7f29b6773.zip FreeBSD-src-83c4913be174845c080c5ebb0ccf40b7f29b6773.tar.gz |
Fix a condition where the hole would be inserted in the wrong
place during a split.
Obtained from: NetBSD
-rw-r--r-- | lib/libc/db/btree/bt_split.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index 0e478de..1dd4666 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -361,8 +361,6 @@ bt_page(t, h, lp, rp, skip, ilen) r->nextpg = h->nextpg; r->prevpg = h->pgno; r->flags = h->flags & P_TYPE; - /* XXX: Workaround for broken page data access. */ - r->linp[0] = 0xffff; /* * If we're splitting the last page on a level because we're appending @@ -728,7 +726,7 @@ bt_psplit(t, h, l, r, pskip, ilen) * the right page. */ if (skip <= off) { - skip = 0; + skip = MAX_PAGE_OFFSET; rval = l; } else { rval = r; @@ -738,7 +736,7 @@ bt_psplit(t, h, l, r, pskip, ilen) for (off = 0; nxt < top; ++off) { if (skip == nxt) { ++off; - skip = 0; + skip = MAX_PAGE_OFFSET; } switch (h->flags & P_TYPE) { case P_BINTERNAL: |