]> git.saurik.com Git - apple/libc.git/blob - db/btree/FreeBSD/bt_seq.c.patch
Libc-583.tar.gz
[apple/libc.git] / db / btree / FreeBSD / bt_seq.c.patch
1 --- bt_seq.c.orig 2008-10-09 11:40:48.000000000 -0700
2 +++ bt_seq.c 2008-10-09 11:43:28.000000000 -0700
3 @@ -387,18 +387,19 @@ __bt_first(t, key, erval, exactp)
4 * occurs.
5 */
6 if (ep->index == 0) {
7 + PAGE *hprev;
8 if (h->prevpg == P_INVALID)
9 break;
10 if (h->pgno != save.page->pgno)
11 mpool_put(t->bt_mp, h, 0);
12 - if ((h = mpool_get(t->bt_mp,
13 + if ((hprev = mpool_get(t->bt_mp,
14 h->prevpg, 0)) == NULL) {
15 if (h->pgno == save.page->pgno)
16 mpool_put(t->bt_mp,
17 save.page, 0);
18 return (RET_ERROR);
19 }
20 - ep->page = h;
21 + ep->page = h = hprev;
22 ep->index = NEXTINDEX(h);
23 }
24 --ep->index;