Lines Matching defs:root

14669 ** The root-page of the schema table.
15658 Pgno iTable, /* Index of root page */
16112 #define OP_ReopenIdx 101 /* synopsis: root=P2 iDb=P3 */
16123 #define OP_OpenRead 112 /* synopsis: root=P2 iDb=P3 */
16124 #define OP_OpenWrite 113 /* synopsis: root=P2 iDb=P3 */
16158 #define OP_CreateBtree 147 /* synopsis: r[P2]=root iDb=P1 flags=P3 */
16180 #define OP_TableLock 169 /* synopsis: iDb=P1 root=P2 write=P3 */
18097 Pgno tnum; /* DB Page containing root of this index */
19142 int regRoot; /* Register holding root page number for new objects */
35703 /* 101 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
35714 /* 112 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
35715 /* 113 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
35749 /* 147 */ "CreateBtree" OpHelp("r[P2]=root iDb=P1 flags=P3"),
35771 /* 169 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
37370 ** log if they come from non-root processes. So avoid calling fchown() if
37371 ** we are not running as root.
41561 /* If this process is running as root, make sure that the SHM file
43147 ** process lacks root privileges, be we should at least try. Without
43148 ** this step, if a root process opens a database file, it can leave
43149 ** behinds a journal/WAL that is owned by root and hence make the
55155 ** Return a pointer to the root of the constructed binary tree.
55195 struct RowSetEntry *p; /* Current tree root */
67602 ** BTrees. Each BTree is identified by the index of its root page. The
67641 ** 52 4 Largest root-page (auto/incr_vacuum)
67875 ** is opened on the table with root page BtShared.iTable. Locks are removed
68058 ** root-node and 3 for all other internal nodes.
68109 Pgno pgnoRoot; /* The root page of this tree */
68204 ** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not
68218 ** PTRMAP_BTREE: The database page is a non-root btree page. The page number
68779 ** table with root page iRoot. Return 1 if it does and 0 if not.
68781 ** For example, when writing to a table with root-page iRoot via
68787 ** caller should have first obtained a lock specifying the root page of
68794 ** hold a write-lock on the schema table (root page 1). This is also
68800 int isIndex, /* True if iRoot is the root of an index b-tree */
68826 /* Figure out the root-page that the lock should be held on. For table
68827 ** b-trees, this is just the root page of the b-tree being read or
68828 ** written. For index b-trees, it is the root page of the associated
68837 /* Two or more indexes share the same root page. There must
68850 /* Search for the required lock. Either a write-lock on root-page iTab, a
68902 ** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
68962 ** Add a lock on the table with root-page iTable to the shared-btree used
69155 ** cursors open on any row within the table with root-page pgnoRoot.
69357 ** the table with root-page iRoot. "Saving the cursor position" means that
69368 ** If pExpect!=NULL and if no other cursors are found on the same root-page,
70760 ** possible for a root page of a table that contains no rows) then the
70930 ** compatible with the root page. */
72932 ** rolled back modified the database schema. In this case b-tree root
73120 ** Create a new cursor for the BTree whose root is on the page
73155 ** root page of a b-tree. If it is not, then the cursor acquired
73962 ** Move the cursor to point to the root page of its b-tree structure.
73964 ** If the table has a virtual root page, then the cursor is moved to point
73965 ** to the virtual root page instead of the actual root page. A table has a
73966 ** virtual root page when the actual root page contains no cells and a
73971 ** the cursor is set to point to the first cell located on the root
73972 ** (or virtual root) page and the cursor state is set to CURSOR_VALID.
73975 ** page-header flags indicate that the [virtual] root-page is the expected
74032 ** if the root page was already loaded when this function was called (i.e.
74274 /* pPage->nCell must be greater than zero. If this is the root-page
74276 ** not run. If this is not the root-page, then the moveToChild() routine
74468 ** without needing to go back to root.
74518 /* pPage->nCell must be greater than zero. If this is the root-page
74520 ** not run. If this is not the root-page, then the moveToChild() routine
76466 ** is a root page or a child of a root page) then all available siblings
76503 int isRoot, /* True if pParent is a root-page */
76901 ** (2) pPage is a virtual root page. A virtual root page is when
76902 ** the real root page is page 1 and we are the only child of
77200 /* The root page of the b-tree now contains no cells. The only sibling
77273 ** This function is called when the root page of a b-tree structure is
77276 ** A new child page is allocated and the contents of the current root
77277 ** page, including overflow cells, are copied into the child. The root
77283 ** entry corresponding to the new right-child pointer of the root
77300 /* Make pRoot, the root page of the b-tree, writable. Allocate a new
77321 TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
77393 /* The root page of the b-tree is overfull. In this case call the
77394 ** balance_deeper() function to create a new child for the root-page
77395 ** and copy the current contents of the root-page to it. The
77413 /* The page being written is not a root page, and there is currently
77663 ** than one table or index with the same root page as used by the cursor.
77880 ** back to the root page as balance() used to invalidate the contents
78257 ** number for the root page of the new table.
78271 int ptfFlags; /* Page-type flage for the root page of new table */
78284 Pgno pgnoMove; /* Move a page here to make room for the root-page */
78288 ** to make room for the new tables root page. In case this page turns
78295 ** root page of the new table should go. meta[3] is the largest root-page
78296 ** created so far, so the new root-page is (meta[3]+1).
78304 /* The new root-page may not be allocated on a pointer-map page, or the
78323 /* pgnoRoot is the page that will be used for the root-page of
78376 /* Update the pointer-map and meta-data with the new root-page number. */
78383 /* When the new root page was allocated, page 1 was made writable in
78480 ** the page number of the root of the table. After this routine returns,
78481 ** the root page is empty, but still exists.
78485 ** root of the table.
78500 ** is the root of a table b-tree - if it is not, the following call is
78521 ** Erase all information in a table and add the root of the table to
78522 ** the freelist. Except, the root of the principle table (the one on
78529 ** root page in the database file, then the last root page
78531 ** iTable and that last slot formerly occupied by the last root page
78533 ** root pages are kept at the beginning of the database file, which
78535 ** page number that used to be the last root page in the file before
78537 ** The last root page is recorded in meta[3] and the value of
78571 /* If the table being dropped is the table with the largest root-page
78572 ** number in the database, put the root page on the free list.
78580 /* The table being dropped does not have the largest root-page
78582 ** gap left by the deleted root-page.
78605 /* Set the new 'max-root-page' value in the database header. This
78607 ** be a root-page number, less one again if that is the
78965 ** root element. The daughter nodes of aHeap[N] are aHeap[N*2]
78970 ** root node aHeap[1] is always the minimum value currently in the heap.
78974 ** removes the root element from the heap (the minimum value in the heap)
79015 ** the tree depth. Root pages return 0. Parents of root pages
79286 ** an array of pages numbers were each page number is the root page of
79298 ** root pages is incomplete. This is a "partial integrity-check". This
79309 Pgno *aRoot, /* An array of root pages numbers for individual trees */
79571 ** Obtain a lock on the table whose root page is iTab. The
94439 ** Synopsis: root=P2 iDb=P3
94441 ** Open a read-only cursor for the database table whose root page is
94467 ** Synopsis: root=P2 iDb=P3
94489 ** Synopsis: root=P2 iDb=P3
94491 ** Open a read/write cursor named P1 on the table or index whose root
94492 ** page is P2 (or whose root page is held in register P2 if the
94514 ** as the root page, not the value of P2 itself.
94613 ** SQLite used to check if the root-page flags were sane at this point
94743 ** automatically created table with root-page 1 (an BLOB_INTKEY table).
95731 ** If P3>0 then P3 is a register in the root frame of this VDBE that holds
96993 ** Delete an entire database table or index whose root page in the database
97000 ** If AUTOVACUUM is enabled then it is possible that another root page
97001 ** might be moved into the newly deleted root page in order to keep all
97002 ** root pages contiguous at the beginning of the database. The former
97003 ** value of the root page that moved - its value before the move occurred -
97011 ** updating existing cursors when a root page is moved in an AUTOVACUUM
97053 ** Delete all contents of the database table or index whose root page
97114 ** Synopsis: r[P2]=root iDb=P1 flags=P3
97120 ** The root page number of the new b-tree is stored in register P2.
97304 ** The root page numbers of all tables in the database are integers
97313 int nRoot; /* Number of tables to check. (Number of root pages.) */
97670 ** P1 is a register in the root frame of this VM (the root frame is
98247 ** Synopsis: iDb=P1 root=P2 write=P3
98256 ** P2 contains the root-page of the table to lock.
102134 ** pRoot is the root of an incremental merge-tree with depth nDepth (according
102193 ** MergeEngine object at the root of the tree before returning. Or, if an
102321 ** root merge (INCRINIT_ROOT) will be using the same task
105617 ** The node at the root of the subtree is modified as follows:
105950 ** or likelihood() or likely() functions at the root of an
116575 ** This only applies to the root node of pExpr, so the statement:
117491 Pgno iTab; /* The root page of the table to be locked */
117499 ** The table to be locked has root page iTab and is found in database iDb.
118839 ** The root page number of the new table is left in reg pParse->regRoot.
118840 ** The rowid and root page number values are needed by the code that
119902 /* The root page of the PRIMARY KEY is the table root page */
120112 ** So do not write to the disk again. Extract the root page number
120116 ** If the root page number is 1, that means this is the sqlite_schema
120274 ** statement to populate the new table. The root-page number for the
120675 ** used by SQLite when the btree layer moves a table root page. The
120676 ** root-page of a table or index in database iDb has changed from iFrom
120716 ** Write code to erase the table with root-page iTable from database iDb.
120718 ** if a root-page of another table is moved by the btree-layer whilst
120729 ** is non-zero, then it is the root page number of a table moved to
120748 ** in case a root-page belonging to another table is moved by the btree layer
120754 ** table and index root-pages in order, starting with the numerically
120755 ** largest root-page number. This guarantees that none of the root-pages
120763 ** and root page 5 happened to be the largest root-page number in the
120764 ** database, then root page 5 would be moved to page 4 by the
121202 ** root page number of the index. If memRootPage is negative, then
121204 ** the root page number of the index is taken from pIndex->tnum.
135942 int *aRoot; /* Array of root page numbers of all btrees */
135953 ** Begin by finding the root pages numbers
137201 ** of pIndex has the same root page number, and if it does, return true.
137234 ** argv[3] = root page number for table or index. 0 for trigger or view.
137313 ** to do here is record the root page number for that index.
177801 ** or off. "tnum" is the root page of the b-tree to which the imposter
178908 ** merging and deleting segments, and also the root node of the
178911 ** The root node is the top node of the segment's tree after encoding
178915 ** and a new root interior node is generated (which should always fit
178917 ** height and the blockid of the previous root).
178926 ** root - contents of root node
178928 ** If the root node is a leaf node, then start_block,
180369 "root BLOB,"
181551 ** root node, then the buffer comes from a SELECT statement. SQLite does
182652 ** root node, the range of leaves scanned can be reduced. Do this. */
183165 ** entry and each block (if any) between the leaf and the root node. So
184502 ** separately. The root of a tokens AND/NEAR cluster is stored in
184527 Fts3Expr ***ppOr, /* Write new OR root to *(*ppOr)++ */
184630 ** the cluster with root node pRoot. See comments above the definition
184639 Fts3Expr *pRoot, /* Consider tokens with this root node */
185055 ** If *pRc is not SQLITE_OK, or if pExpr is not the root node of a NEAR
185072 /* The following block runs if pExpr is the root of a NEAR query.
185080 ** +--NEAR--+ <-- root of NEAR query
185153 Fts3Expr *pExpr, /* Expr to test. May or may not be root. */
185436 /* Find the root of the NEAR expression */
185607 Fts3Expr *p; /* Used to iterate from pExpr to root */
186898 ** of the tree changing, in which case *ppHead is set to the new root node.
186901 Fts3Expr **ppHead, /* Pointer to the root node of a tree */
187099 ** new root expression node.
187108 Fts3Expr *pRoot = *pp; /* Initial root node */
190027 u8 rootOnly; /* True for a root-only reader */
190105 SegmentNode *pParent; /* Parent node (or NULL for root node) */
190195 /* 12 */ "SELECT idx, start_block, leaves_end_block, end_block, root "
190197 /* 13 */ "SELECT idx, start_block, leaves_end_block, end_block, root "
190247 /* 32 */ "SELECT idx, start_block, leaves_end_block, end_block, root "
190251 ** Update the start_block (:1) and root (:2) fields of the %_segdir
190253 /* 33 */ "UPDATE %Q.'%q_segdir' SET start_block = ?, root = ?"
190482 ** 4: root
191507 const char *zRoot, /* Buffer containing root node */
191508 int nRoot, /* Size of buffer containing root node */
191512 int nExtra = 0; /* Bytes to allocate segment root node */
191536 /* The entire segment is stored in the root node. */
191861 char *zRoot, /* Blob value for "root" field */
192044 ** Except, if pTree is a root node, do not write it to the database. Instead,
192045 ** set output variables *paRoot and *pnRoot to contain the root node.
192059 char **paRoot, /* OUT: Data for root node */
192060 int *pnRoot /* OUT: Size of root node in bytes */
192282 char *zRoot = NULL; /* Pointer to buffer containing root node */
192296 /* The entire tree fits on the root node. Write it to the segdir table. */
193554 sqlite3_column_blob(pStmt, 4), /* segdir.root */
193555 sqlite3_column_bytes(pStmt, 4), /* segdir.root */
193988 int i; /* Used to iterate through non-root layers */
193989 int iRoot; /* Index of root in pWriter->aNodeWriter */
193990 NodeWriter *pRoot; /* NodeWriter for root node */
193994 ** root node. If the segment fits entirely on a single leaf node, iRoot
193995 ** will be set to 0. If the root node is the parent of the leaves, iRoot
194010 ** the node would be stored as a blob in the "root" column of the %_segdir
194015 ** segments that fit entirely on the root node with start_block!=0.
194017 ** Instead, create a synthetic root node that contains nothing but a
194019 ** single leaf and a single interior (root) node.
194056 pRoot->block.a, pRoot->block.n /* root */
194150 const char *aRoot = 0; /* Pointer to %_segdir.root buffer */
194560 Blob root = {0,0,0}; /* New root page image */
194576 rc = fts3TruncateNode(aRoot, nRoot, &root, zTerm, nTerm, &iBlock);
194614 sqlite3_bind_blob(pChomp, 2, root.a, root.n, SQLITE_STATIC);
194623 sqlite3_free(root.a);
200412 "json HIDDEN,root HIDDEN)");
200658 /* For json_each() path and root are the same so fall through
200659 ** into the root case */
200976 ** table. For each node that is not the root node of the r-tree, there is
200983 ** The root node of an r-tree always exists, even if the r-tree table is
200984 ** empty. The nodeno of the root node is always 1. All other nodes in the
200985 ** table must be the same size as the root node. The content of each node
200988 ** 1. If the node is the root node (node 1), then the first 2 bytes
200990 ** For non-root nodes, the first 2 bytes are left unused.
201208 ** Therefore all non-root nodes must contain at least 3 entries. Since
201235 int mxLevel; /* iLevel value for root of the tree */
201707 /* If the root node was just loaded, set pRtree->iDepth to the height
201709 ** the root node. A height of one means the children of the root node
201710 ** are the leaves, and so on. If the depth as specified on the root node
202324 ** in its parent. If pNode is the root node, return -1.
203663 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
203665 ** the pLeaf->pParent chain all the way up to the root node.
203798 /* If the node is not the tree root and now has less than the minimum
204005 /* Obtain a reference to the root node to initialize Rtree.iDepth */
204039 /* Check if the root node now has exactly one child. If so, remove
204044 ** the root node (the operation that Gutman's paper says to perform
204074 /* Release the reference to the root node. */
204609 ** the root node of the tree.
204858 ** The depth value is 0 for all nodes other than the root node, and the root
205297 ** b) unless the cell is on the root node, that the cell is bounded
209090 int iPkTnum; /* If eType==EXTERNAL, root of PK index */
209972 ** is set to the root page number of the primary key index before
213481 rbuPutU32(&aBuf[52], iRoot); /* largest root page number */
214225 ** root-node of the b-tree structure to each page. The value of the
214226 ** root-node path is '/'.
214228 ** The value of the path for the left-most child page of the root of
214231 ** The next to left-most child of the root page is
214239 ** the left-most cell of the 450th child of the root page are identified
214250 ** '/1c2/000/' // Left-most child of 451st child of root
214255 " path TEXT," /* 1 Path to page from root (NULL for agg) */
214304 sqlite3_stmt *pStmt; /* Iterates through set of root pages */
230191 ** 0x01: Clear if leaf is also the root page, otherwise set.
230204 ** 0x01: Clear for root page, otherwise set.
233899 ** hierarchy. If the node being flushed is currently the root node,
233901 pDlidx->buf.p[0] = 0x01; /* Not the root node */
233911 /* This was the root node. Push its first rowid up to the new root. */