Lines Matching refs:root
308 /* Create a root page if new tree. */
341 * NROOT -- Create the root of a new tree.
352 PAGE *meta, *root;
355 if ((root = mpool_get(t->bt_mp, 1, 0)) != NULL) {
356 if (root->lower == 0 &&
357 root->pgno == 0 &&
358 root->linp[0] == 0) {
359 mpool_delete(t->bt_mp, root);
362 mpool_put(t->bt_mp, root, 0);
373 if ((root = mpool_new(t->bt_mp, &npg, MPOOL_PAGE_NEXT)) == NULL)
378 root->pgno = npg;
379 root->prevpg = root->nextpg = P_INVALID;
380 root->lower = BTDATAOFF;
381 root->upper = t->bt_psize;
382 root->flags = P_BLEAF;
385 mpool_put(t->bt_mp, root, MPOOL_DIRTY);