Lines Matching full:key
89 putpair(char *p, const DBT *key, const DBT *val) in putpair() argument
95 /* Enter the key first. */ in putpair()
98 off = OFFSET(bp) - key->size; in putpair()
99 memmove(p + off, key->data, key->size); in putpair()
178 DBT key, val; in __split_page() local
209 key.data = (u_char *)op + ino[n]; in __split_page()
210 key.size = off - ino[n]; in __split_page()
212 if (__call_hash(hashp, key.data, key.size) == obucket) { in __split_page()
228 putpair(np, &key, &val); in __split_page()
252 * Called when we encounter an overflow or big key/data page during split
254 * the key/data pairs fit on their respective pages and because we may need
257 * The first page might be a page with regular key/data pairs in which case
259 * page or it might be a big key/data pair in which case we need to fix the
260 * big key/data pair.
271 int copyto, /* First byte on page which contains key/data values. */ in ugly_split()
280 DBT key, val; in ugly_split() local
340 key.data = (u_char *)cino + ino[n]; in ugly_split()
341 key.size = off - ino[n]; in ugly_split()
346 if (__call_hash(hashp, key.data, key.size) == obucket) { in ugly_split()
348 if (PAIRFITS(op, (&key), (&val))) in ugly_split()
349 putpair((char *)op, &key, &val); in ugly_split()
356 putpair((char *)op, &key, &val); in ugly_split()
361 if (PAIRFITS(np, (&key), (&val))) in ugly_split()
362 putpair((char *)np, &key, &val); in ugly_split()
369 putpair((char *)np, &key, &val); in ugly_split()
390 const DBT *key, in __addel() argument
401 /* This is the last page of a big key/data pair in __addel()
410 /* Try to squeeze key on this page */ in __addel()
411 if (FREESPACE(bp) > PAIRSIZE(key, val)) { in __addel()
412 squeeze_key(bp, key, val); in __addel()
421 if (PAIRFITS(bp, key, val)) in __addel()
422 putpair(bufp->page, key, val); in __addel()
430 if (PAIRFITS(sop, key, val)) in __addel()
431 putpair((char *)sop, key, val); in __addel()
433 if (__big_insert(hashp, bufp, key, val)) in __addel()
862 * We have to know that the key will fit, but the last entry on the page is
867 const DBT *key, in squeeze_key() argument
879 off -= key->size; in squeeze_key()
881 memmove(p + off, key->data, key->size); in squeeze_key()
888 FREESPACE(sp) = free_space - PAIRSIZE(key, val); in squeeze_key()