37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] =
"@(#)bt_delete.c 8.13 (Berkeley) 7/28/94";
47#include "../include/db.h"
169 if (h->
pgno ==
c->pg.pgno)
178 while (h->
pgno !=
c->pg.pgno) {
184 for (level = 0; (parent =
BT_POP(t)) !=
NULL; ++level) {
191 idx = parent->
index + 1;
218 if (h->
pgno ==
c->pg.pgno)
233 while (h->
pgno !=
c->pg.pgno) {
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];
static int __bt_stkacq(BTREE *t, PAGE **hp, CURSOR *c)
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
static int __bt_bdelete(BTREE *t, const DBT *key)
static int __bt_bdelete __P((BTREE *, const DBT *))
int __bt_dleaf(BTREE *t, const DBT *key, PAGE *h, u_int idx)
static int __bt_relink(BTREE *t, PAGE *h)
static int __bt_pdelete(BTREE *t, PAGE *h)
int __ovfl_delete(BTREE *t, void *p)
int __bt_free(BTREE *t, PAGE *h)
EPG * __bt_search(BTREE *t, const DBT *key, int *exactp)
int __bt_ret(BTREE *t, EPG *e, DBT *key, DBT *rkey, DBT *data, DBT *rdata, int copy)
int __bt_cmp(BTREE *t, const DBT *k1, EPG *e)
#define GETBLEAF(pg, indx)
#define GETBINTERNAL(pg, indx)
void * mpool_get(MPOOL *mp, pgno_t pgno, u_int flags)
int mpool_put(MPOOL *mp, void *page, u_int flags)