1 Index: db/hash/hash_dup.c
2 ===================================================================
3 RCS file: /cvs/devel/rpm/db/hash/hash_dup.c,v
4 retrieving revision 1.1.1.2.2.3
5 retrieving revision 1.1.1.2.2.4
6 diff -u -1 -0 -r1.1.1.2.2.3 -r1.1.1.2.2.4
7 --- db/hash/hash_dup.c 2002/01/08 04:07:30 1.1.1.2.2.3
8 +++ db/hash/hash_dup.c 2002/02/13 23:22:52 1.1.1.2.2.4
10 PGNO(next_pagep), NUM_ENT(next_pagep) - 2)) != 0)
13 /* Now delete the pair from the current page. */
14 ret = __ham_del_pair(dbc, 0);
17 * __ham_del_pair decremented nelem. This is incorrect; we
18 * manually copied the element elsewhere, so the total number
19 * of elements hasn't changed. Increment it again.
22 + * Note that we still have the metadata page pinned, and
23 + * __ham_del_pair dirtied it, so we don't need to set the dirty
26 if (!STD_LOCKING(dbc))
30 (void)mpf->put(mpf, hcp->page, DB_MPOOL_DIRTY);
31 hcp->page = next_pagep;
32 hcp->pgno = PGNO(hcp->page);
33 hcp->indx = NUM_ENT(hcp->page) - 2;
35 Index: db/hash/hash_page.c
36 ===================================================================
37 RCS file: /cvs/devel/rpm/db/hash/hash_page.c,v
38 retrieving revision 1.1.1.2.2.3
39 retrieving revision 1.1.1.2.2.4
40 diff -u -1 -0 -r1.1.1.2.2.3 -r1.1.1.2.2.4
41 --- db/hash/hash_page.c 2002/01/08 04:07:30 1.1.1.2.2.3
42 +++ db/hash/hash_page.c 2002/02/13 23:22:52 1.1.1.2.2.4
44 if ((ret = __ham_c_update(dbc, 0, 0, 0)) != 0)
48 * If we are locking, we will not maintain this, because it is
52 * Perhaps we can retain incremental numbers and apply them later.
54 - if (!STD_LOCKING(dbc))
55 + if (!STD_LOCKING(dbc)) {
57 + if ((ret = __ham_dirty_meta(dbc)) != 0)
62 * If we need to reclaim the page, then check if the page is empty.
63 * There are two cases. If it's empty and it's not the first page
64 * in the bucket (i.e., the bucket page) then we can simply remove
65 * it. If it is the first chain in the bucket, then we need to copy
66 * the second page into it and remove the second page.
67 * If its the only page in the bucket we leave it alone.
70 @@ -1407,22 +1410,25 @@
71 * next time we come in here. For other operations, this shouldn't
72 * matter, since odds are this is the last thing that happens before
73 * we return to the user program.
75 hcp->pgno = PGNO(hcp->page);
79 * Maybe keep incremental numbers here.
81 - if (!STD_LOCKING(dbc))
82 + if (!STD_LOCKING(dbc)) {
84 + if ((ret = __ham_dirty_meta(dbc)) != 0)
88 if (do_expand || (hcp->hdr->ffactor != 0 &&
89 (u_int32_t)H_NUMPAIRS(hcp->page) > hcp->hdr->ffactor))
95 * Special __putitem call used in splitting -- copies one entry to
96 * another. Works for all types of hash entries (H_OFFPAGE, H_KEYDATA,