Lines Matching defs:level
949 ** file that were written at the application level might have changed
1300 ** final bottom-level VFS are written into memory obtained from
1310 ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level
1314 ** to a pointer to the top-level VFS.)^
2011 ** and low-level memory allocation routines.
2142 ** alternative low-level memory allocation routines to be used in place of
2240 ** The argument specifies alternative low-level mutex routines to be used
3499 ** top-level SQL code.
5354 ** top-level application code.
5721 ** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in
8177 ** An instance of this structure defines the low-level routines
10473 ** operation; or 1 for inserts, updates, or deletes invoked by top-level
10474 ** triggers; or 2 for changes resulting from triggers called by top-level
10510 ** CAPI3REF: Low-level system error code
13361 ** level of recursion for each term. A stack overflow can result
13605 ** level of threadsafety. 2 means the library is multithreaded - multiple
14227 ** the VDBE-level file format changes. The following macros define the
16956 u8 authLevel; /* Current authentication level */
18727 AggInfo *pAggInfo; /* Information about aggregates at this level */
19121 u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */
19483 sqlite3_mem_methods m; /* Low-level memory allocation interface */
19484 sqlite3_mutex_methods mutex; /* Low-level mutex interface */
19485 sqlite3_pcache_methods2 pcache2; /* Low-level page-cache interface */
19688 int iLevel; /* Which level of the tree we are on */
25445 ** Populate the low-level memory allocation function pointers in
25478 ** This file contains low-level memory allocation drivers for when
25482 ** This file contains implementations of the low-level memory allocation
25589 ** For this low-level routine, we are guaranteed that nByte>0 because
25590 ** cases of nByte<=0 will be intercepted and dealt with by higher level
25623 ** For this low-level routine, we already know that pPrior!=0 since
25625 ** by higher-level routines.
25659 ** For this low-level interface, we know that pPrior!=0. Cases where
25660 ** pPrior==0 while have been intercepted by higher-level routine and
25662 ** cases where nByte<=0 will have been intercepted by higher-level
25739 ** Populate the low-level memory allocation function pointers in
25772 ** This file contains low-level memory allocation drivers for when
25778 ** This file contains implementations of the low-level memory allocation
26098 ** higher level code is using pointer to the old allocation, it is
26120 ** Populate the low-level memory allocation function pointers in
26956 ** Populate the low-level memory allocation function pointers in
35962 /* Forward declarations for the low-level storage engine
36077 ** An internal level of indirection which enables us to replace the
36099 ** the compiler can hopefully optimize this level of indirection out.
38186 struct stat statbuf; /* Low-level file information */
38191 /* Get low-level information about the file that we can used to
38483 ** routine to lower a locking level.
38723 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
38726 ** If the locking level of the file descriptor is already at or below
38727 ** the requested locking level, this routine is a no-op.
38889 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
38892 ** If the locking level of the file descriptor is already at or below
38893 ** the requested locking level, this routine is a no-op.
39102 ** routine to lower a locking level.
39114 ** to do is adjust our internal record of the lock level.
39149 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
39152 ** If the locking level of the file descriptor is already at or below
39153 ** the requested locking level, this routine is a no-op.
39155 ** When the locking level reaches NO_LOCK, delete the lock file.
39324 ** routine to lower a locking level.
39333 ** Just adjust level and punt on outta here. */
39364 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
39367 ** If the locking level of the file descriptor is already at or below
39368 ** the requested locking level, this routine is a no-op.
39501 ** routine to lower a locking level.
39509 ** Just adjust level and punt on outta here. */
39530 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
39533 ** If the locking level of the file descriptor is already at or below
39534 ** the requested locking level, this routine is a no-op.
39746 ** routine to lower a locking level.
39924 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
39927 ** If the locking level of the file descriptor is already at or below
39928 ** the requested locking level, this routine is a no-op.
40075 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
40078 ** If the locking level of the file descriptor is already at or below
40079 ** the requested locking level, this routine is a no-op.
41918 /* Get the exclusive locks at the system level. Then if successful
42143 struct stat statbuf; /* Low-level file information */
43713 ** low-level error message when operating-system problems come up
44828 ** routine to lower a locking level.
44848 ** Lower the locking level on file descriptor pFile to eFileLock. eFileLock
44851 ** If the locking level of the file descriptor is already at or below
44852 ** the requested locking level, this routine is a no-op.
46718 ** Populate the low-level memory allocation function pointers in
48312 ** erases all locks at once and returns us immediately to locking level 0.
48313 ** It is not possible to lower the locking level one step at a time. You
48314 ** must go straight to locking level 0.
48485 ** Lower the locking level on file descriptor id to locktype. locktype
48488 ** If the locking level of the file descriptor is already at or below
48489 ** the requested locking level, this routine is a no-op.
48880 /* Release/Acquire the system-level lock */
49182 /* Unlock the system-level locks */
49209 /* Get shared locks at the system level, if necessary */
49233 /* Get the exclusive locks at the system level. Then if successful
51300 /* Access to a lower-level VFS that (might) implement dynamic loading,
55667 ** was) in exclusive-locking mode, a user-level read transaction is
55680 ** * The dbSize variable may be trusted (even if a user-level read
55854 ** at the system level, but it is never set to a more exclusive value.
56635 ** Unlock the database file to level eLock, which must be either NO_LOCK
56662 ** Lock the database file to level eLock, which must be either SHARED_LOCK,
59074 ** The "level" in pgFlags & PAGER_SYNCHRONOUS_MASK sets the robustness
59124 Pager *pPager, /* The pager to set safety level for */
59127 unsigned level = pgFlags & PAGER_SYNCHRONOUS_MASK;
59133 pPager->noSync = level==PAGER_SYNCHRONOUS_OFF ?1:0;
59134 pPager->fullSync = level>=PAGER_SYNCHRONOUS_FULL ?1:0;
59135 pPager->extraSync = level==PAGER_SYNCHRONOUS_EXTRA ?1:0;
61572 /* The journal file needs to be opened. Higher level routines have already
62560 ** can be rolled back at the ZipVFS level. */
68696 ** shared-cache table level locks. If the library is compiled with the
71575 Btree *p, /* The btree to set the safety level on */
71773 ** If the user has not set the safety-level for this database connection
71774 ** using "PRAGMA synchronous", and if the safety-level is not already
73068 /* At the pager level, a statement transaction is a savepoint with
79525 ** purposes (for example, to store a high-level schema associated with
83002 ** Pop the EXPLAIN QUERY PLAN stack one level.
88655 ** This is the top-level implementation of sqlite3_step(). Call
89906 ** on the stack (1 for a top-level trigger, 2 for a trigger fired by a
89907 ** top-level trigger etc.).
92896 ** Top-level programs determine first invocation by comparing the P1
97485 ** It is recursive invocation of triggers, at the SQL level, that is
99857 ** A PMA created at this point is known as a "level-0 PMA". Higher levels
99859 ** merging two or more level-0 PMAs together creates a level-1 PMA.
99928 ** to a level 0 PMA. The purpose of this limit is to prevent various integer
100057 ** 1. When flushing the contents of memory to a level-0 PMA on disk, to
100079 SorterFile file; /* Temp file for level-0 PMAs */
100921 ** level-0 PMAs.
101311 ** Write the current contents of in-memory linked-list pList to a level-0
101457 ** The main routine for background threads that write level-0 PMAs.
102073 ** Allocate a new MergeEngine object to merge the contents of nPMA level-0
102188 ** that has already written two or more level-0 PMAs to one or more temp
102206 /* If the sorter uses more than one task, then create the top-level
102232 MergeEngine *pMerger = 0; /* New level-0 PMA merger */
102233 int nReader; /* Number of level-0 PMAs to merge */
103474 ** return from the top-level walk call.
106914 ** SQLITE_FUNC_DIRECT - Only usable from top-level SQL
106917 ** top-level SQL
111373 ** by a COLLATE operator at the top level. Return 2 if there are differences
111374 ** other than the top-level COLLATE operator.
111517 ** Like sqlite3ExprCompare() except COLLATE operators at the top-level
115643 /* Establish a read-lock on the table at the shared-cache level.
120854 ** at the btree level, in case the sqlite_sequence table needs to
122694 ** will occur at the end of the top-level VDBE and will be generated
123771 ** is for a top-level SQL statement.
129063 ** only called from the top-level */
134272 ** Interpret the given string as a safety level. Return 0 for OFF,
134279 ** to support legacy SQL code. The safety level used to be boolean
135347 "Safety level may not be changed inside a transaction");
143098 ** CONSTANT=COLUMN that are top-level AND-connected terms that are not
147533 ** list of the top-level Parse object sooner rather than later. */
149911 /* Currently there is an SQL level transaction open on the vacuum
149913 ** was committed at the btree level). So it safe to end the transaction
151414 Bitmask notReady; /* FROM entries not usable at this level */
151835 const WhereLevel *pLevel /* Bloom filter on this level */
151855 int iLevel, /* Which level of pWInfo->a[] should be coded */
151856 WhereLevel *pLevel, /* The current level pointer */
152165 const WhereLevel *pLevel /* Bloom filter on this level */
152207 ** implement level pLvl. Argument pSrclist is a pointer to the FROM
152488 WhereLevel *pLevel, /* The level of the FROM clause we are working on */
152489 int iEq, /* Index of the equality term within this level */
153192 int iLevel, /* Which level of pWInfo->a[] should be coded */
153246 int iLevel, /* Which level of pWInfo->a[] should be coded */
153247 WhereLevel *pLevel, /* The current level pointer */
153277 sqlite3DebugPrintf("Coding level %d of %d: notReady=%llx iFrom=%d\n",
154594 sqlite3DebugPrintf("All WHERE-clause terms after coding level %d:\n",
154599 sqlite3DebugPrintf("End Coding level %d: notReady=%llx\n",
154744 ** the db->mallocFailed flag so that higher-level functions can detect it.
155760 int op; /* Top-level operator. pExpr->op */
161340 WherePath *aFrom; /* All nFrom paths at the previous level */
161341 WherePath *aTo; /* The nTo best paths at the current level */
162189 WhereLevel *pLevel; /* A single level in pWInfo->a[] */
167645 ** + The state number for the parser at this level of the stack.
167647 ** + The value of the token stored at this level of the stack.
167650 ** + The semantic value stored at this level of the stack. This is
167661 ** number for the token at this stack level */
173896 ** low-level memory allocation routines to be used in place of the memory
174551 ** at the b-tree/pager level.
177190 ** a low-level error is first detected.
178825 ** varint iHeight; (height from leaf level, always 0)
178871 ** varint iHeight; (height from leaf level, always >0)
178920 ** level - segment level (see below)
178921 ** idx - index within level
178922 ** - (level,idx uniquely identify a segment)
178934 ** merged in batches. Each increase in level represents exponentially
178938 ** written individually (using LeafWriter) to a level 0 segment, with
178940 ** level 0 segments are merged into a single level 1 segment. Level 1
178941 ** is populated like level 0, and eventually MERGE_COUNT level 1
178942 ** segments are merged to a single level 2 segment (representing
178945 ** A segment merge traverses all segments at a given level in
178949 ** After the merge, all segment blocks from the merged level are
179337 ** FTS3_MERGE_COUNT segments of level N, they are merged into a single
179338 ** segment of level N+1.
179381 ** value stored in the "%_segdir.level" column. Given this value L, the index
179383 ** level values between 0 and 1023 (inclusive) belong to index 0, all levels
179587 /* Number of segments in a level */
180364 "level INTEGER,"
180370 "PRIMARY KEY(level, idx)"
182679 ** single level therein.
183191 int mxLevel = 0; /* Maximum relative level value in db */
189972 sqlite3_log(SQLITE_OK, "%d-way merge from level %d", nMerge, (int)iAbsLevel);
190025 int iIdx; /* Index within level, or 0x7FFFFFFF for PT */
190189 /* 8 */ "SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1",
190196 "FROM %Q.'%q_segdir' WHERE level = ? ORDER BY idx ASC",
190198 "FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?"
190199 "ORDER BY level DESC, idx ASC",
190201 /* 14 */ "SELECT count(*) FROM %Q.'%q_segdir' WHERE level = ?",
190202 /* 15 */ "SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?",
190204 /* 16 */ "DELETE FROM %Q.'%q_segdir' WHERE level = ?",
190215 /* 26 */ "DELETE FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?",
190216 /* 27 */ "SELECT ? UNION SELECT level / (1024 * ?) FROM %Q.'%q_segdir'",
190218 /* This statement is used to determine which level to read the input from
190219 ** when performing an incremental merge. It returns the absolute level number
190220 ** of the oldest level in the db that contains at least ? segments. Or,
190221 ** if no level in the FTS index contains more than ? segments, the statement
190223 /* 28 */ "SELECT level, count(*) AS cnt FROM %Q.'%q_segdir' "
190224 " GROUP BY level HAVING cnt>=?"
190225 " ORDER BY (level %% 1024) ASC, 2 DESC LIMIT 1",
190228 ** created by merging the oldest :2 segments from absolute level :1. See
190232 " WHERE level = ? ORDER BY idx ASC LIMIT ?"
190236 ** Delete the %_segdir entry on absolute level :1 with index :2. */
190237 /* 30 */ "DELETE FROM %Q.'%q_segdir' WHERE level = ? AND idx = ?",
190240 ** Modify the idx value for the segment with idx=:3 on absolute level :2
190242 /* 31 */ "UPDATE %Q.'%q_segdir' SET idx = ? WHERE level=? AND idx=?",
190246 ** level :1 with index value :2. */
190248 "FROM %Q.'%q_segdir' WHERE level = ? AND idx = ?",
190252 ** entry located on absolute level :3 with index :4. */
190254 "WHERE level = ? AND idx = ?",
190262 ** Return the list of valid segment indexes for absolute level ? */
190263 /* 35 */ "SELECT idx FROM %Q.'%q_segdir' WHERE level=? ORDER BY 1 ASC",
190266 ** Return the largest relative level in the FTS index or indexes. */
190267 /* 36 */ "SELECT max( level %% 1024 ) FROM %Q.'%q_segdir'",
190270 /* 37 */ "SELECT level, idx, end_block "
190271 "FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ? "
190272 "ORDER BY level DESC, idx ASC",
190275 /* 38 */ "UPDATE OR FAIL %Q.'%q_segdir' SET level=-1,idx=? "
190276 "WHERE level=? AND idx=?",
190277 /* 39 */ "UPDATE OR FAIL %Q.'%q_segdir' SET level=? WHERE level=-1"
190437 ** level within the index) are encoded in 64-bit integer values stored
190443 ** 64-bit integer level values ("absolute levels"). The main terms index
190450 ** iIndex starts at absolute level ((iLangid * (nPrefix+1) + iIndex) * 1024).
190458 sqlite3_int64 iBase; /* First absolute level for iLangid/iIndex */
190488 int iLevel, /* Level to select (relative level) */
190499 /* "SELECT * FROM %_segdir WHERE level BETWEEN ? AND ? ORDER BY ..." */
190508 /* "SELECT * FROM %_segdir WHERE level = ? ORDER BY ..." */
190999 ** This function allocates a new level iLevel index in the segdir table.
191000 ** Usually, indexes are allocated within a level sequentially starting
191004 ** SELECT max(idx) FROM %_segdir WHERE level = :iLevel
191007 ** level, they are merged into a single level (iLevel+1) segment and the
191021 sqlite3_stmt *pNextIdx; /* Query for next idx at level iLevel */
191027 /* Set variable iNext to the next available segdir index at level iLevel. */
191040 /* If iNext is FTS3_MERGE_COUNT, indicating that level iLevel is already
191041 ** full, merge all segments in level iLevel into a single iLevel+1
191042 ** segment and allocate (newly freed) index 0 at level iLevel. Otherwise,
191830 ** Find the largest relative level number in the table. If successful, set
191855 sqlite3_int64 iLevel, /* Value for "level" field (absolute level) */
192275 sqlite3_int64 iLevel, /* Value for 'level' column of %_segdir */
192347 ** Set *pnMax to the largest segment level in the database for the index
192350 ** Segment levels are stored in the 'level' column of the %_segdir table.
192366 ** SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?
192383 ** iAbsLevel is an absolute level that may be assumed to exist within
192384 ** the database. This function checks if it is the largest level number
192386 ** iAbsLevel is indeed the largest level, or 0 otherwise, and SQLITE_OK
192394 ** SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?
192445 ** 2) deletes all %_segdir entries with level iLevel, or all %_segdir
192446 ** entries regardless of level if (iLevel<0).
193001 ** A segment of size nByte bytes has just been written to absolute level
193006 sqlite3_int64 iAbsLevel, /* Absolute level just updated */
193023 ** promoted to level iAbsLevel. */
193058 ** updated it to set (level = -1) and (idx = N), where N is 0 for the
193061 ** In other words, move all segments being promoted to level -1,
193063 ** order. The contents of level -1 (which is never used, except
193064 ** transiently here), will be moved back to level iAbsLevel below. */
193082 /* Move level -1 to level iAbsLevel */
193096 ** Merge all level iLevel segments in the database into a single
193098 ** single segment with a level equal to the numerically largest level
193117 Fts3MultiSegReader csr; /* Cursor to iterate through level(s) */
193119 i64 iMaxLevel = 0; /* Max level number for this index/langid */
193138 ** segment. The level of the new segment is equal to the numerically
193139 ** greatest segment level currently present in the database for this
193149 /* This call is to merge all segments at level iLevel. find the next
193150 ** available segment index at level iLevel+1. The call to
193151 ** fts3AllocateSegdirIdx() will merge the segments at level iLevel+1 to
193203 ** Flush the contents of pendingTerms to level 0 segments.
193521 ** level iAbsLevel.
193525 sqlite3_int64 iAbsLevel, /* Absolute level to open */
193601 sqlite3_int64 iAbsLevel; /* Absolute level of input segments */
194050 pWriter->iAbsLevel+1, /* level */
194121 ** It checks if the existing segment with index value iIdx at absolute level
194136 sqlite3_int64 iAbsLevel, /* Absolute level of input segments */
194155 /* Read the %_segdir entry for index iIdx absolute level (iAbsLevel+1) */
194278 ** level iAbsLevel+1. If no error occurs, set *piIdx to this value plus
194280 ** within level iAbsLevel, set *piIdx to zero.
194305 ** Allocate an appendable output segment on absolute level iAbsLevel+1
194332 sqlite3_int64 iAbsLevel, /* Absolute level of input segments */
194388 ** DELETE FROM %_segdir WHERE level = :iAbsLevel AND idx = :iIdx
194389 ** UPDATE %_segdir SET idx = idx - 1 WHERE level = :iAbsLevel AND idx > :iIdx
194391 ** The DELETE statement removes the specific %_segdir level. The UPDATE
194397 sqlite3_int64 iAbsLevel, /* Absolute level to delete from */
194415 ** One or more segments have just been removed from absolute level iAbsLevel.
194416 ** Update the 'idx' values of the remaining segments in the level so that
194421 sqlite3_int64 iAbsLevel /* Absolute level to repack */
194545 ** level iAbsLevel. This may involve deleting entries from the %_segments
194554 sqlite3_int64 iAbsLevel, /* Absolute level of segment to modify */
194555 int iIdx, /* Index within level of segment to modify */
194630 ** merge (or partially merge) two or more segments from absolute level
194640 sqlite3_int64 iAbsLevel, /* Absolute level containing segments */
194669 ** segment to the upper level. The segment is modified in place
194743 ** consists of two varints, the absolute level number of the input segments
194796 ** values for the _segdir.idx field) in the highest level that contains
194807 sqlite3_int64 iAbsLevel = 0; /* Absolute level number to work on */
194823 int iIdx = 0; /* Largest idx in level (iAbsLevel+1) */
194825 /* Search the %_segdir table for the absolute level with the smallest
194826 ** relative level number that contains at least nMin segments, if any.
194827 ** If one is found, set iAbsLevel to the absolute level number and
194828 ** nSeg to nMin. If no level with at least nMin segments can be found,
194843 ** last entry in it specifies a relative level smaller than or equal
194844 ** to the level identified by the block above (if any). If so, this
194845 ** iteration of the loop will work on merging at the hinted level.
194849 sqlite3_int64 iHintAbsLevel = 0; /* Hint level */
194855 ** are no levels with a relative level smaller than that of
194871 /* If nSeg is less that zero, then there is no level with at least
194883 ** indexes of absolute level iAbsLevel. If this cursor is opened using
194885 ** segments available in level iAbsLevel. In this case, no work is
194887 ** to start work on some other level. */
194990 ** written for the merge, and the minimum number of segments on a level
199716 ** Return the number of elements in the top-level JSON array.
200153 ** Return the top-level "type" of a JSON string. json_type() raises an
200373 u8 eType; /* Type of top-level element */
212900 ** level pager to use "journal_mode=off". This prevents it from
213651 ** level vfs will do the special RBU handling. */
214199 ** The dbstat virtual table is used to extract low-level storage
222134 int nCrisisMerge; /* Maximum allowed segments per level */
223114 ** + The state number for the parser at this level of the stack.
223116 ** + The value of the token stored at this level of the stack.
223119 ** + The semantic value stored at this level of the stack. This is
223130 ** number for the token at this stack level */
229467 ** to accumuluate "term -> doclist" content before it is flused to a level-0
230018 ** Low level access to the FTS index stored in the database file. The
230089 ** Then, for each level from 0 to nMax:
230092 ** + total number of segments in level.
230335 int nSeg; /* Total number of segments on level */
230340 u64 nWriteCounter; /* Total leaves written to level 0 */
230343 Fts5StructureLevel aLevel[1]; /* Array of nLevel level objects */
230545 Fts5Data *pData; /* Data for current page of this level */
230986 ** Add a level to the Fts5Structure.aLevel[] array of structure object
231011 ** Extend level iLvl so that there is room for at least nExtra more
231241 ** segments as possible to level iPromote. If an OOM occurs, NULL is
231271 ** A new segment has just been written to level iLvl of index structure
231276 ** within the previous populated level, it is promoted to the previous
231277 ** populated level.
231280 ** the next populated level, then that segment, and any other adjacent
231289 int iLvl, /* Index level just updated */
231316 /* Condition (a) is true. Promote the newest segment on level
231317 ** iLvl to level iTst. */
231421 /* Advance each level to the last entry on the last page */
233445 ** is zero or greater, data from the first nSegment segments on level iLevel
233898 ** doclist-index leaf page) up into the next level of the b-tree
234342 /* Add the new segment to the output level */
234349 /* Read input from all segments in the input level */
234414 /* Remove the redundant segments from the input level */
234454 int nBest = 0; /* Number of input segments on best level */
234456 /* Set iBestLvl to the level to read input segments from. */
234494 ** A total of nLeaf leaf pages of data has just been flushed to a level-0
234572 ** Flush the contents of in-memory hash table iHash to a new level-0
234585 ** for the new level-0 segment. */
234754 ** + all segments are on the same level, or