37 #if defined(LIBC_SCCS) && !defined(lint) 38 static char sccsid[] =
"@(#)bt_delete.c 8.13 (Berkeley) 7/28/94";
41 #include <sys/types.h> 47 #include "../include/db.h" 184 for (level = 0; (parent =
BT_POP(t)) !=
NULL; ++level) {
191 idx = parent->
index + 1;
239 for (level = 0; (parent =
BT_POP(t)) !=
NULL; ++level) {
245 if (parent->
index != 0) {
246 idx = parent->
index - 1;
297 int deleted, exact, redo;
337 while (e->
index-- > 0) {
385 indx_t cnt, idx, *ip, offset;
434 from = (
char *)pg + pg->
upper;
435 memmove(from + nksize, from, (
char *)bi - from);
439 offset = pg->
linp[idx];
440 for (cnt = idx, ip = &pg->
linp[0]; cnt--; ++ip)
443 for (cnt =
NEXTINDEX(pg) - idx; --cnt; ++ip)
444 ip[0] = ip[1] < offset ? ip[1] + nksize : ip[1];
503 from = (
char *)h + h->
upper;
504 memmove(from + nbytes, from, (
char *)to - from);
508 offset = h->
linp[idx];
509 for (cnt = idx, ip = &h->
linp[0]; cnt--; ++ip)
512 for (cnt =
NEXTINDEX(h) - idx; --cnt; ++ip)
513 ip[0] = ip[1] < offset ? ip[1] + nbytes : ip[1];
621 if (curcopy || (status =
#define GETBLEAF(pg, indx)
int mpool_put(MPOOL *mp, void *page, u_int flags)
#define GETBINTERNAL(pg, indx)
int __bt_ret(BTREE *t, EPG *e, DBT *key, DBT *rkey, DBT *data, DBT *rdata, int copy)
int __bt_dleaf(BTREE *t, const DBT *key, PAGE *h, u_int idx)
void * mpool_get(MPOOL *mp, pgno_t pgno, u_int flags)
int __bt_free(BTREE *t, PAGE *h)
int __bt_cmp(BTREE *t, const DBT *k1, EPG *e)
static int __bt_pdelete(BTREE *t, PAGE *h)
static int __bt_curdel(BTREE *t, const DBT *key, PAGE *h, u_int idx)
int __bt_delete(DB *dbp, const DBT *key, u_int flags) const
EPG * __bt_search(BTREE *t, const DBT *key, int *exactp)
static int __bt_relink(BTREE *t, PAGE *h)
static int __bt_stkacq(BTREE *t, PAGE **hp, CURSOR *c)
static int __bt_bdelete(BTREE *t, const DBT *key)
static struct hostent * hp
static int __bt_bdelete __P((BTREE *, const DBT *))
int __ovfl_delete(BTREE *t, void *p)