Lines Matching refs:list
509 ** over the list of options that were defined at compile time by
1094 ** A [file control opcodes | list of opcodes] less than 100 is available.
1628 ** Registered sqlite3_vfs objects are kept on a linked list formed by
1630 ** and [sqlite3_vfs_unregister()] interfaces manage this list
1632 ** searches the list. Neither the application code nor the VFS
4908 ** there may be gaps in the list.)^
7332 ** on the list of automatic extensions is a harmless no-op. ^No entry point
7347 ** unregistered and it returns 0 if X was not on the list of initialization
7681 ** table modules from database connection D except those named on list L.
8303 #define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
13917 ** All elements of the hash table are on a single doubly-linked list.
13918 ** Hash.first points to the head of this list.
13921 ** the global doubly-linked list. The contents of the bucket are the
13922 ** element pointed to plus the next _ht.count-1 elements in the list.
13925 ** by a linear search of the global list. For small tables, the
13941 ** structure. All elements are stored on a single doubly-linked list.
16239 ** together near the beginning of the list.
16509 PgHdr *pDirty; /* Transient list of dirty sorted by pgno */
16523 PgHdr *pDirtyNext; /* Next element in list of dirty pages */
16524 PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */
16530 #define PGHDR_CLEAN 0x001 /* Page not on the PCache.pDirty list */
16531 #define PGHDR_DIRTY 0x002 /* Page is on the PCache.pDirty list */
16581 SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*); /* Mark all dirty list pages as clean */
16590 /* Get a list of all dirty pages in the cache, sorted by page number */
16866 ** the lookaside subsystem is stored on a linked list of LookasideSlot
16882 ** Lookaside buffers are initially held on the pInit list. As they are
16883 ** used and freed, they are added back to the pFree list. New allocations
16884 ** come off of pFree first, then pInit as a fallback. This dual-list
16887 ** allocations on the pInit list from the total number of allocations.
16921 LookasideSlot *pNext; /* Next buffer in the list of free buffers */
17145 sqlite3 *pNextBlocked; /* Next in list of all blocked connections */
17514 ** All current savepoints are stored in a linked list starting at
17515 ** sqlite3.pSavepoint. The first element in the list is the most recently
17516 ** opened savepoint. Savepoints are added to the list by the vdbe
17707 ** database schema are initially stored in a linked-list pointed to by
17710 ** table, it searches the list for the VTable that corresponds to the
17717 ** immediately. Instead, they are moved from the Table.pVTable list to
17718 ** another linked list headed by the sqlite3.pDisconnect member of the
17724 ** list without holding the corresponding sqlite3.mutex mutex.
17738 VTable *pNext; /* Next in linked list (see above) */
17757 /* ... also used as column name list in a VIEW */
17774 FKey *pFKey; /* Linked list of all foreign keys in this table */
17895 ** The list of all parents for child Table X is held at X.pFKey.
17897 ** A list of all children for a table named Z (which might not even exist)
18260 ** Expr.x.pList is a list of arguments if the expression is an SQL function,
18479 ** A list of expressions. Each expression may optionally have a
18481 ** as the list of "expr AS ID" fields following a "SELECT" or in the
18482 ** list of "ID = expr" items in an UPDATE. A list of expressions can
18501 int nExpr; /* Number of expressions on the list */
18503 struct ExprList_item { /* For each expression in the list */
18526 } a[1]; /* One slot for each expression in the list */
18537 ** An instance of this structure can hold a simple list of identifiers,
18538 ** such as the list "a,b,c" in the following statements:
18544 ** The IdList.a.idx field is used when the IdList represents the list of
18552 int nId; /* Number of identifiers on the list */
18576 ** and the next table on the list. The parser builds the list this way.
18652 SrcItem a[1]; /* One entry for each identifier on the list */
18703 ** names. The context consists of a list of tables (the pSrcList) field and
18704 ** a list of named expression (pEList). The named expression list may
18719 ** NameContext list corresponds to searching through successively outer
18726 ExprList *pEList; /* Optional list of result-set columns */
18779 ** pUpsertSet is the list of column=expr terms of the UPDATE statement.
18789 Upsert *pNextUpsert; /* Next ON CONFLICT clause in the list */
19006 AutoincInfo *pNext; /* Next info block in a list of them all */
19015 ** statement. All such objects are stored in the linked list headed at
19022 ** The Parse.pTriggerPrg list never contains two entries with the same
19032 TriggerPrg *pNext; /* Next entry in Parse.pTriggerPrg list */
19061 ** there is an instance of this object on the Parse.pIdxExpr list.
19064 ** this list is consulted and if a matching expression is found, the value
19073 IndexedExpr *pIENext; /* Next in a list of all indexed expressions */
19104 ** list.
19152 TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
19301 ** 2. All triggers associated with a single table form a linked list, using the
19303 ** linked list is stored as the "pTrigger" member of the associated
19306 ** The "step_list" member points to the first element of a linked list
19316 IdList *pColumns; /* If this is an UPDATE OF <column-list> trigger,
19317 the <column-list> is stored here */
19320 TriggerStep *step_list; /* Link list of trigger program steps */
19338 ** Instances of struct TriggerStep are stored in a singly linked list (linked
19340 ** associated struct Trigger instance. The first element of the linked list is
19366 ** pExprList -> A list of the columns to update and the expressions to update
19374 ** pExprList -> The list of expressions that follow the RETURNING keyword.
19390 TriggerStep *pNext; /* Next in the link-list */
19391 TriggerStep *pLast; /* Last element in link-list. Valid for 1st elem only */
19702 ** (2) All window functions in a single SELECT form a linked-list
19707 ** object on a linked list attached to Select.pWinDefn.
19728 Window **ppThis; /* Pointer to this object in Select.pWin list */
22464 /* Elements of the linked list at Vdbe.pAuxData */
22568 ** is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame
22569 ** list is deleted when the VM is reset in VdbeHalt(). The reason for doing
22588 AuxData *pAuxData; /* Linked list of auxdata allocations */
22754 ** are stored in a linked list headed at Vdbe.pAuxData. All are destroyed
22762 AuxData *pNextAux; /* Next element in list */
22810 ** string for a prepared statement. A linked list of these objects
22813 ** list is consulted for each double-quoted identifier to see if the
22818 DblquoteStr *pNextStr; /* Next string literal in the list */
22831 Vdbe **ppVPrev,*pVNext; /* Linked list of VDBEs with the same Vdbe.db */
22889 int nFrame; /* Number of frames in pFrame list */
22891 SubProgram *pProgram; /* Linked list of all sub-programs used by VM */
22892 AuxData *pAuxData; /* Linked list of auxdata allocations */
23276 ** Return the number of LookasideSlot elements on the linked list
25216 ** The list of all registered VFS implementations.
25223 ** first VFS on the list.
25247 ** Unlink a VFS from the linked list
25816 struct MemBlockHdr *pNext, *pPrev; /* Linked list of all unfreed memory */
25849 ** Head and tail of a linked list of all outstanding allocations
26361 ** The second block of free chunks is of the form u.list. The
26362 ** two fields form a double-linked list of chunks of related sizes.
26363 ** Pointers to the head of the list are stored in mem3.aiSmall[]
26380 } list;
26434 ** Unlink the chunk at mem3.aPool[i] from list it is currently
26435 ** on. *pRoot is the list that i is a member of.
26438 u32 next = mem3.aPool[i].u.list.next;
26439 u32 prev = mem3.aPool[i].u.list.prev;
26444 mem3.aPool[prev].u.list.next = next;
26447 mem3.aPool[next].u.list.prev = prev;
26449 mem3.aPool[i].u.list.next = 0;
26450 mem3.aPool[i].u.list.prev = 0;
26455 ** whatever list is currently a member of.
26474 ** Link the chunk at mem3.aPool[i] so that is on the list rooted
26479 mem3.aPool[i].u.list.next = *pRoot;
26480 mem3.aPool[i].u.list.prev = 0;
26482 mem3.aPool[*pRoot].u.list.prev = i;
26489 ** small chunk list, or into the large chunk hash table.
26590 ** *pRoot is the head of a list of free chunks of the same size
26594 ** This routine examines all entries on the given list and tries
26610 iNext = mem3.aPool[i].u.list.next;
26618 iNext = mem3.aPool[prev].u.list.next;
26671 for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){
26923 for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){
26932 for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){
27100 ** Lists of free blocks. aiFreelist[0] is a list of free blocks of
27126 ** Unlink the chunk at mem5.aPool[i] from list it is currently
27149 ** free list.
31283 va_list ap; /* Vararg list */
31421 ** Show a list of Column objects in tree format.
32193 ** Generate a human-readable explanation of an expression list.
32255 ** Generate a human-readable explanation of an id-list.
32305 ** Generate a human-readable explanation of a list of Upsert objects
35285 ** the list
35469 HashElem *elem; /* Used to loop thru the element list */
35556 HashElem *elem; /* Used to loop thru the element list */
37721 ** structures on a linked list.
37724 struct vxworksFileId *pNext; /* Next in a list of them all */
37732 ** All unique filenames are held on a linked list headed by this
37780 ** and added to the global list if necessary.
37909 ** The unixInodeInfo structure keeps a list of file descriptors that need to
37910 ** be closed and that list is walked (and cleared) when the last lock
38121 ** Close all file descriptors accumuated in the unixInodeInfo->pUnused list.
38710 ** pUnused list.
38971 ** descriptor to pInode->pUnused list. It will be automatically closed
41351 ** Purge the unixShmNodeList list of all entries with unixShmNode.nRef==0.
41584 ** left to do is to link the new object into the linked list starting
41838 ** in the following list than the lock being obtained are already held:
41845 ** occur later in the above list than the lock being obtained may be
48817 winShmNode *pNext; /* Next in list of all winShmNode objects */
48826 ** The winShmMutexHeld() must be true while reading or writing this list.
48909 ** Purge the winShmNodeList list of all entries with winShmNode.nRef==0.
49079 ** left to do is to link the new object into the linked list starting
52635 ** All dirty pages are linked into the doubly linked list using
52636 ** PgHdr.pDirtyNext and pDirtyPrev. The list is maintained in LRU order
52637 ** such that p was added to the list more recently than p->pDirtyNext.
52638 ** PCache.pDirty points to the first (newest) element in the list and
52645 ** to either the oldest page in the pDirty/pDirtyTail list that has a
52652 PgHdr *pSynced; /* Last synced page in dirty page list */
52713 ** Return 1 if pPg is on the dirty list for pCache. Return 0 if not.
52744 assert( !pageOnDirtyList(pCache, pPg) );/* CLEAN pages not on dirty list */
52781 #define PCACHE_DIRTYLIST_REMOVE 1 /* Remove pPage from dirty list */
52782 #define PCACHE_DIRTYLIST_ADD 2 /* Add pPage to the dirty list */
52783 #define PCACHE_DIRTYLIST_FRONT 3 /* Move pPage to the front of the list */
52786 ** Manage pPage's participation on the dirty list. Bits of the addRemove
52788 ** remove pPage from the dirty list. The 0x02 means add pPage back to
52789 ** the dirty list. Doing both moves pPage to the front of the dirty list.
52847 ** entries of the dirty-list for a page with NEED_SYNC clear anyway. */
53055 ** If the LRU page in the dirty list that has a clear PGHDR_NEED_SYNC
53368 ** Sort the list of pages in accending order by pgno. Pages are
53397 ** the input list. But that is impossible.
53411 ** Return a list of all dirty pages in the cache, sorted by page number.
53646 ** The pLruNext and pLruPrev pointers form a double-linked circular list
53648 ** the only element on the list with PgHdr1.isAnchor set to 1) forms the
53649 ** beginning and the end of the list.
53658 PgHdr1 *pLruNext; /* Next in circular LRU list of unpinned pages */
53659 PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
53664 ** A page is pinned if it is not on the LRU list. To be "pinned" means
53698 PgHdr1 lru; /* The beginning and end of the LRU list */
53731 unsigned int nRecyclable; /* Number of pages in the LRU list */
54107 ** PGroup LRU list, if is part of it. If pPage is not part of the PGroup
54108 ** LRU list, then this function is a no-op.
54525 ** then attempt to recycle a page from the LRU list. If it is the right
54625 ** part of the PGroup LRU list.
54633 /* Add the page to the PGroup LRU list. */
54898 ** This same object is reused to store a linked list of trees of RowSetEntry
54900 ** in the list, pLeft points to the tree, and v is unused. The
54901 ** RowSet.pForest value points to the head of this forest list.
54905 struct RowSetEntry *pRight; /* Right subtree (larger entries) or list */
54912 ** chunks are kept on a linked list so that they can be deallocated
54916 struct RowSetChunk *pNextChunk; /* Next chunk on list of them all */
54929 struct RowSetEntry *pLast; /* Last entry on the pEntry list */
55059 struct RowSetEntry *pA, /* First sorted list to be merged */
55060 struct RowSetEntry *pB /* Second sorted list to be merged */
55090 ** Sort all elements on the list of RowSetEntry objects into order of
55119 ** Convert this tree into a linked list connected by the pRight pointers
55120 ** and return pointers to the first and last elements of the new list.
55124 struct RowSetEntry **ppFirst, /* Write head of the output list here */
55125 struct RowSetEntry **ppLast /* Write tail of the output list here */
55145 ** Convert a sorted list of elements (connected by pRight) into a binary
55150 ** Use as many entries from the input list as required and update the
55151 ** *ppList to point to the unused elements of the list. If the input
55152 ** list contains too few elements, then construct an incomplete tree
55190 ** Convert a sorted list of elements into a binary tree. Make the tree
55191 ** as deep as it needs to be in order to contain the entire list.
55229 /* Merge the forest into a single sorted list on first call */
55237 /* Return the next entry on the list */
56161 sqlite3_backup *pBackup; /* Pointer to list of ongoing backup processes */
57955 ** if the page is on the free-list at the start of the transaction, then
58682 ** the contents of the list of pages headed by pList (connected by pDirty),
58686 ** The list of pages passed into this routine is always sorted by page number.
58687 ** Hence, if page 1 appears anywhere on the list, it will be the first page.
58702 /* Verify that the page list is in accending order */
58713 ** list here. */
59624 ** Free all PgHdr objects stored in the Pager.pMmapFreelist list.
59899 ** The argument is the first in a linked list of dirty pages connected
59901 ** in-memory pages in the list to the database file. The argument may
59902 ** be NULL, representing an empty list. In this case this function is
59915 ** the pages are written out to the database file in list order. Writing
61032 ** a) When reading a free-list leaf page from the database, and
61615 /* The PGHDR_DIRTY bit is set above when the page was added to the dirty-list
62161 ** last page in the db image moved to the free-list. In this case the
64982 ** This function merges two sorted lists into a single sorted list.
65006 ht_slot *aLeft, /* IN: Left hand input list */
65008 ht_slot **paRight, /* IN/OUT: Right hand input list */
65045 ** Sort the elements in list aList using aContent[] as the sort key.
65069 ht_slot *aList; /* Pointer to sub-list content */
65072 const int nList = *pnList; /* Size of input list */
65073 int nMerge = 0; /* Number of elements in list aMerge */
65075 int iList; /* Index into input list */
66992 PgHdr *pLast = 0; /* Last frame in list */
67718 ** Unused space within the cell content area is collected into a linked list of
67764 ** Overflow pages form a linked list. Each page except the last is completely
67773 ** file header points to the first in a linked list of trunk page. Each trunk
67873 ** A linked list of the following structures is stored at BtShared.pLock.
67876 ** from this list when a transaction is committed or rolled back, or when
67883 BtLock *pNext; /* Next in BtShared.pLock list */
67922 Btree *pPrev; /* Back pointer of the same list */
67994 BtCursor *pCursor; /* A list of all open cursors */
68017 Bitvec *pHasContent; /* Set of pages moved to free-list this transaction */
68020 BtShared *pNext; /* Next on a list of sharable BtShared structs */
68106 BtCursor *pNext; /* Forms a linked list of all cursors */
68210 ** PTRMAP_OVERFLOW1: The database page is the first page in a list of
68214 ** PTRMAP_OVERFLOW2: The database page is the second or later page in a list of
68216 ** page in the overflow page list.
68346 ** by all database connections. The p->pNext is a list of other
68354 /* Some basic sanity checking on the Btree. The list of Btrees
68356 ** Btree.pBt value. All elements of the list should belong to
68357 ** the same connection. Only shared Btrees are on the list. */
68661 ** A list of BtShared objects that are eligible for participation
68695 ** manipulate entries in the BtShared.pLock linked list used to store
68998 /* First search the list for an existing lock on this table. */
69007 ** with table iTable, allocate one and link it into the list.
69136 ** Invalidate the overflow page-list cache for all cursors opened
69188 ** when a page that previously contained data becomes a free-list leaf
69193 ** free-list leaf pages:
69196 ** a free-list leaf page, the page is not written to the database
69197 ** (as free-list leaf pages contain no meaningful data). Sometimes
69201 ** 2) When a free-list leaf page is reused, its content is not read
69207 ** a page is moved to the free-list and then reused within the same
69209 ** it is moved to the free-list and it is also not journalled when it
69210 ** is extracted from the free-list and reused, then the original data
69215 ** moved to become a free-list leaf page, the corresponding bit is
69216 ** set in the bitvec. Whenever a leaf page is extracted from the free-list,
69239 ** This function is called when a free-list leaf page is removed from the
69240 ** free-list for reuse. It returns false if it is safe to retrieve the
70103 ** page so that there are no free-blocks on the free-block list.
70234 ** Search the free-list on page pPg for space to store a cell nByte bytes in
70236 ** from the free-list.
70238 ** If no suitable space can be found on the free-list, return NULL.
70243 ** Slots on the free list that are between 1 and 3 bytes larger than nByte
70272 /* Remove the slot from the free-list. Update the number of
70282 /* The slot remains on the free-list. Reduce its size to account
70411 ** Even though the freeblock list was checked by btreeComputeFreeSpace(),
70436 /* The list of freeblocks must be in ascending order. Find the
70437 ** spot on the list where iStart should be inserted.
71276 /* Add the new BtShared object to the linked list sharable BtShareds.
71299 ** Btree into the list of all sharable Btrees for the same connection.
71300 ** The list is kept in ascending order by pBt address.
71364 ** remove the BtShared structure from the sharing list. Return
71488 /* The pBt is no longer on the sharing list, so we can access
72350 ** overflow page in the list.
72511 Pgno nFreeList; /* Number of pages still on the free-list */
72536 /* Remove the page from the files free-list. This is not required
72537 ** if bCommit is non-zero. In that case, the free-list will be
72562 ** is swapped with the first free page pulled off the free list.
73201 ** variables and link the cursor into the BtShared list. */
73446 ** linked list of overflow pages. If possible, it uses the auto-vacuum
73451 ** The page number of the next overflow page in the linked list is
73453 ** list, *pPgnoNext is set to zero.
73476 /* Try to find the next page in the overflow list using the
73478 ** the overflow list is page number (ovfl+1). If that guess turns
73567 ** the overflow page-list cache array (BtCursor.aOverflow).
73571 ** Once an overflow page-list cache has been allocated, it must be
73574 ** mode, the following events may invalidate an overflow page-list cache.
73663 /* If the overflow page-list cache has been allocated and the
73676 /* If required, populate the overflow page-list cache. */
73687 ** page-list cache, if any, then fall back to the getOverflowPage()
74874 ** anywhere on the free-list, then it is guaranteed to be returned. If
74908 u8 searchList = 0; /* If the free-list must be searched for 'nearby' */
74912 ** shows that the page 'nearby' is somewhere on the free-list, then
74913 ** the entire-list will be searched for that page.
74932 /* Decrement the free-list count by 1. Set iTrunk to the index of the
74933 ** first free-list trunk page. iPrevTrunk is initially 1.
74941 ** free-list until the page 'nearby' is located (eMode==BTALLOC_EXACT)
74948 ** is the page number of the next freelist trunk page in the list or
74973 /* The trunk has no leaves and the list is not being searched.
74994 /* The list is being searched and this trunk page is the page
75016 ** pointers to free-list leaves. The first leaf becomes a trunk
75190 ** This function is used to add page iPage to the database file free-list.
75191 ** It is assumed that the page is not already a part of the free-list.
75202 MemPage *pTrunk = 0; /* Free-list trunk page */
75203 Pgno iTrunk = 0; /* Page number of free-list trunk page */
75207 u32 nFree; /* Initial number of pages on free-list */
75249 /* Now manipulate the actual database free-list structure. There are two
75250 ** possibilities. If the free-list is currently empty, or if the first
75251 ** trunk page in the free-list is full, then this page will become a
75252 ** new free-list trunk page. Otherwise, it will become a leaf of the
75253 ** first trunk page in the current free-list. This block tests if it
75254 ** is possible to add the page as a new free-list leaf.
75310 ** the page being freed as a leaf page of the first trunk in the free-list.
75311 ** Possibly because the free-list is empty, or possibly because the
75312 ** first trunk in the free-list is full. Either way, the page being freed
75313 ** will become the new first trunk page in the free-list.
76069 ** that is currently stored within the body of pPg to the pPg free-list.
76072 ** This function returns the total number of cells added to the free-list.
77844 ** the leftover space to the free list. But experiments show that
78572 ** number in the database, put the root page on the free list.
78891 ** Check the integrity of the freelist or of an overflow page list.
78892 ** Verify that the number of pages on the list is N.
78896 int isFreeList, /* True for a freelist. False for overflow page list */
78897 Pgno iPage, /* Page number for first page in the list */
78898 u32 N /* Expected number of pages in the list */
78940 ** page in this overflow list, check that the pointer-map entry for
78955 isFreeList ? "size" : "overflow list length",
79158 /* Check the content overflow list */
79297 ** If the first entry in aRoot[] is 0, that indicates that the list of
80346 sqlite3_backup **pp; /* Ptr to head of pagers backup list */
82616 ** Add a new element to the Vdbe->pDblStr list.
82754 ** Add a new instruction to the list of instructions current in the
83066 ** through its operation list and change all values of P2 which match
83354 /* Only JUMP opcodes and the short list of special opcodes in the switch
83356 ** all these opcodes together near the front of the opcode list. Skip
83589 ** Add a whole list of operations to the operation stack. Return a
83831 ** list at Vdbe.pSubProgram. This list is used to delete all sub-program
84611 ** frame to a list of frames to be deleted when the Vdbe halts.
85551 ** matches the number of vdbe's in the list sqlite3.pVdbe that are
86095 ** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
88788 sqlite3_value **ppOut, /* Store the next value from the list here */
89084 ** select list of a SELECT statement) that may cause a malloc() failure. If
90905 ** linked list starting at sqlite3.pSavepoint.
94038 /* Link the new savepoint into the database handle's list. */
99942 typedef struct SorterList SorterList; /* In-memory list of records */
99955 ** An in-memory list of objects to be sorted.
99963 SorterRecord *pList; /* Linked list of records */
100076 SorterList list; /* List for thread to write to a PMA */
100103 SorterList list; /* List of in-memory records */
100104 int iMemory; /* Offset of free space in list.aMemory */
100105 int nMemory; /* Size of list.aMemory allocation in bytes */
100204 ** How the linked list is connected depends on how memory is being managed
100206 ** (VdbeSorter.list.aMemory==0), then the list is always connected using the
100209 ** Or, if using the single large allocation method (VdbeSorter.list.aMemory!=0),
100210 ** then while records are being accumulated the list is linked using the
100214 ** is full, the list is sorted. As part of the sorting process, it is
100221 SorterRecord *pNext; /* Pointer to next record in list */
100790 pSorter->list.aMemory = (u8*)sqlite3Malloc(pgsz);
100791 if( !pSorter->list.aMemory ) rc = SQLITE_NOMEM_BKPT;
100808 ** Free the list of sorted records starting at pRecord.
100826 /* pTask->list.aMemory can only be non-zero if it was handed memory
100828 if( pTask->list.aMemory ){
100829 sqlite3_free(pTask->list.aMemory);
100833 assert( pTask->list.aMemory==0 );
100834 vdbeSorterRecordFree(0, pTask->list.pList);
101025 if( pSorter->list.aMemory==0 ){
101026 vdbeSorterRecordFree(0, pSorter->list.pList);
101028 pSorter->list.pList = 0;
101029 pSorter->list.szPMA = 0;
101046 sqlite3_free(pSorter->list.aMemory);
101120 ** Merge the two sorted lists p1 and p2 into a single list.
101124 SorterRecord *p1, /* First list to merge */
101125 SorterRecord *p2 /* Second list to merge */
101174 ** Sort the linked list of records headed at pTask->pList. Return
101311 ** Write the current contents of in-memory linked-list pList to a level-0
101352 /* Sort the list */
101463 rc = vdbeSorterListToPMA(pTask, &pTask->list);
101470 ** Flush the current contents of VdbeSorter.list to a new PMA, possibly
101476 return vdbeSorterListToPMA(&pSorter->aTask[0], &pSorter->list);
101487 /* Select a sub-task to sort and flush the current list of in-memory
101507 rc = vdbeSorterListToPMA(&pSorter->aTask[nWorker], &pSorter->list);
101515 assert( pTask->list.pList==0 );
101516 assert( pTask->list.aMemory==0 || pSorter->list.aMemory!=0 );
101518 aMem = pTask->list.aMemory;
101521 pTask->list = pSorter->list;
101522 pSorter->list.pList = 0;
101523 pSorter->list.szPMA = 0;
101525 pSorter->list.aMemory = aMem;
101527 }else if( pSorter->list.aMemory ){
101528 pSorter->list.aMemory = sqlite3Malloc(pSorter->nMemory);
101529 if( !pSorter->list.aMemory ) return SQLITE_NOMEM_BKPT;
101549 SorterRecord *pNew; /* New list element */
101578 ** * The total memory allocated for the in-memory list is greater
101581 ** * The total memory allocated for the in-memory list is greater
101587 if( pSorter->list.aMemory ){
101591 (pSorter->list.szPMA > pSorter->mxPmaSize)
101592 || (pSorter->list.szPMA > pSorter->mnPmaSize && sqlite3HeapNearlyFull())
101597 pSorter->list.szPMA = 0;
101599 assert( rc!=SQLITE_OK || pSorter->list.pList==0 );
101603 pSorter->list.szPMA += nPMA;
101608 if( pSorter->list.aMemory ){
101615 if( pSorter->list.pList ){
101616 iListOff = (u8*)pSorter->list.pList - pSorter->list.aMemory;
101621 aNew = sqlite3Realloc(pSorter->list.aMemory, nNew);
101624 pSorter->list.pList = (SorterRecord*)&aNew[iListOff];
101626 pSorter->list.aMemory = aNew;
101630 pNew = (SorterRecord*)&pSorter->list.aMemory[pSorter->iMemory];
101632 if( pSorter->list.pList ){
101633 pNew->u.iNext = (int)((u8*)(pSorter->list.pList) - pSorter->list.aMemory);
101640 pNew->u.pNext = pSorter->list.pList;
101645 pSorter->list.pList = pNew;
102367 ** sort the VdbeSorter.pRecord list. The vdbe layer will read data directly
102368 ** from the in-memory list. */
102370 if( pSorter->list.pList ){
102372 rc = vdbeSorterSort(&pSorter->aTask[0], &pSorter->list);
102379 /* Write the current in-memory list to a PMA. When the VdbeSorterWrite()
102381 ** creates a new list consisting of a single key immediately afterwards.
102382 ** So the list is never empty at this point. */
102383 assert( pSorter->list.pList );
102435 SorterRecord *pFree = pSorter->list.pList;
102436 pSorter->list.pList = pFree->u.pNext;
102438 if( pSorter->list.aMemory==0 ) vdbeSorterRecordFree(db, pFree);
102439 rc = pSorter->list.pList ? SQLITE_OK : SQLITE_DONE;
102466 *pnKey = pSorter->list.pList->nVal;
102467 pKey = SRVAL(pSorter->list.pList);
103006 ** The rollback journal is composed of a linked list of these structures.
103045 FileChunk *pFirst; /* Head of in-memory chunk-list */
103103 ** Free the list of FileChunk structures headed at MemJournal.pFirst.
103437 ** Walk all expressions linked into the list of Window objects passed
103516 ** Call sqlite3WalkExpr() for every expression in list p or until
103532 ** callback is set, then the Select->pWinDefn list is traversed.
103922 NameContext *pTopNC = pNC; /* First namecontext in the list */
104664 ExprList *pList = pExpr->x.pList; /* The argument list */
104978 ** pEList is a list of expressions which are really the result set of the
104981 ** to the AS-name of one of the terms of the expression list. If it is,
105264 ** Select.pWin list of Select object pSelect.
105348 ** objects belonging to the expression from the Select.pWin list. */
105455 ** resolve the result-set expression list.
105478 /* Add the output column list to the name-context before parsing the
105578 ** number of expressions in the select list. */
105683 ** Resolve all names for all expression in an expression list. This is
105685 ** list rather than a single expression.
105689 ExprList *pList /* The expression list to be analyzed. */
105782 ExprList *pList /* Expression list to resolve. May be NULL. */
106794 ** Expression list pEList is a list of vector values. This function
106796 ** returning 1 row for each element of the list. For example, the
106797 ** expression list:
106806 ** If a list element that is not a vector or does not contain nElem terms,
106809 ** This is used as part of processing IN(...) expressions with a list
106882 ExprList *pList, /* Argument list */
107093 ** pExpr to the pParse->pConstExpr list with a register number of 0.
107365 ** objects found there, assembling them onto the linked list at Select->pWin.
107399 ** The expression list, ID, and source lists return by sqlite3ExprListDup(),
107589 ** Add a new element to the end of an expression list. If pList is
107590 ** initially NULL, then create a new expression list.
107599 ** If a memory allocation error occurs, the entire list is freed and
107671 ** expression list pList. In the case of a subquery on the RHS, append
107768 ** on the expression list.
107803 ** on the expression list.
107828 ** If the expression list pEList contains more than iLimit elements,
107845 ** Delete an entire expression list.
108099 ** can be added to the pParse->pConstExpr list and evaluated once when
108454 ** The argument is an IN operator with a list (not a subquery) on the
108455 ** right-hand side. Return TRUE if that list is constant.
108472 ** might be either a list of expressions or a subquery.
108496 ** If the RHS of the IN operator is a list or a more complex subquery, then
108522 ** if the RHS of the IN operator is a list (not a subquery) then this
108725 ** and the RHS of the IN operator is a list, not a subquery
108847 ** x IN (4,5,11) -- IN operator with list on right-hand side
108883 ** * The right-hand side is an expression list containing variables
109103 ** * The right-hand side is an expression list containing variables
109213 ** a list of values, the LHS must be a scalar.
110840 ** expression list into a sequence of registers beginning at target.
110852 ** The SQLITE_ECEL_REF flag means that expressions in the list with
110860 ExprList *pList, /* The expression list to be coded */
110969 ** it into the Parse.pConstExpr list. We should use a new bit for this,
111861 ** entries for that subquery to the exclude list.
111863 ** When leaving the subquery, remove those entries from the exclude list.
112223 ** expression list. Return the number of errors.
113013 ** A list of RenameToken objects can be constructed during parsing.
113025 RenameToken *pNext; /* Next is a list of all RenameToken objects */
113046 ** rename-token list.
113048 ** 2. Dereferences each pointer in the rename-token list.
113088 ** to the list of RenameToken objects currently being built up
113231 ** Remove all nodes that are part of expression pExpr from the rename list.
113246 ** Remove all nodes that are part of expression-list pEList from the
113247 ** rename list.
113266 ** Free the list of RenameToken objects given in the second argument
113284 ** the list maintained by the RenameCtx object.
113331 ** RenameToken object to the list of RenameToken objects being
113352 ** The RenameCtx contains a list of tokens that reference a column that
113401 ** For each name in the the expression-list pEList (i.e. each
113427 ** For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName)
113482 /* Ensure that all mappings in the Parse.pRename list really do map to
113499 ** by the linked list pRename with the text of zNew. If argument bQuote is
113546 /* At this point pRename->pList contains a list of RenameToken objects
114652 ** a string consisting of a list of integers. The first integer in this
114653 ** list is the number of rows in the index. (This is the same as the
114663 ** The list of integers in the stat column can optionally be followed
114717 ** list of integers. The first integer is the approximate number
114722 ** And so forth. nLt is another list of integers that show the approximate
115442 ** The value is a string composed of a list of integers describing
115443 ** the index. The first integer in the list is the total number of
115444 ** entries in the index. There is one additional integer in the list
116066 ** list of space separated integers. Read the first nOut of these into
117125 SrcList *pList /* The Source list to check and modify */
117706 ** The pConstExpr list might also contain expressions that we simply
117793 ** list of users and their access credentials.
118049 /* Justification of ALWAYS(); The index must be on the list of
118063 ** Look through the list of open database files in db->aDb[] and if
118064 ** any have been closed, remove them from the list. Reallocate the
119287 ** Designate the PRIMARY KEY for the table. pList is a list of names
120435 ExprList *pCNames, /* Optional list of view column names */
120608 ** a VIEW it holds the list of column names.
120620 /* CREATE VIEW name AS... without an argument list. Construct
120766 ** a free-list page.
121040 ** the table referred to (a.k.a the "parent" table). pToCol is a list
121341 ** If expression list pList contains an expression that was parsed with
121369 ** pList is a list of columns to be indexed. pList will be NULL if this
121378 ExprList *pList, /* A list of columns to be indexed */
121567 ** So create a fake list to simulate this.
121633 /* Analyze the list of expressions that form the terms of the index and
121934 /* Ensure all REPLACE indexes on pTab are at the end of the pIndex list.
121935 ** The list was already ordered when this routine was entered, so at this
121953 ** of the index list. In other words, no other index type ever
121954 ** comes after a REPLACE index on the list. */
122475 ** element of the source-list passed as the second argument.
122520 ** Add the list of function arguments to the SrcList entry for a
123048 ExprList *pArglist, /* Optional column name list for the table */
123508 int nDef /* Length of the apDef[] list */
123885 ExprList *pEList = NULL; /* Expression list contaning only pSelectRowid */
125384 ** [...] Matches one character from the enclosed list of
125387 ** [^...] Matches one character not in the enclosed list.
125390 ** in the list by making it the first character after '[' or '^'. A
125393 ** it the last character in the list.
127372 ** map to an explicit list of columns in table pParent. Check if this
127787 ** This function returns a linked list of FKey objects (connected by
128307 ** passed a pointer to the list of columns being modified. If it is a
128336 ExprList *pChanges /* Change-list for UPDATE, NULL for DELETE */
128356 ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */
128532 ExprList *pChanges, /* Change-list for UPDATE, NULL for DELETE */
129196 ** then a list of all (non-hidden) columns for the table is substituted.
129339 /* If the Select object is really just a simple VALUES() list with a
129781 /* A column not named in the insert column list gets its
130115 ** the indexes of a table in the order provided in the Table->pIndex list.
130127 int eType; /* 0 for Index.pNext list. 1 for an array of IndexListTerm */
130128 int i; /* Index of the current item from the list */
130130 struct { /* Use this object for eType==0: A Index.pNext list */
130145 int ix; /* Which entry in the original Table.pIndex list is this index*/
130148 /* Return the first index on the list */
130160 /* Return the next index from the list. Return NULL when out of indexes */
130209 ** the same as the order of indices on the linked list of indices
130225 ** for the first index in the pTab->pIndex list. Cursors for other indices
130226 ** are at iIdxCur+N for the N-th element of the pTab->pIndex list.
130503 ** list of indexes attached to a table puts all OE_Replace indexes last
130504 ** in the list. See sqlite3CreateIndex() for where that happens.
130578 ** (2) Initialize pTrigger to the list of all DELETE triggers on pTab.
131179 /* All REPLACE indexes are at the end of the list */
131237 ** pTab->pIndex list.
133365 ** The following object holds the list of automatically loaded
133368 ** This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN
133369 ** mutex must be held while accessing this list.
133438 ** is currently on the list. If xInit is not on the list, then this
133441 ** Return 1 if xInit was found on the list and removed. Return 0 if xInit
133442 ** was not on the list.
139087 ** Parameter pEList is the list of expressions used to generated the
139225 ** output variable (*ppExtra) is set to an expression list containing
139775 ** Given an expression list, generate a KeyInfo structure that records
139776 ** the collating sequence for each expression in that expression list.
140393 ** Given an expression list (which is really the list of expressions
140395 ** column names for a table that would hold the expression list.
140416 ExprList *pEList, /* Expr list from which to derive column names */
140418 Column **paCol /* Write the new column list here */
140520 ** Add type and collation information to a column list based on
140523 ** The column list presumably came from selectColumnNamesFromExprList().
140524 ** The column list has only names, not types or collations. This
142293 ** expression list. Otherwise, return a pointer to the expression list
142451 ** function in the select list or ORDER BY clause, flattening
142672 ** SELECT <expr-list> FROM (<sub-query>) <where-clause>
143492 ** If the source-list item passed as an argument was augmented with an
143615 ** Argument pWith (which may be NULL) points to a linked list of nested
143683 ** pParse->pWith linked list). And if currently processing a CTE
143967 ** (4) Scan the list of columns in the result set (pEList) looking
144102 /* For every "*" that occurs in the column list, insert the names of
144106 ** list. The following code just has to locate the TK_ASTERISK
144107 ** expressions and expand each one to the list of all columns in
144220 ** result-set list unless the SELECT has the SF_IncludeHidden
145384 ** if the select-list is the same as the ORDER BY list, then this query
145581 struct ExprList_item *pItem; /* For looping over expression in a list */
146379 ** Delete a linked list of TriggerStep structures.
146399 ** Given table pTab, return a list of all the triggers attached to
146400 ** the table. The list is connected by Trigger.pNext pointers.
146405 ** TEMP triggers on pTab to the beginning of the pTab->pTrigger list
146406 ** and returns the combined list.
146408 ** To state it another way: This routine returns a list of all triggers
146409 ** that fire off of pTab. The list will include any TEMP triggers on
146471 IdList *pColumns, /* column list if this is an UPDATE OF trigger */
146897 ExprList *pEList, /* The SET clause: list of column and new values */
147119 ** Return a list of all triggers on table pTab if there exists at least
147250 ** list is of the form "*". Raise an error if the terms if of the
147267 /* The input list pList is the list of result set terms from a RETURNING
147533 ** list of the top-level Parse object sooner rather than later. */
147640 ** in the Parse.pTriggerPrg list. Search for such an entry. */
147698 ** parameter pChanges is passed the list of columns being modified.
147737 ExprList *pChanges, /* Changes list for any UPDATE OF triggers */
147744 Trigger *p; /* Used to iterate through pTrigger list */
147806 ExprList *pChanges, /* Changes list for any UPDATE OF triggers */
147981 ** table in the source-list (pSrc->a[0]).
148231 ** in the change-list. Otherwise, set it to 0. There cannot be a FROM
149210 ** Free a list of Upsert objects
149252 Upsert *pNext /* Next ON CONFLICT clause in the list */
149302 ** includes both the list of columns and the optional partial-index
149420 ** Given the list of ON CONFLICT clauses described by pUpsert, and
150074 ** on the azNames list.
150160 ** p->u.vtab.p list to the sqlite3.pDisconnect lists of their associated
150163 ** connection db is left in the p->u.vtab.p list.
150176 ** this makes it safe to access the sqlite3.pDisconnect list of any
150177 ** database connection that may have an entry in the p->u.vtab.p list.
150203 ** list in p->pVTab. It also decrements the VTable ref count. This is
150227 ** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
150231 ** caller. This is done to protect the sqlite3.pDisconnect list. The
150232 ** sqlite3.pDisconnect list is accessed only as follows:
150238 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex
150269 ** to the head of a linked list of VTable structures. Each VTable
150274 ** in the list are moved to the sqlite3.pDisconnect list of the associated
150319 ** statement. The module name has been parsed, but the optional list
150368 ** in pParse->zArg[] and appends it to the list of arguments on the
150578 ** into the linked list headed by pTab->u.vtab.p. Then loop through the
151828 SrcList *pTabList, /* Table list this loop refers to */
152049 SrcList *pTabList, /* Table list this loop refers to */
154055 SrcList *pOrTab; /* Shortened table list or OR-clause generation */
154083 SrcItem *origSrc; /* Original list of tables */
156417 ** in the expression list ExprList. ExprList can be NULL, in which
157086 ExprList *pList, /* Expression list to search */
157131 ** Return true if the DISTINCT expression-list passed as the third argument
157134 ** A DISTINCT list is redundant if any subset of the columns in the
157135 ** DISTINCT list are collectively unique and individually non-null.
157172 ** list, or else the WHERE clause contains a term of the form "col=X",
157174 ** comparison and select-list expressions must match those of the index.
158583 ** is a list of values. Example:
158599 ExprList *pList, /* The value list on the RHS of "x IN (v1,v2,v3,...)" */
158933 ** Search the list of WhereLoops in *ppPrev looking for one that can be
158936 ** Return NULL if pTemplate does not belong on the WhereLoop list.
158942 ** If pTemplate cannot replace any existing element of the list but needs
158943 ** to be added to the list as a new entry, then return a pointer to the
158944 ** tail of the list.
159076 /* There already exists a WhereLoop on the list that is better
159106 /* Allocate a new WhereLoop to add to the end of the list */
159113 ** go through the rest of the list and delete any other entries besides
161232 ** the planner assumes that the specified pOrderBy list is actually a GROUP
161318 ** Given the list of WhereLoop objects at pWInfo->pLoops, this routine
162014 ** free the Parse->pIdxExpr list when the Parse object is destroyed.
162173 SrcList *pTabList, /* FROM clause: A list of all tables to be scanned */
163147 ** either the select list or ORDER BY clause (the only two places window
163175 ** select-list and ORDER BY expressions in the parent query are
163771 ** linked list of WINDOW definitions for the current SELECT statement.
163777 ** search list pList for a matching WINDOW definition, and update pWin
163871 ** this function appends to the output expression-list and updates
163971 ** Iterate through each expression in expression-list pEList. For each:
163976 ** Window list passed as the second argument (pWin).
163978 ** Append the node to output expression-list (*ppSub). And replace it
163987 ExprList *pEList, /* Rewrite expressions in this list */
163989 ExprList **ppSub /* IN/OUT: Sub-select expression-list */
164014 ** Append a copy of each expression in expression-list pAppend to
164015 ** expression list pList. Return a pointer to the result list.
164099 ExprList *pSublist = 0; /* Expression list for sub-query */
164152 ** sub-select expression list. They are required to figure out where
164158 ** sub-select expression list. Also allocate two registers for each
164273 ** Free the linked list of Window objects starting at the second argument.
164329 ** starting boundary type may not occur earlier in the following list than
164397 ** stored in the linked list starting at pWin->pNextWin. This function
164453 ** Possibly link window pWin into the list at pSel->pWin (window functions
164676 ** in the WindowCodeArg.pMWin list.
164723 Window *pMWin; /* First in list of functions being processed */
164761 ** linked list starting at pMWin. Or, for built-in window functions
164779 Window *pMWin, /* Linked list of window functions */
164890 ** (bFin==1) for each window function in the linked list starting at
164929 ** p->pMWin list by doing a full scan of the current window frame. Store the
165112 ** in the linked list passed as the second argument to NULL. And perform
165114 ** in the list.
165531 ** Return a copy of the linked list of Window objects passed as the
166301 ** Then the "b" IdList records the list "a,b,c".
166341 ** all elements in the list. And make sure list length does not exceed
166433 ** list of identifiers. Report an error if the ID list contains
170448 sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy322,"set list");
178402 ** Head of a linked list of all sqlite3 objects created by this process
178412 ** properties of the blocked connections list:
178414 ** 1) Each entry in the list has a non-NULL value for either
178417 ** 2) All entries in the list that share a common value for
178421 ** blocked connections list have pUnlockConnection or pBlockingConnection
178447 ** Remove connection db from the blocked connections list. If connection
178448 ** db is not currently a part of the list, this function is a no-op.
178462 ** Add connection db to the blocked connections list. It is assumed
178463 ** that it is not already a part of the list.
178580 ** list and does the following:
178582 ** 1) If the sqlite3.pBlockingConnection member of a list entry is
178585 ** 2) If the sqlite3.pUnlockConnection member of a list entry is
178591 ** list.
178604 /* This loop runs once for each entry in the blocked-connections list. */
178673 /* Remove connection p from the blocked connections list. */
178690 ** being closed. The connection is removed from the blocked list.
178763 ** A doclist (document list) holds a docid-sorted list of hits for a
178776 ** array { (position list for column 0)
178780 ** varint POS_COLUMN; (marks start of position list for new column)
178793 ** ending a position list array. POS_END is 0. POS_COLUMN is 1.
178809 ** A "position-list" is the list of positions for multiple columns for
178810 ** a single docid. A "column-list" is the set of positions for a single
178811 ** column. Hence, a position-list consists of one or more column-lists,
178812 ** a document record consists of a docid followed by a position-list and
179251 ** structure. All elements are stored on a single doubly-linked list.
179404 #define POS_COLUMN (1) /* Column-list terminator */
179405 #define POS_END (0) /* Position-list terminator */
179669 char *pList; /* Pointer to position list following iDocid */
179670 int nList; /* Length of position list */
180142 ** varint that is part of a doclist (or position-list, or any other list
180285 /* Create a list of user columns for the virtual table */
180338 /* Create a list of user columns for the content table */
180506 ** Return a list of comma separated SQL expressions and a FROM clause that
180509 ** SELECT <list of expressions> FROM %_content AS x ...
180566 ** Return a list of N comma separated question marks, where N is the number
181706 ** varints. Each call to this function appends a single varint to a list.
181710 sqlite3_int64 *piPrev, /* IN/OUT: Previous value written to list */
181711 sqlite3_int64 iVal /* Write this value to the list */
181720 ** start of a position-list. After it returns, *ppPoslist points to the
181721 ** first byte after the position-list.
181723 ** A position list is list of positions (delta encoded) and columns for
181728 ** If pp is not NULL, then the contents of the position list are copied
181736 /* The end of a position list is marked by a zero encoded as an FTS3
181744 ** last byte in the position-list.
181764 ** start of a column-list. After it returns, *ppPoslist points to the
181765 ** to the terminator (POS_COLUMN or POS_END) byte of the column-list.
181767 ** A column-list is list of delta-encoded positions for a single column
181770 ** The column-list is terminated either by a POS_COLUMN varint (1) or
181772 ** the POS_COLUMN or POS_END that terminates the column-list.
181774 ** If pp is not NULL, then the contents of the column-list are copied
181783 /* A column-list is terminated by either a 0x01 or 0x00 byte that is
181801 ** Value used to signify the end of an position-list. This must be
181803 ** position-list, even a position list that has been corrupted.
181809 ** called, *pp may point to the start of the next varint in the position-list
181810 ** being parsed, or it may point to 1 byte past the end of the position-list
181814 ** If *pp points past the end of the current position-list, set *pi to
181821 ** in the position-list. Because positions are delta-encoded, the value
181826 char **pp, /* IN/OUT: Pointer into position-list buffer */
181827 sqlite3_int64 *pi /* IN/OUT: Value read from position-list */
181842 ** column list.
181868 char **pp1, /* Left input list */
181869 char **pp2 /* Right input list */
181903 ** A column-list is a list of non-negative delta-encoded varints, each
181904 ** incremented by 2 before being stored. Each list is terminated by a
181907 ** after the list written. No terminator (POS_END or POS_COLUMN) is
181945 ** called, *pp1 and *pp2 must both point to position lists. A position-list is
181951 ** Then the position list for this row for token 'b' would consist of:
181958 ** If isSaveLeft is 0, an entry is added to the output position list for
181971 char **pp1, /* IN/OUT: Left input list */
181972 char **pp2 /* IN/OUT: Right input list */
182046 ** end of the position list, or the 0x01 that precedes the next
182047 ** column-number in the position list.
182081 ** Position list *pp1 corresponds to the left-hand side of the NEAR
182086 ** The output position list - written to *pp - is a copy of *pp2 with those
182094 char **pp1, /* IN/OUT: Left input list */
182095 char **pp2 /* IN/OUT: Right input list */
182184 sqlite3_int64 *piPrev, /* IN/OUT: Previous value written to list */
182186 sqlite3_int64 iVal /* Write this value to the list */
182253 ** then the first docid in each list is simply encoded as a varint. For
182255 ** current and previous docid (a positive number - since the list is in
182260 ** read from. And each subsequent docid read from the same input list
182264 ** the input list). The same argument applies to all but the first docid
182265 ** read from the 'other' list. And to the contents of all position lists
182269 ** then the encoding of the first docid from the 'other' input list may
182396 ** Argument pList points to a position list nList bytes in size. This
182397 ** function checks to see if the position list contains any entries for
182399 ** to the output buffer pOut, followed by a position list consisting only
182405 char *pList, /* Position list (no 0x00 term) */
182857 ** contains a position-list following each docid. Otherwise, it is assumed
182858 ** that the doclist is simply a list of docids stored as delta encoded
182869 fts3PoslistCopy(0, &p); /* Skip over position list */
183278 ** end of a position-list. i.e. ( (*ppPoslist)[-1]==POS_END ). This function
183280 ** same position list.
183940 ** current position list to include only those positions that are really
183949 char *aPoslist = 0; /* Position list for deferred tokens */
184244 ** list for document pDL->iDocid. However, if this position-list was
184817 ** Invalidate the current position list for phrase pPhrase.
184829 ** This function is called to edit the position list associated with
184837 ** the position list, and *pnToken is the number of phrase tokens in the
184840 ** the position list associated with phrase "abc".
184842 ** All positions in the pPhrase position list that are not sufficiently
184843 ** close to a position in the *paPoslist position list are removed. If this
184853 char **paPoslist, /* IN/OUT: Position list */
184899 ** at EOF, then the following variables are populated with the position list
184903 ** FTs3Expr.pPhrase->doclist.pList (pointer to position list)
184910 ** the db. In this case the position-list is not populated at all.
184917 ** where "*" may match any single token. The position list in this case
185062 ** If the current row is a match, the position list associated with each
185270 ** memory and scan it to determine the position list for each deferred
185374 ** the values in Fts3Expr.aMI[] according to the position-list currently
185566 ** a position-list indicating the occurrences of the phrase in column iCol
185572 ** if the requested column contains "a b X c d X X" and the position-list
185583 int iCol, /* Column to return position list for */
185584 char **ppOut /* OUT: Pointer to position list */
186076 ** start of a position list for column 0.
187190 /* Link pParent into the free node list. It will be used as an
187219 ** and pFree list. Everything else is cleaned up by the call to
187841 Fts3HashElem *elem; /* Used to loop thru the element list */
187948 Fts3HashElem *elem; /* Used to loop thru the element list */
188914 ** list. For each token in the <input-string>, three elements are
188915 ** added to the returned list. The first is the token position, the
189998 ** Each cursor has a (possibly empty) linked list of the following objects.
190003 Fts3DeferredToken *pNext; /* Next in list of deferred tokens */
190262 ** Return the list of valid segment indexes for absolute level ? */
190559 /* Append the new serialized varint to the end of the list. */
190750 ** fts3PendingTermsAdd() are to add term/position-list pairs for the
191355 ** *ppOffsetList is set to point to the first column-offset list
191363 char **ppOffsetList, /* OUT: Pointer to current position-list */
191393 /* Pointer p currently points at the first byte of an offset list. The
191395 ** the same offset list. */
191414 ** size of the previous offset-list.
191426 ** Fts3SegReader.pOffsetList to point to the next offset list before
191801 /* Check that the list really is sorted now. */
192497 ** a position list that may (or may not) feature multiple columns. This
192499 ** identify the subset of the position list that corresponds to column iCol.
192501 ** If there are no entries in the input position list for column iCol, then
192504 ** If parameter bZero is non-zero, then any part of the input list following
192505 ** the end of the output list is zeroed before returning.
192510 char **ppList, /* IN/OUT: Pointer to position list */
192574 char **paPoslist, /* OUT: Pointer to position list */
192575 int *pnPoslist /* OUT: Size of position list in bytes */
192794 ** forward. Then sort the list in order of current term again.
195358 ** Free all entries in the pCsr->pDeffered list. Entries are added to
195359 ** this list using sqlite3Fts3DeferToken().
195373 ** Generate deferred-doclists for all tokens in the pCsr->pDeferred list
195461 ** Add an entry for token pToken to the pCsr->pDeferred list.
195777 char *pList; /* Pointer to start of phrase position list */
195778 i64 iHead; /* Next value in position list */
195779 char *pHead; /* Position list data following iHead */
195780 i64 iTail; /* Next value in trailing position list */
195781 char *pTail; /* Position list data following iTail */
195925 ** This function is used to help iterate through a position-list. A position
195926 ** list is a list of unique integers, sorted from smallest to largest. Each
195927 ** element of the list is represented by an FTS3 varint that takes the value
195929 ** two. For example, to store the position-list:
195940 ** the list. *piPos contains the value of the previous entry in the list.
195942 ** list and *pp is advanced to the following varint.
196049 ** Advance the position list iterator specified by the first two
196538 ** This function is used to count the entries in a column-list (a
196539 ** delta-encoded list of term offsets within a single column of a single
196541 ** beginning of the first varint in the column-list (the varint that
196544 ** the last varint in the column-list (either the 0x00 signifying the end
196545 ** of the position-list, or the 0x01 that precedes the column number of
196546 ** the next column in the position-list).
196548 ** The number of elements in the column-list is returned.
196555 /* A column-list is terminated by either a 0x01 or 0x00. */
196783 ** iterating through a multi-column position-list corresponding to the
196814 ** position list for the next column.
197248 char *pList; /* Position-list */
197268 char *pList; /* Pointer to position list for phrase */
197269 i64 iPos = 0; /* First position in position-list */
203747 ** the Rtree.pDeleted list. Its contents will be re-inserted later on.
204805 ** The human readable string takes the form of a Tcl list with one
204807 ** list, containing the 8-byte rowid/pageno followed by the
206227 GeoEvent *pNext; /* Next event in the sorted list */
206235 GeoSegment *pNext; /* Next segment in a list sorted by y */
206329 ** Sort an array of nEvent event objects into a list.
206378 ** Sort a list of GeoSegments in order of increasing Y and in the event of
207238 ** contains the geometry-checking callback routines and a list of
210241 ** string containing some SQL clause or list based on one or more of the
210260 ** Return a comma separated list of the quoted PRIMARY KEY column names,
210469 ** This function is used to create a SELECT list (the list of SQL
210627 /* For a table with implicit rowids, append "old._rowid_" to the list. */
210693 ** Return a nul-terminated string containing the comma separated list of
210856 char *zCols = 0; /* Used to build up list of table cols */
211410 ** last object in the list. */
213246 ** to point to the new file. A mutex protected linked list of all main
213325 ** main list and is only added to the pDb!=0 list.
213363 ** either the xOpen() or xAccess() VFS method, search the main-db list for
213483 rbuPutU32(&aBuf[32], 0); /* first page on free list trunk */
213916 ** mutex protected linked list of all such files. */
215625 ** stored in a linked list starting at sqlite3_session.pTable.
217369 /* Add the new session object to the linked list of session objects
217382 ** Free the list of table objects passed as the first argument. The contents
217414 /* Unlink the session from the linked list of sessions attached to the
217486 /* Populate the new SessionTable object and link it into the list.
217487 ** The new object must be linked onto the end of the list, not
220691 /* Search the list for a matching table */
220714 /* The new object must be linked on to the end of the list, not
220798 ** hash tables attached to the SessionTable objects in list p->pList.
222238 const u8 *a; /* Position list to iterate through */
225225 ** Append position iPos to the position list being accumulated in buffer
225227 ** The previous position written to this list is *piPrev. *piPrev is set
226137 ** a comma-separated list of SQL literals followed by a ')' character.
226165 ** + Zero or more SQL literals in a comma separated list
226467 Fts5ExprTerm *pSynonym; /* Pointer to first in list of synonyms */
226476 Fts5Buffer poslist; /* Current position list */
226998 const u8 *a; /* Buffer containing position list */
227000 int i; /* Current offset in position list */
227016 const u8 *a, int n, /* Buffer to read position list from */
227046 ** If no error occurs and non-zero (a match) is returned, the position-list
227112 /* Add an entry to each output position list */
229211 ** This function is used to access the current position list for phrase
229485 ** key immediately follows the object in memory. The position list
229492 ** * Position list, without 0x00 terminator.
229493 ** * Size of previous position list and rowid, as a 4 byte
229836 ** single list and returns a pointer to its first element.
229879 ** Extract all tokens from hash table iHash and link them into a list
229882 ** list.
230077 ** of a single 32-bit configuration cookie value followed by a list of
230100 ** A single record within the %_data table. The data is a list of varints.
230197 ** * A list of varints, one for each subsequent termless page. A
230210 ** * A list of delta-encoded varints - the first rowid on each subsequent
230399 ** position list data (one byte passed the position-list size field).
230401 ** position list data. The exception is if the rowid for the current entry
230428 ** start of the "position-list-size" field within the page.
230462 int nPos; /* Number of bytes in current position list */
231621 ** position list size field. Read the varint and return the number of bytes
231623 ** list, and *pbDel to true if the delete flag is set, or false otherwise.
231637 ** position-list size field. Read the value of the field and store it
231644 ** position list content (if any).
231705 ** the first position list. The position list belonging to document
231799 ** the position-list size field for the first relevant rowid on the page.
231806 ** byte of the position list content associated with said rowid.
231915 ** position-list.
232048 /* Search for the end of the position list within the current page. */
232177 ** position-list content for the current rowid. Back it up so that it
232178 ** points to the start of the position-list size field. */
232217 ** pIter->iLeafOffset is already set to point to the position-list size
233170 ** function appends the position list data for the current entry to
233171 ** buffer pBuf. It does not make a copy of the position-list size
233208 ** Parameter pPos points to a buffer containing a position list, size nPos.
233210 ** and sets pIter->base.pData/nData to point to the new position list.
233211 ** If memory is required for the new position list, use buffer pIter->poslist.
233212 ** Or, if the new position list is a contiguous subset of the input, set
233222 const u8 *pPos, int nPos, /* Position list */
233228 const u8 *pEnd = &p[nPos]; /* One byte past end of position list */
233322 ** fts5IterSetOutputs_Col100 if the column-list spans more than one page.
234068 ** Append a rowid and position-list size field to the writers output.
234360 int nPos; /* position-list size field value */
234394 /* Append the position-list data to the output */
234553 ** Buffer aBuf[] contains a list of varints, all small enough to fit
234555 ** list nMax bytes or less in size.
234899 /* Read position list size */
234974 ** In this case the buffers consist of a delta-encoded list of rowids only.
234978 Fts5Buffer *p1, /* First list to merge */
235022 i64 iPos; /* For iterating through a position list */
235063 Fts5Buffer *p1, /* First list to merge */
235079 ** a linked-list starting at pHead in ascending order of rowid. Avoid
235080 ** linking any iterators already at EOF into the linked list at all. */
235104 ** position-list, hence (nBuf+1) 10 byte paddings. */
236445 ** Buffer (a/n) is assumed to contain a list of serialized varints. Read
236503 ** tables. This function appends a human-readable version of that list to
236514 const u8 *pData, int nData /* Data to decode list-of-rowids from */
236672 /* Decode the position list tail at the start of the page */
236910 Fts5Auxiliary *pAux; /* First in list of all aux. functions */
236911 Fts5TokenizerModule *pTok; /* First in list of all tokenizer modules */
236913 Fts5Cursor *pCsr; /* First in list of all open cursors */
236919 ** of the Fts5Global.pAux list.
236933 ** of the Fts5Global.pTok list.
236965 ** byte of the position list for the corresponding phrase.
236997 Fts5Cursor *pNext; /* Next cursor in Fts5Cursor.pCsr list */
237022 Fts5Auxdata *pAuxdata; /* First in linked list of saved aux-data */
237071 Fts5Auxdata *pNext; /* Next object in linked list */
237619 /* Remove the cursor from the Fts5Global.pCsr list */
238934 /* Search through the cursors list of Fts5Auxdata objects for one that
239228 ** Return a "position-list blob" corresponding to the current position of
239229 ** cursor pCsr via sqlite3_result_blob(). A position-list blob contains
239230 ** the current position-list for each phrase in the query associated with
239233 ** A position-list blob begins with (nPhrase-1) varints, where nPhrase is
239237 ** The first varint (if it exists) contains the size of the position list
239239 ** list 1. And so on. There is no size field for the final position list,
243983 const u8 *pPos; int nPos; /* Position list */
243985 int iOff = 0; /* Current offset within position list */