Lines Matching refs:t

73 	BTREE *t;  local
83 t = dbp->internal;
86 if (t->bt_pinned != NULL) {
87 mpool_put(t->bt_mp, t->bt_pinned, 0);
88 t->bt_pinned = NULL;
92 if (F_ISSET(t, B_RDONLY)) {
106 if (F_ISSET(&t->bt_cursor, CURS_INIT) &&
107 !F_ISSET(&t->bt_cursor,
125 if (key->size + data->size > t->bt_ovflsize) {
126 if (key->size > t->bt_ovflsize) {
128 storekey: if (__ovfl_put(t, key, &pg) == RET_ERROR)
141 if (key->size + data->size > t->bt_ovflsize) {
143 if (__ovfl_put(t, data, &pg) == RET_ERROR)
155 if (key->size + data->size > t->bt_ovflsize)
161 if ((h = mpool_get(t->bt_mp, t->bt_cursor.pg.pgno, 0)) == NULL)
163 idx = t->bt_cursor.pg.index;
171 if (t->bt_order == NOT || (e = bt_fast(t, key, data, &exact)) == NULL)
172 if ((e = __bt_search(t, key, &exact)) == NULL)
187 mpool_put(t->bt_mp, h, 0);
190 if (!exact || !F_ISSET(t, B_NODUPS))
197 delete: if (__bt_dleaf(t, key, h, idx) == RET_ERROR) {
198 mpool_put(t->bt_mp, h, 0);
212 if ((status = __bt_split(t, h, key,
228 if (F_ISSET(&t->bt_cursor, CURS_INIT) &&
229 !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) &&
230 t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= idx)
231 ++t->bt_cursor.pg.index;
233 if (t->bt_order == NOT) {
236 t->bt_order = FORWARD;
237 t->bt_last.index = idx;
238 t->bt_last.pgno = h->pgno;
242 t->bt_order = BACK;
243 t->bt_last.index = 0;
244 t->bt_last.pgno = h->pgno;
249 mpool_put(t->bt_mp, h, MPOOL_DIRTY);
253 __bt_setcur(t, e->page->pgno, e->index);
255 F_SET(t, B_MODIFIED);
274 bt_fast(t, key, data, exactp) in bt_fast() argument
275 BTREE *t; in bt_fast()
283 if ((h = mpool_get(t->bt_mp, t->bt_last.pgno, 0)) == NULL) {
284 t->bt_order = NOT;
287 t->bt_cur.page = h;
288 t->bt_cur.index = t->bt_last.index;
298 if (t->bt_order == FORWARD) {
299 if (t->bt_cur.page->nextpg != P_INVALID)
301 if (t->bt_cur.index != NEXTINDEX(h) - 1)
303 if ((cmp = __bt_cmp(t, key, &t->bt_cur)) < 0)
305 t->bt_last.index = cmp ? ++t->bt_cur.index : t->bt_cur.index;
307 if (t->bt_cur.page->prevpg != P_INVALID)
309 if (t->bt_cur.index != 0)
311 if ((cmp = __bt_cmp(t, key, &t->bt_cur)) > 0)
313 t->bt_last.index = 0;
319 return (&t->bt_cur);
325 t->bt_order = NOT;
326 mpool_put(t->bt_mp, h, 0);