Asterisk - The Open Source Telephony Project
18.5.0
|
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/db.h"
#include "btree.h"
Go to the source code of this file.
Functions | |
int | __bt_split (BTREE *t, PAGE *sp, const DBT *key, const DBT *data, int flags, size_t ilen, u_int32_t argskip) |
static int bt_broot | __P ((BTREE *, PAGE *, PAGE *, PAGE *)) |
static PAGE *bt_page | __P ((BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t)) |
static int bt_preserve | __P ((BTREE *, pgno_t)) |
static PAGE *bt_psplit | __P ((BTREE *, PAGE *, PAGE *, PAGE *, indx_t *, size_t)) |
static recno_t rec_total | __P ((PAGE *)) |
static int | bt_broot (BTREE *t, PAGE *h, PAGE *l, PAGE *r) |
static PAGE * | bt_page (BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, indx_t *skip, size_t ilen) |
static int | bt_preserve (BTREE *t, pgno_t pg) |
static PAGE * | bt_psplit (BTREE *t, PAGE *h, PAGE *l, PAGE *r, indx_t *pskip, size_t ilen) |
static PAGE * | bt_root (BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, indx_t *skip, size_t ilen) |
static int | bt_rroot (BTREE *t, PAGE *h, PAGE *l, PAGE *r) |
static recno_t | rec_total (PAGE *h) |
int __bt_split | ( | BTREE * | t, |
PAGE * | sp, | ||
const DBT * | key, | ||
const DBT * | data, | ||
int | flags, | ||
size_t | ilen, | ||
u_int32_t | argskip | ||
) |
Definition at line 82 of file bt_split.c.
References __dbpanic(), a, b, bt_broot(), _btree::bt_dbp, _btree::bt_mp, bt_page(), BT_POP, bt_preserve(), bt_root(), bt_rroot(), _bleaf::bytes, DBT::data, F_ISSET, _page::flags, _bleaf::flags, GETBINTERNAL, GETBLEAF, if(), _epgno::index, _binternal::ksize, _bleaf::ksize, _page::linp, _page::lower, MPOOL_DIRTY, mpool_get(), mpool_put(), NBINTERNAL, NEXTINDEX, NRINTERNAL, NULL, P_BIGKEY, P_BINTERNAL, P_BLEAF, P_INVALID, P_RINTERNAL, P_RLEAF, P_ROOT, P_TYPE, _page::pgno, _epgno::pgno, _page::prevpg, R_RECNO, rec_total(), RET_ERROR, RET_SUCCESS, DBT::size, _page::upper, WR_BINTERNAL, WR_BLEAF, and WR_RLEAF.
Referenced by __bt_put(), and __rec_iput().
|
static |
Definition at line 537 of file bt_split.c.
References _btree::bt_mp, bt_preserve(), _btree::bt_psize, BTDATAOFF, _bleaf::bytes, _page::flags, _bleaf::flags, GETBINTERNAL, GETBLEAF, _binternal::ksize, _bleaf::ksize, _page::linp, _page::lower, MPOOL_DIRTY, mpool_put(), NBINTERNAL, P_BIGKEY, P_BINTERNAL, P_BLEAF, P_TYPE, _page::pgno, RET_ERROR, RET_SUCCESS, _page::upper, and WR_BINTERNAL.
Referenced by __bt_split().
|
static |
Definition at line 345 of file bt_split.c.
References __bt_new(), _btree::bt_mp, _btree::bt_psize, bt_psplit(), BTDATAOFF, _page::flags, free(), _page::lower, malloc(), MPOOL_DIRTY, mpool_get(), mpool_put(), NEXTINDEX, _page::nextpg, NULL, P_INVALID, P_TYPE, _page::pgno, _page::prevpg, and _page::upper.
Referenced by __bt_split().
Definition at line 792 of file bt_split.c.
References _btree::bt_mp, _page::flags, MPOOL_DIRTY, mpool_get(), mpool_put(), NULL, P_PRESERVE, RET_ERROR, and RET_SUCCESS.
Referenced by __bt_split(), and bt_broot().
|
static |
Definition at line 614 of file bt_split.c.
References _btree::bt_cursor, _btree::bt_psize, BTDATAOFF, c, CURS_INIT, F_ISSET, _page::flags, _binternal::flags, _bleaf::flags, GETBINTERNAL, GETBLEAF, GETRINTERNAL, GETRLEAF, _epgno::index, _binternal::ksize, _page::linp, _page::lower, NBINTERNAL, NBLEAF, NEXTINDEX, NRINTERNAL, NRLEAF, P_BIGKEY, P_BINTERNAL, P_BLEAF, P_RINTERNAL, P_RLEAF, P_TYPE, _cursor::pg, _page::pgno, _epgno::pgno, and _page::upper.
Referenced by bt_page(), and bt_root().
|
static |
Definition at line 450 of file bt_split.c.
References __bt_new(), _btree::bt_psize, bt_psplit(), BTDATAOFF, _page::flags, _page::lower, _page::nextpg, NULL, P_INVALID, P_TYPE, _page::pgno, _page::prevpg, and _page::upper.
Referenced by __bt_split().
Definition at line 497 of file bt_split.c.
References _btree::bt_mp, _btree::bt_psize, BTDATAOFF, _page::flags, _page::linp, _page::lower, MPOOL_DIRTY, mpool_put(), NEXTINDEX, NRINTERNAL, P_RINTERNAL, P_RLEAF, P_TYPE, _page::pgno, rec_total(), RET_SUCCESS, _page::upper, and WR_RINTERNAL.
Referenced by __bt_split().
Definition at line 820 of file bt_split.c.
References GETRINTERNAL, and NEXTINDEX.
Referenced by __bt_split(), and bt_rroot().