Lines Matching refs:routine

709 ** routine returns SQLITE_ABORT without invoking the callback again and
762 #define SQLITE_ABORT 4 /* Callback routine requested an abort */
1882 ** ^The sqlite3_initialize() routine initializes the
1883 ** SQLite library. ^The sqlite3_shutdown() routine
1911 ** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.
1916 ** ^The sqlite3_initialize() routine is called internally by many other
1931 ** The sqlite3_os_init() routine does operating-system specific
1933 ** routine undoes the effect of sqlite3_os_init(). Typical tasks
1965 ** applications and so this routine is usually not necessary. It is
1991 ** then this routine returns a non-zero [error code].
2833 ** ^The sqlite3_extended_result_codes() routine enables or disables the
2871 ** ^(If an [INSERT] occurs within a trigger then this routine will
2874 ** by this routine reverts to what it was before the trigger was fired.)^
2878 ** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
2880 ** routine when their insertion fails. ^(When INSERT OR REPLACE
2886 ** ^For the purposes of this routine, an [INSERT] is considered to
3020 ** return at its earliest opportunity. This routine is typically
3025 ** ^It is safe to call this routine from a thread different from the
3027 ** is not safe to call this routine with a [database connection] that
3098 ** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X
3158 ** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
3165 ** ^Calling this routine with an argument less than or equal to zero
3171 ** this routine, that other busy handler is cleared.)^
3243 ** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access
3277 ** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from
3296 ** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().
3313 ** ^The sqlite3_malloc() routine returns a pointer to a block
3320 ** ^The sqlite3_malloc64(N) routine works just like
3326 ** that it might be reused. ^The sqlite3_free() routine is
3394 ** ^The [sqlite3_memory_used()] routine returns the number of bytes
3396 ** ^The [sqlite3_memory_highwater()] routine returns the maximum
3422 ** ^A call to this routine stores N bytes of randomness into buffer P.
3425 ** ^If this routine has not been previously called or if the previous
3429 ** ^If the previous call to this routine had an N of 1 or more and a
3441 ** ^This routine registers an authorizer callback with a particular
4094 ** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean
4096 ** of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the
4105 ** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a
4120 ** into the xOpen VFS method, then the behavior of this routine is undefined
4177 ** This routine is intended for use in custom [VFS] implementations
4183 ** of this routine results in undefined and probably undesirable
4220 ** The sqlite3_free_filename(Y) routine releases a memory allocation
4498 ** The preferred routine to use is [sqlite3_prepare_v2()]. The
4714 ** ^This routine returns false if there is any possibility that the
4768 ** This routine returns SQLITE_OK if the explain mode is successfully
4957 ** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
4965 ** ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in
4971 ** literal. The sqlite3_bind_pointer() routine is part of the
4978 ** routine is passed a [prepared statement] that has been finalized, the
4981 ** ^Bindings are not cleared by the [sqlite3_reset()] routine.
5015 ** ^This routine can be used to find the number of [SQL parameters]
5021 ** ^(This routine actually returns the index of the largest (rightmost)
5084 ** ^Use this routine to reset all host parameters to NULL.
5093 ** [prepared statement]. ^If this routine returns 0, that means the
5095 ** ^However, just because this routine returns a positive number does not
5122 ** ^If sqlite3_malloc() fails during the processing of either routine
5203 ** this routine would return the string "VARIANT" for the second result
5265 ** [SQLITE_MISUSE] means that the this routine was called inappropriately.
5309 ** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.
5310 ** ^The sqlite3_data_count(P) routine returns 0 if the previous call to
5407 ** ^The sqlite3_column_type() routine returns the
5425 ** routine returns the number of bytes in that BLOB or string.
5434 ** routine returns the number of bytes in that BLOB or string.
5588 ** ^The sqlite3_finalize(S) routine can be called at any point during
5999 ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
6099 ** This routine is intended for used by applications that test and validate
6100 ** the SQLite implementation. This routine is inquiring about the opaque
6115 ** routine to set the subtype for the return value of an SQL function.
6148 ** routine to allocate memory for storing their state.
6150 ** ^The first time the sqlite3_aggregate_context(C,N) routine is called
6163 ** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer
6180 ** to the xStep or xFinal callback routine that implements the aggregate
6183 ** This routine must be called from the same thread in which
6198 ** This routine must be called from the same thread in which
6500 ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
6885 ** connection while this routine is running, then the return value
6935 ** ^The string value returned by this routine is owned and managed by
6944 ** If the filename pointer returned by this routine is not NULL, then it
7026 ** satisfies the conditions of this routine, it returns NULL.
7067 ** ^When the commit hook callback routine returns zero, the [COMMIT]
7208 ** ^(This routine enables or disables the sharing of the database cache
7228 ** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled
7232 ** that way. In other words, do not use this routine. This interface
7260 ** ^The sqlite3_release_memory() routine is a no-op returning zero
7353 ** interface. This routine is provided for historical compatibility
7364 ** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns
7372 ** NULL pointer, then this routine simply checks for the existence of the
7502 ** ^Call the sqlite3_enable_load_extension() routine with onoff==1
7540 ** If the xEntryPoint routine encounters an error, it should make *pzErrMsg
7561 ** initialization routine X that was registered using a prior call to
7563 ** routine returns 1 if initialization routine X was successfully
8118 ** unconditionally. Even if this routine returns an error code, the
8128 ** open blob handle results in undefined behavior. ^Calling this routine
8145 ** This routine only works on a [BLOB handle] which has been created
8148 ** to this routine results in undefined and probably undesirable behavior.
8172 ** This routine only works on a [BLOB handle] which has been created
8175 ** to this routine results in undefined and probably undesirable behavior.
8214 ** This routine only works on a [BLOB handle] which has been created
8217 ** to this routine results in undefined and probably undesirable behavior.
8289 ** ^The sqlite3_mutex_alloc() routine allocates a new
8291 ** routine returns NULL if it is unable to allocate the requested
8338 ** ^The sqlite3_mutex_free() routine deallocates a previously
8361 ** ^The sqlite3_mutex_leave() routine exits a mutex that was
8396 ** ^The xMutexInit routine is called by SQLite exactly once for each
8477 ** the routine should return 1. This seems counter-intuitive since
8529 ** routine returns a NULL pointer.
8546 ** ^The third and fourth parameters to this routine
8549 ** method becomes the return value of this routine.
8657 ** zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns
8957 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
9574 ** ^The sqlite3_backup_remaining() routine returns the number of pages still
9576 ** ^The sqlite3_backup_pagecount() routine returns the total number of pages
9771 ** Note that this routine returns zero on a match and non-zero if the strings
9794 ** Note that this routine returns zero on a match and non-zero if the strings
9816 ** To avoid deadlocks and other threading problems, the sqlite3_log() routine
10143 ** If the sqlite3_vtab_nochange(X) routine is called within the [xColumn]
10158 ** The sqlite3_vtab_nochange() routine is an optimization. Virtual table
10406 ** J being a 0-based index into P->aConstraint[], then this routine
10432 ** The "_rhs_" in the name of this routine is an abbreviation for
10886 ** using this routine to avoid a memory leak.
15236 ** The sqlite3DbFree() routine requires two parameters instead of the
15385 ** on the sqlite3VListAdd() routine for more information. A VList is really
15834 ** a detailed description of each routine.
15987 ** of what each interface routine does.
16481 ** A sub-routine used to implement a trigger program.
16797 /* The resolve3P2Values() routine is able to run faster if it knows
16993 ** routine in vdbe.c, alerting the developer to the missed tag.
16997 ** routine that is invoked as each bytecode branch is taken. The callback
18209 ** a comparison routine that defines the order of that sequence.
19207 int regResult; /* Registers holding results of a co-routine */
19215 unsigned viaCoroutine :1; /* Implemented as a co-routine */
19419 ** See the header comment on the computeLimitRegisters() routine for a
19534 ** SRT_Coroutine Generate a co-routine that returns a new row of
19536 ** of the co-routine is stored in register pDest->iSDParm
19698 void (*xCleanup)(sqlite3*,void*); /* Deallocation routine */
19703 ** the parser and down into all the parser action routine in order to
20172 int (*xAltLocaltime)(const void*,void*); /* Alternative localtime() routine */
20566 ** The alloca() routine never returns NULL. This will cause code paths
21598 ** sqlite3IoTrace is a pointer to a printf-like routine used to
23812 ** The StatusUp() routine can accept positive or negative values for N.
23816 ** The StatusDown() routine lowers the current value by N. The highwater
24635 ** The following routine implements the rough equivalent of localtime_r()
24637 ** is available. This routine returns 0 on success and
24641 ** routine will always fail. If bLocaltimeFault is nonzero and
25574 ** routine.
25732 ** functions. This should be the only routine in this file with
25885 ** routine has no return value since the return value would be meaningless.
26338 ** This routine is the only routine in this file with external linkage.
26484 ** For this low-level routine, we are guaranteed that nByte>0 because
26518 ** For this low-level routine, we already know that pPrior!=0 since
26555 ** pPrior==0 while have been intercepted by higher-level routine and
26632 ** This routine is the only routine in this file with external linkage.
26803 ** This routine checks the guards at either end of the allocation and
27048 ** This routine is designed for use within an assert() statement, to
27070 ** This routine is designed for use within an assert() statement, to
27489 ** This routine examines all entries on the given list and tries
27496 ** affairs, of course. The calling routine must link the key
27497 ** chunk before invoking this routine, then must unlink the (possibly
27498 ** changed) key chunk once this routine has finished.
27848 ** This routine is the only routine in this file with external
27855 ** This routine is only called by sqlite3_config(), and therefore
28092 ** routine so there is never any chance that two or more
28093 ** threads can be in this routine at the same time.
28244 ** The outer layer memory allocator prevents this routine from
28257 ** The outer layer memory allocator prevents this routine from
28264 ** routine should return 0 without freeing pPrior.
28331 ** This routine is not threadsafe. The caller must be holding a mutex
28343 /* For the purposes of this routine, disable the mutex */
28442 ** This routine is the only routine in this file with external
28797 ** The sqlite3_mutex_leave() routine exits a mutex that was previously
28811 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
28913 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
28932 ** The sqlite3_mutex_alloc() routine allocates a new
28965 ** This routine deallocates a previously allocated mutex.
29003 ** The sqlite3_mutex_leave() routine exits a mutex that was
29107 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
29151 ** The sqlite3_mutex_alloc() routine allocates a new
29265 ** This routine deallocates a previously
29390 ** The sqlite3_mutex_leave() routine exits a mutex that was
29597 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
29699 ** The sqlite3_mutex_alloc() routine allocates a new
29790 ** This routine deallocates a previously
29849 ** The sqlite3_mutex_try() routine is very rarely used, and when it
29886 ** The sqlite3_mutex_leave() routine exits a mutex that was
29963 /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
30231 ** Allocate memory. This routine is like sqlite3_malloc() except that it
30753 ** Call this routine to record the fact that an OOM (out-of-memory) error
30754 ** has happened. This routine will set db->mallocFailed, and also
30758 ** Always return a NULL pointer so that this routine can be invoked using
30786 ** This routine reactivates the memory allocator and clears the
31797 ** to avoid having to call this routine too often */
31843 ** This is a helper routine to sqlite3_str_append() that does special-case
31845 ** sqlite3_str_append() routine can use fast calling semantics.
32135 ** This is the routine that actually formats the sqlite3_log() message.
32136 ** We house it in a separate routine from sqlite3_log() to avoid using
32250 ** This routine returns 0 on an OOM.
33689 ** the first time this routine is called.
33800 void *(*xTask)(void*); /* The thread routine */
33815 /* This routine is never used in single-threaded mode */
33871 void *(*xTask)(void*); /* The routine to run as a thread */
33974 void *(*xTask)(void*); /* The routine to run as a thread */
34149 ** * This routine never allows a 7-bit character (0x00 through 0x7f) to
34153 ** * This routine never allows a UTF16 surrogate value to be encoded.
34162 ** * This routine accepts over-length UTF8 encodings
34183 ** For this routine, we assume the UTF8 string is always zero-terminated.
34240 ** This routine transforms the internal text encoding used by pMem to
34431 ** This routine checks for a byte-order mark at the beginning of the
34433 ** the encoding of the Mem adjusted. This routine does not do any
34570 ** This routine is called from the TCL test function "translate_selftest".
34704 ** a separate routine to avoid unnecessary register saves on entry to
34871 ** input does not begin with a quote character, then this routine
34881 ** 2002-02-14: This routine is extended to remove MS-Access style
34922 ** system should still return the correct answer even if this routine
35071 ** If some prefix of the input string is a valid number, this routine
35332 ** Unlike memcmp() this routine is guaranteed to return the difference
35359 ** routine does *not* accept hexadecimal notation.
35466 ** into a 64-bit signed integer. This routine accepts hexadecimal literals,
35504 ** This routine accepts both decimal and hexadecimal notation for integers.
36074 ** This routine only works if h really is a valid hexadecimal
36093 ** the calling routine.
36127 ** NULL or which have been previously closed. If this routine returns
36482 ** The following routine only works on Pentium-class (or newer) processors.
36537 ** disable the sqlite3Hwtime() routine.
36586 ** Call this routine to delete a hash table or to reset a hash table
37254 ** this routine is a no-op.
37274 ** If nBuf<=0 then this routine simply returns the size of the data without
38001 ** This routine is called initialize the KV-vfs as the default VFS.
38840 ** This routine is used for troubleshooting locks on multithreaded
38919 ** This routine translates a standard POSIX errno code into something
39257 ** This routine is used only within assert() to help verify correct mutex
39386 ** The global mutex must be held when this routine is called, but the mutex
39422 ** The global mutex must held when calling this routine.
39567 ** This routine checks if there is a RESERVED lock held on the specified
39619 ** There are two versions of this routine. If compiled with
39620 ** SQLITE_ENABLE_SETLK_TIMEOUT then the routine has an extra parameter
39720 ** This routine will only increase a lock. Use the sqlite3OsUnlock()
39721 ** routine to lower a locking level.
39965 ** the requested locking level, this routine is a no-op.
40131 ** the requested locking level, this routine is a no-op.
40151 ** It is *not* necessary to hold the mutex when this routine is called,
40153 ** vxworksReleaseFileId() routine.
40202 ** routine (e.g. nolockClose()) would be called instead.
40295 ** This routine checks if there is a RESERVED lock held on the specified
40339 ** This routine will only increase a lock. Use the sqlite3OsUnlock()
40340 ** routine to lower a locking level.
40391 ** the requested locking level, this routine is a no-op.
40479 ** This routine checks if there is a RESERVED lock held on the specified
40561 ** This routine will only increase a lock. Use the sqlite3OsUnlock()
40562 ** routine to lower a locking level.
40606 ** the requested locking level, this routine is a no-op.
40666 ** This routine checks if there is a RESERVED lock held on the specified
40735 ** This routine will only increase a lock. Use the sqlite3OsUnlock()
40736 ** routine to lower a locking level.
40769 ** the requested locking level, this routine is a no-op.
40909 ** This routine checks if there is a RESERVED lock held on the specified
40980 ** This routine will only increase a lock. Use the sqlite3OsUnlock()
40981 ** routine to lower a locking level.
41163 ** the requested locking level, this routine is a no-op.
41305 ** the requested locking level, this routine is a no-op.
41433 ** routine.
41737 ** This routine can be overridden using the xSetSysCall interface.
41738 ** The ability to override this routine was added in support of the
41741 ** replace this routine with a harmless no-op. To make this routine
41921 ** nBytes or larger, this routine is a no-op.
43241 ** routine is a harmless no-op.
44174 ** In most cases, this routine sets *pMode to 0, which will become
44780 ** cast into a pointer to a function. And yet the library dlsym() routine
45824 ** This routine find the filename associated with pFile and writes it
45942 ** This routine handles sqlite3_file_control() calls that are specific
46013 ** This routine checks if there is a RESERVED lock held on the specified
46054 ** This routine will only increase a lock. Use the sqlite3OsUnlock()
46055 ** routine to lower a locking level.
46079 ** the requested locking level, this routine is a no-op.
46152 ** This routine registers all VFS implementations for unix-like operating
46153 ** systems. This routine, and the sqlite3_os_end() routine that follows,
46157 ** This routine is called once during SQLite initialization and by a
46159 ** necessarily been initialized when this routine is called, and so they
46288 ** Some operating systems might need to do some cleanup in this routine,
46290 ** This routine is a no-op for unix.
47031 /* The GetProcAddressA() routine is only available on Windows CE. */
47675 ** The following routine suspends the current thread for at least ms
47712 ** this routine is used to determine if the host is Win95/98/ME or
47949 ** This routine is only called by sqlite3_config(), and therefore
48374 ** This routine is invoked after an error occurs in an OS function.
48451 ** If a ReadFile() or WriteFile() error occurs, invoke this routine
49538 ** This routine will only increase a lock. The winUnlock() routine
49682 ** This routine checks if there is a RESERVED lock held on the specified
49716 ** the requested locking level, this routine is a no-op.
49718 ** It is not possible for this routine to fail if the second argument
49719 ** is NO_LOCK. If the second argument is SHARED_LOCK then this routine
53136 ** files, none of which exist in memdb. So this routine is never used */
53425 ** This routine is called when the extension is loaded.
53606 ** This routine might cause sub-bitmaps to be allocated. Failing
53753 ** This routine runs an extensive test of the Bitvec code.
53967 ** This routine runs inside of assert() statements only.
53993 ** This routine is for use inside of assert() statements only. For
54241 ** This routine returns a pointer to an sqlite3_pcache_page object if
54243 ** This routine returns a NULL pointer if the object was not in cache
54294 ** If the sqlite3PcacheFetch() routine is unable to allocate a new
54296 ** size limit has been reached, then this routine can be invoked to
54297 ** try harder to allocate a page. This routine might invoke the stress
54302 ** This routine should be invoked only after sqlite3PcacheFetch() fails.
54352 ** This is a helper routine for sqlite3PcacheFetchFinish()
54355 ** initialized, this routine is invoked to do the initialization.
54356 ** This routine is broken out into a separate function since it
54381 ** This routine converts the sqlite3_pcache_page object returned by
54382 ** sqlite3PcacheFetch() into an initialized PgHdr object. This routine
54561 /* This routine never gets call with a positive pgno except right
55069 ** This routine is called from sqlite3_initialize() and so it is guaranteed
55138 ** Multiple threads can run this routine at the same time. Global variables
55794 ** There are two versions of this routine. pcache1FetchWithMutex() is
55797 ** invokes the appropriate routine.
56017 ** sqlite3_status() routine needs access to this mutex.
56229 ** the RowSet has allocated over its lifetime. This routine is
56249 ** the RowSet has allocated over its lifetime. This routine is
56263 ** routine returns NULL.
56294 /* This routine is never called after sqlite3RowSetNext() */
56480 ** After this routine has been called, the sqlite3RowSetInsert()
56481 ** routine may not be called again.
56483 ** This routine may not be called after sqlite3RowSetTest() has
56525 /* This routine is never called after sqlite3RowSetNext() */
57269 ** the pcache module to the pagerStress() routine to write cached data
57386 ** routine operation. Class members not in this block are either fixed
57444 void (*xReiniter)(DbPage*); /* Call this routine when reloading pages */
57738 ** This routine has external linkage in order to suppress compiler warnings
57792 ** Set the Pager.xGet method for the appropriate routine used to fetch
58174 ** The journal file must be open when this routine is called. A journal
58423 ** created by a process other than this one, then this routine
58425 ** of Pager.sectorSize is restored at the end of that routine.
58730 ** This routine ends a transaction. A transaction is usually ended by
58731 ** either a COMMIT or a ROLLBACK operation. This routine may be called
58736 ** This routine is never called in PAGER_ERROR state. If it is called
59235 ** This routine checks if it is possible to delete the super-journal file,
59725 /* If there was a super-journal and this routine will return success,
59819 ** routine which only updates the change-counter if the update is actually
59914 ** The list of pages passed into this routine is always sorted by page number.
59979 ** This routine used to be called "pagerOpenSnapshot()" because it essentially
60627 /* This routine is only called by btree immediately after creating
60702 ** routine, pagerStress() would not write the current page content to
60762 ** size of the journal file so that the pager_playback() routine knows
60889 ** If a transaction was in progress when this routine is called, that
61004 ** If successful, this routine clears the PGHDR_NEED_SYNC flag of every
61350 ** while in the error state, hence it is impossible for this routine to
61842 ** This routine does not check if there is a super-journal filename
61845 ** case this routine will return a false-positive. The pager_playback()
61846 ** routine will discover that the journal file is not really hot and
61880 ** is the case, this routine might think there is a hot journal when
61882 ** be dealt with by the playback routine. Ticket #3883.
61978 /* This routine is only called from b-tree and only when there are no
62087 ** pager_unlock() routine will be called before returning to unlock
62190 ** nothing to rollback, so this routine is a no-op.
62248 ** See also sqlite3PagerLookup(). Both this routine and Lookup() attempt
62250 ** in memory, this routine goes to disk to read it in whereas Lookup()
62251 ** just returns 0. This routine acquires a read-lock the first time it
62474 ** See also sqlite3PagerGet(). The difference between this routine
62476 ** in the page if the page is not already in cache. This routine
62501 ** Use sqlite3PagerUnrefPageOne() to release page1. This latter routine
62514 /* Do not use this routine to release the last reference to page1 */
62533 ** file when this routine is called.
62561 ** the other hand, this routine is never called if we are already in
62773 /* This routine is not called unless a write-transaction has already
62858 ** case pages can be individually written. This routine only runs in the
62942 ** Mark a data page as writeable. This routine must be called before
62945 ** this routine returns SQLITE_OK.
62985 ** A call to this routine tells the pager that it is not necessary to
62991 ** The overlying software layer calls this routine when all of the data
63017 ** This routine is called to increment the value of the database file
63024 ** See also the pager_write_changecounter() routine that does an
63166 ** This routine ensures that:
63426 /* This routine should not be called if a prior error has occurred.
63573 ** This routine is used for testing and analysis only.
63800 ** nullIfMemDb is true. This routine is called with nullIfMemDb==1 when
63806 ** The return value to this routine is always safe to use with
63860 ** in the rollback journal, it is not put there by by this routine.
63866 ** A transaction must be active when this routine is called. It used to be
64093 /* This routine is only called from the OP_JournalMode opcode, and
65596 ** Names of locks. This routine is used to provide debugging output and is not
65921 ** This routine first tries to establish an exclusive lock on the
65926 ** the necessary locks, this routine returns SQLITE_BUSY.
66081 ** setting the final value, this alternative copy routine is
66342 ** This routine overwrites aRight[] with a new (probably longer) sequence
66486 ** return SQLITE_OK. Otherwise, return an error code. If this routine
66489 ** The calling routine should invoke walIteratorFree() to destroy the
66501 /* This routine only runs while holding the checkpoint lock. And
66712 ** by active readers. This routine will never overwrite a database page
66715 ** All I/O barrier operations (a.k.a fsyncs) occur in this routine when
66729 ** This routine uses and updates the nBackfill field of the wal-index header.
66730 ** This is the only routine that will increase the value of nBackfill.
67337 ** the xShmMap() routine of the VFS and looking to see if the return
67499 ** checkpointed. If useWal==0 then this routine calls walIndexReadHdr()
67507 ** this routine during the current read attempt that returned WAL_RETRY.
67508 ** This routine will start taking more aggressive measures to clear the
67517 ** On success, this routine obtains a read lock on
67527 ** this routine will always set pWal->readLock>0 on success.
67531 ** This routine uses the nBackfill and aReadMark[] fields of the header
67533 ** checkpoint process do as much work as possible. This routine might
67619 ** WAL_RETRY this routine will be called again and will probably be
67997 ** This routine used to be called sqlite3OpenSnapshot() and with good reason:
68047 /* This routine is only be called from within a read transaction. */
68203 ** thread to write as doing so would cause a fork. So this routine
68259 ** routine merely releases the lock.
68797 ** This routine is called to implement sqlite3_wal_checkpoint() and
68963 ** routine is a no-op. The pager must already hold the exclusive lock
69930 ** and this routine is a no-op. The underlying mutex is non-recursive.
69972 ** into this routine, we avoid unnecessary stack pointer changes
69973 ** and thus help the sqlite3BtreeLock() routine to run much faster
70030 ** This routine is used only from within assert() statements.
70092 ** This routine is used inside assert() statements only.
70222 ** This routine is used to extract the "offset to cell content area" value
70225 ** This routine makes the necessary adjustment to 65536.
70268 ** This routine has no effect on existing database connections.
70487 /* This routine is a no-op if the shared-cache is not enabled */
70671 ***** This routine is used inside of assert() only ****
70684 ** a connection that has already closed. This routine is used inside assert()
70889 ** prior to calling this routine.
70925 ** routine is called just before cursor pExcept is used to modify the
70930 ** routine enforces that rule. This routine only needs to be called in
70935 ** pointless call to this routine.
70937 ** Implementation note: This routine merely checks to see if any cursors
70953 /* This helper routine to saveAllCursors does the actual work of saving
70955 ** The common case is that no cursors need to be saved, so this routine is
71069 ** Calling this routine with a NULL cursor pointer returns false.
71071 ** Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
71072 ** back to where it ought to be if this routine returns true.
71084 ** false to the sqlite3BtreeCursorHasMoved() routine above. The fake
71094 ** This routine restores a cursor back to its original position after it
71103 ** This routine should only be called for a cursor that just returned
71188 ** This routine updates the pointer map entry for page number 'key'
71191 ** If *pRC is initially non-zero (non-SQLITE_OK) then this routine is
71250 ** This routine retrieves the pointer map entry for page 'key', writing
71299 ** This routine works only for pages that do not contain overflow cells.
71429 ** This routine is a high-runner.
71732 ** Defragment the page given. This routine reorganizes cells within the
71736 ** present in the page after this routine returns.
71943 ** allocation. This routine might need to defragment in order to bring
71944 ** all the space together, however. This routine will avoid using
72043 ** that routine will not detect overlap between cells or freeblocks. Nor
72046 ** routine and return SQLITE_CORRUPT if any problems are found.
72602 ** the transaction, for each page restored this routine is called.
72604 ** This routine needs to reset the extra data section at the end of the
73000 /* This routine is called only by btreeCursor() when allocating the
73291 ** This routine acts as a query if newFlag is less than zero
73590 ** For the purposes of this routine, a cursor is any cursor that
73608 ** this routine unrefs the first page of the database file which
73611 ** If there is a transaction in progress, this routine is a no-op.
73689 ** upgraded to exclusive by calling this routine a second time - the
74288 ** This routine is called prior to sqlite3PagerCommit when a transaction
74377 ** This routine does the first phase of a two-phase commit. This routine
74399 ** Once this is routine has returned, the only thing required to commit
74468 ** This routine implements the second phase of a 2-phase commit. The
74469 ** sqlite3BtreeCommitPhaseOne() routine does the first phase and should
74470 ** be invoked prior to calling this routine. The sqlite3BtreeCommitPhaseOne()
74471 ** routine did all the work of writing information out to disk and flushing the
74473 ** routine has to do is delete or truncate or zero the header in the
74535 ** This routine sets the state to CURSOR_FAULT and the error
74544 ** This routine gets called when a rollback occurs. If the writeOnly
74776 ** on pCur to initialize the memory space prior to invoking this routine.
74878 ** this routine.
74970 #ifndef NDEBUG /* The next routine used only within assert() statements */
74974 ** This is a verification routine is used only within assert() statements.
74987 ** This routine is only valid for a cursor that is pointing into a
74989 ** is invalid, the result of this routine is undefined.
75044 ** routine always returns 2147483647 (which is the largest record
75443 ** This routine is an optimization. It is common for the entire key
75445 ** pages. When that is so, this routine can be used to access the
75450 ** The pointer returned by this routine looks directly into the cached
75452 ** any btree routine is called.
75485 ** or be destroyed on the next call to any Btree routine,
75488 ** this routine.
75595 ** CURSOR_INVALID and this routine returns SQLITE_EMPTY. Otherwise,
75901 ** not run. If this is not the root-page, then the moveToChild() routine
75983 ** This routine is part of an optimization. It is always safe to return
76145 ** not run. If this is not the root-page, then the moveToChild() routine
76186 ** If the record is corrupt, the xRecordCompare routine may read
76338 ** The main entry point is sqlite3BtreeNext(). That routine is optimized
76341 ** routine is called when it is necessary to move to a different page or
76345 ** cursor corresponds to an SQL index and this routine could have been
76432 ** The main entry point is sqlite3BtreePrevious(). That routine is optimized
76435 ** helper routine is called when it is necessary to move to a different page
76439 ** the cursor corresponds to an SQL index and this routine could have been
76517 ** been referenced and the calling routine is responsible for calling
77277 ** Remove the i-th cell from pPage. This routine effects pPage only.
77279 ** the cell content has been copied someplace else. This routine just
77340 ** The insertCellFast() routine below works exactly the same as
77345 ** Fixes or enhancements to this routine should be reflected in
77401 /* The allocateSpace() routine guarantees the following properties
77442 ** Fixes or enhancements to this routine should be reflected into
77443 ** the insertCell() routine.
77491 /* The allocateSpace() routine guarantees the following properties
77881 ** This routine makes the necessary adjustments to pPg so that it contains
78215 ** This routine redistributes cells on the iParentIdx'th child of pParent
78227 ** Note that when this routine is called, some of the cells on the page
78229 ** if the page is overfull. This routine ensures that all cells allocated
78236 ** balancing routine to fix this problem (see the balance() routine).
78238 ** If this routine fails for any reason, it might leave the database
78239 ** in a corrupted state. So if this routine fails, the database should
78375 ** the dropCell() routine will overwrite the entire cell with zeroes.
78776 ** routine. The associated pointer map entries are:
79125 ** routine. Balancing routines are:
79404 ** In that case, this routine must seek the cursor to the correct insertion
80266 ** the page number of the root of the table. After this routine returns,
80269 ** This routine will fail with SQLITE_LOCKED if there are any open
80300 ** This routine only work for pCur on an ephemeral table.
80311 ** This routine will fail with SQLITE_LOCKED if there are any open
80433 ** This routine treats Meta[BTREE_DATA_VERSION] as a special case. Instead
80438 ** read it from this routine.
80568 ** Return the pager associated with a BTree. This routine is used for
80796 ** The btreeHeapInsert() routine inserts an unsigned 32-bit number onto
80797 ** the heap, preserving the heap property. The btreeHeapPull() routine
81114 ** This routine does a complete check of the given BTree file. aRoot[] is
81294 ** value of this routine is the same regardless of whether the journal file
81522 ** Return true if the cursor has a hint specified. This routine is
81728 ** handle is not locked in this routine, but it is locked in
82372 ** This routine is intended for use inside of assert() statements, like
82489 ** This routine looks at pMem to verify that if it has both a numeric
82494 ** This routine is for use inside of assert() statements only.
82533 ** If pMem is an object with a valid string representation, this routine
82539 ** routine is a no-op.
82637 ** routine is a no-op.
82664 ** this routine is a no-op.
82788 ** routine is only called if pMem is a number of some kind, not a NULL
82829 ** This routine calls the finalize method for that function. The
82861 ** This routine calls the xValue method for that function and stores
82888 ** invoking the external callback in Mem.xDel, then this routine
82891 ** This is a helper routine for sqlite3VdbeMemSetNull() and
82914 ** This is a helper routine invoked by sqlite3VdbeMemRelease() in
82933 ** Use this routine prior to clean up prior to abandoning a Mem, or to
83153 ** affinity even if that results in loss of data. This routine is
83214 ** This routine calls the Mem.xDel destructor to dispose of values that
83217 ** routine to invoke the destructor and deallocates Mem.zMalloc.
83219 ** Use this routine to reset the Mem prior to insert a new value.
83326 ** Return true if the Mem holds a RowSet object. This routine is intended
83374 ** This routine prepares a memory cell for modification by breaking
83458 ** pFrom contains an SQL NULL when this routine returns.
83594 ** The pMem object must have been initialized. This routine will use
83596 ** pMem->zMalloc space will be allocated if necessary. The calling routine
83600 ** If this routine fails for any reason (malloc returns NULL or unable
83818 ** then this routine attempts to invoke the SQL function. Assuming no
84342 ** The sqlite3ValueBytes() routine returns the number of bytes in the
84344 ** The valueBytes() routine is a helper function.
84492 ** This routine transfers the new bytecode in pA over to pB
84572 /* This routine is just a convenient place to set a breakpoint that will
84873 ** Set a debugger breakpoint on the following routine in order to
84927 ** Add an OP_ParseSchema opcode. This routine is broken out from
84932 ** This routine will take ownership of the allocated memory.
84942 /* Insert the end of a co-routine
84948 ** co-routine has its own independent set of registers, because co-routines
85170 ** OP_Clear. So this routine may end up returning true in the case
85223 ** This routine is called after all opcodes have been inserted. It loops
85239 ** This routine will only function correctly if the mkopcodeh.tcl generator
85240 ** script numbers the opcodes correctly. Changes to this routine must be
85349 ** This routine only runs during debug builds. The purpose is (of course)
85688 ** This routine is an optimization of sqlite3VdbeJumpHere() that
85882 ** This routine is useful when a large program is loaded from a
86037 ** routine, then a pointer to a dummy VdbeOp will be returned. That opcode
86041 ** this routine is a valid pointer. But because the dummy.opcode is 0,
86388 ** this routine obtains the mutex associated with each BtShared structure
86404 ** this routine is N*N. But as N is rarely more than 1, this should not
86450 ** Print a single opcode. This routine is used for debugging only.
86513 ** After this routine returns, all Mem elements in the array will still
86569 ** This routine is intended for use inside of assert() statements only.
86582 ** This routine does not delete the Frame right away. It merely adds the
86886 ** of a ReusableSpace object by the allocSpace() routine below.
86901 ** been allocated by a prior call to this routine, so just return a copy
86975 ** After this routine is called the VM has been "packaged" and is ready
86976 ** to run. After this routine is called, further calls to
86977 ** sqlite3VdbeAddOp() functions are prohibited. This routine disconnects
87250 ** write-transaction spanning more than one database file, this routine
87508 ** This routine checks that the sqlite3.nVdbeActive count variable
87630 ** This routine is called the when a VDBE tries to halt. If the VDBE
87634 ** This routine is the only way to move the sqlite3eOpenState of a VM from
87849 ** in p->rc. This routine sets that result back to SQLITE_OK.
87906 ** After this routine is run, the VDBE should be ready to be executed
87909 ** To look at it another way, this routine resets the state of the
88223 ** This routine might convert a large MEM_IntReal value into MEM_Real.
88226 ** opcode in the byte-code engine. But by moving this routine in-line, we
88228 ** this routine is now only used by the STAT3 logic and STAT3 support has
88395 ** routine so that in most cases the overhead of moving the stack pointer
88498 /* These use local variables, so do them in a separate routine
88526 ** This routine is used to allocate sufficient space for an UnpackedRecord
88605 ** as the sqlite3VdbeRecordCompare() routine. Unlike VdbeRecordCompare(),
88639 ** impact, since this routine is a very high runner. And so, we choose
89066 ** that this routine begins comparing at the second field. */
89273 ** To avoid concerns about buffer overreads, this routine is only used
89571 ** is ignored as well. Hence, this routine only compares the prefixes
89606 ** This routine sets the value to be returned by subsequent calls to
89708 ** This routine is invoked by date/time functions that use non-deterministic
89931 ** Invoke the profile callback. This routine is only called if we already
89964 ** The following routine destroys a virtual machine that is created by
89965 ** the sqlite3_compile() routine. The integer returned is an SQLITE_
89969 ** This routine sets the error code and string returned by
89998 ** This routine sets the error code and string returned by
90257 ** The invokeValueDestructor(P,X) routine invokes destructor function X()
90621 ** This routine implements the bulk of the logic behind the sqlite_step()
90850 ** If this routine is invoked from within an xColumn method of a virtual
90855 ** If this routine is called from any context other than within the
90859 ** Virtual table implements might use this routine to optimize their
90861 ** value, as a signal to the xUpdate routine that the column is unchanged.
91491 ** A successful evaluation of this routine acquires the mutex on p.
91750 ** This routine is added to support DBD::SQLite.
91804 ** It is misuse to call this routine with statements from different
92729 /* This routine provides a convenient place to set a breakpoint during
92837 ** This routine converts an ephemeral string into a dynamically allocated
93092 ** Unlike applyNumericAffinity(), this routine does not modify pMem->flags.
93810 ** value in register P3 is not NULL, then this routine is a no-op.
94041 ** This routine works by loading a NULL into the P2 register. When the
94711 ** A NULL value is not changed by this routine. It remains NULL.
97014 /* The sqlite3BtreeCursor() routine can only fail for the first cursor
103942 ** The main routine for background threads that write level-0 PMAs.
104179 ** The main routine for background threads that populate aFile[1] of
104291 ** are advanced. This routine merely does the comparison.
104385 ** invoking this routine */
104515 ** The main routine for vdbePmaReaderIncrMergeInit() operations run in
104532 ** this routine to initialize the incremental merge.
104990 ** This routine forms the core of the OP_SorterCompare opcode, which in
105983 ** The return value from this routine is WRC_Abort to abandon the tree walk
106123 ** If the Walker does not have an xSelectCallback() then this routine
106161 ** No-op routine for the parse-tree walker.
106163 ** When this routine is the Walker.xExprCallback then expression trees
106165 ** when this routine is used for Walker.xExprCallback then
106175 ** No-op routine for the parse-tree walker for SELECT statements.
106214 ** incrAggFunctionDepth(pExpr,n) is the main routine. incrAggDepth(..)
106217 ** See also the sqlite3WindowExtraAggFuncDepth() routine in window.c
106297 ** routine matches the zDb, zTab, and zCol. If any of zDb, zTab, and zCol are
106493 ** resulting in an appropriate error message toward the end of this routine
107089 ** This routine is callback for sqlite3WalkExpr().
107095 ** This routine also does error checking and name resolution for
107555 ** This routine checks to see if pE is a simple identifier which corresponds
107557 ** this routine return an integer between 1 and N where N is the number of
107559 ** no match, or if pE is not a simple identifier, then this routine
107593 ** At the point this routine is called, we already know that the
107595 ** case is handled by the calling routine.
107859 ** This routine resolves each term of the clause into an expression.
107868 ** This routine returns the number of errors. If errors occur, then
107961 ** this routine in the correct order.
108178 ** This routine walks an expression tree and resolves references to
108319 ** sqlite3SelectExpand() prior to invoking this routine.
108702 ** The sqlite3ExprCollSeq() routine works the same except that it
108723 ** type affinity of the other operand. This routine returns the
108943 ** In that case, this routine works like sqlite3ExprDup().
108951 ** or a scalar expression, then it can be deleted as soon as this routine
109032 ** already been generated using the exprCodeSubselect() routine. In this
109295 ** This routine is the core allocator for Expr nodes.
109873 ** of this routine with 0xfff. The flags can be found by masking the
110136 ** The gatherSelectWindows() procedure and its helper routine
110455 ** exit prior to this routine being invoked */
110871 ** When this routine returns true, it indicates that the expression
110995 ** This routine is used to determine if a term of the HAVING clause can
111108 ** This routine is used as an optimization, to skip OP_IsNull opcodes
111149 ** This routine is used to determine if the OP_Affinity operation
111305 ** The job of this routine is to find or create a b-tree object that can
111354 ** routine might decide that creating an ephemeral b-tree for membership
111356 ** calling routine should implement the IN operator using a sequence
111651 ** it is not permitted. If pExpr is a sub-select vector, this routine
111721 /* If this routine has already been coded, but the previous code
111914 /* If this routine has already been coded, then invoke it as a
112055 ** This routine generates code that jumps to destIfFalse if the LHS is not
112103 assert( v!=0 ); /* OOM detected prior to this routine */
112484 ** There must be an open cursor to pTab in iTable when this routine
112795 ** With this routine, there is no guarantee that results will
113614 ** result is not reusable. If regDest<0 then this routine is free to
113677 ** If pExpr is a constant, then this routine might generate this
113734 ** sqlite3ExprCode(). This routine works just like sqlite3ExprCode()
113747 ** in register target. If the expression is constant, then this routine
113888 ** so that the sqlite3ExprCodeTarget() routine will not attempt to move
114302 ** Sometimes this routine will return 2 even if the two expressions
114304 ** identical, we return 2 just to be safe. So if this routine
114308 ** this routine is used, it does not hurt to get an extra 2 - that
114413 ** This routine might return non-zero for equivalent ExprLists. The
114414 ** only consequence will be disabled optimizations. But this routine
114573 /* This is a helper function to impliesNotNullRow(). In this routine,
114596 ** This routine controls an optimization. False positives (setting
114725 ** This routine is used to check if a LEFT JOIN can be converted into
115251 ** This routine should only be called after the expression has been
115337 ** Always invoke this procedure after coding a subroutine or co-routine
115339 ** the sub/co-routine does not use registers in common with the code that
115340 ** invokes the sub/co-routine.
115380 ** iFirst..iLast, inclusive. This routine is only call from within assert()
115883 ** This routine makes a (partial) copy of the Table structure
116105 ** routine is used to keep the mapping current.
116107 ** After the parse finishes, renameTokenFind() routine can be used
116181 ** The pPtr argument is returned so that this routine can be used
116182 ** with tail recursion in tokenExpr() routine, for a small performance
116446 ** the input SQL is parsed from left to right. Repeated calls to this routine
116468 ** sub-routine is currently stored in pParse->zErrMsg. This function
117873 ** This routine generates code that opens the sqlite_statN tables.
118114 ** This routine allocates the StatAccum object in heap memory. The return
118410 ** The purpose of this routine is to collect statistical data and/or
118518 ** Implementation of the stat_get(P,J) SQL function. This routine is
118527 ** the callStatGet() routine below.) It is guaranteed that the P
118532 ** STAT_GET_STAT1 and is hence omitted and this routine becomes
118543 /* STAT4 has a parameter on this routine. */
119151 ** Generate code for the ANALYZE command. The parser calls this routine
119212 ** callback routine.
119831 /* This is not a real ATTACH. Instead, this routine is being called
120242 ** Initialize a DbFixer structure. This routine must be called prior
120377 ** is a copy of the 3rd argument to this routine. The second argument
120588 ** Push an authorization context. After this routine is called, the
120590 ** popped. Or if pParse==0, this routine is a no-op.
120662 ** This routine just records the fact that the lock is desired. The
120736 ** 1 bits. This routine is used by the DbMaskAllZero() and DbMaskNotZero()
120748 ** This routine is called after a single SQL statement has been
120750 ** prepared. This routine puts the finishing touches on the
121044 ** The difference between this routine and sqlite3FindTable() is that this
121045 ** routine leaves an error message in pParse->zErrMsg where
121301 ** This routine is called when a commit occurs.
121415 ** Table. No changes are made to disk by this routine.
121417 ** This routine just deletes the data structure. It does not unlink
121576 ** "temp" or the name of an attached db). This routine returns the
121589 /* The table or view or trigger name is passed to this routine via tokens
121601 ** This routine sets the *ppUnqual pointer to point at the token (pName1 or
121650 ** This routine is used to check if the UTF-8 string zName is a legal
121656 ** When parsing the sqlite_schema table, this routine also checks to
121728 ** If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro.
121770 ** So, in other words, this routine shifts all the virtual columns to
121774 ** this routine is a no-op macro. If the pTab does not have any virtual
121775 ** columns, then this routine is no-op that always return iCol. If iCol
121776 ** is negative (indicating the ROWID column) then this routine return iCol.
121816 ** to a CREATE TABLE statement. In particular, this routine is called
121826 ** At the end of the CREATE TABLE statement, the sqlite3EndTable() routine
122045 ** This routine creates a special TEMP trigger that will fire for each row
122053 ** When this routine is called, we do not yet know if the RETURNING clause
122103 ** The parser calls this routine once for each column declaration
122105 ** first to get things going. Then this routine is called for each
122216 ** This routine is called by the parser while in the middle of
122218 ** been seen on a column. This routine sets the notNull flag on
122247 ** This routine does a case-independent search of zType for the
122343 ** This routine is called by the parser while in the middle of
122399 ** accept it. This routine does the necessary conversion. It converts
122877 ** This routine differs from hasColumn() in that both the column and the
122878 ** collating sequence must match for this routine, but for hasColumn() only
122938 ** This routine runs at the end of parsing a CREATE TABLE statement that
122939 ** has a WITHOUT ROWID clause. The job of this routine is to convert both
123177 ** zName is temporarily modified while this routine is running, but is
123178 ** restored to its original value prior to this routine returning.
123223 ** This routine is called to report the final ")" that terminates
123237 ** If the pSelect argument is not NULL, it means that this routine
123268 ** should have been put there by the sqliteOpenCb routine.)
123442 int regYield; /* Register holding co-routine entry-point */
123443 int addrTop; /* Top of the co-routine */
123593 ** The parser calls this routine in order to create a new VIEW
123712 ** already known. This routine is not called unless either the
123718 ** trying to compute the column names. If we enter this routine with
124092 ** This routine is called to do the work of a DROP TABLE statement.
124200 ** This routine is called to create a new foreign key on the table
124341 ** This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED
124729 /* If pList==0, it means this routine was called to make a primary
124915 /* This routine has been called to create an automatic index as a
125036 ** that case the convertToWithoutRowidTable() routine will replace
125099 ** The list was already ordered when this routine was entered, so at this
125191 ** This routine will drop an existing named index. This routine
125261 ** array is szEntry bytes in size. This routine uses sqlite3DbRealloc()
125451 ** that is input to this routine is automatically freed.
125564 ** This routine is called by the parser to add a new term to the
125703 ** expects the join operator to be on the right operand. This routine
125713 ** operator with A. This routine shifts that operator over to B.
125897 ** This routine starts a new transaction if we are not already within
125926 ** The code generator calls this routine if is discovers that it is
126256 ** This routine is invoked once per CTE by the parser while parsing a
126369 ** This routine is called if the collation factory fails to deliver a
126392 ** This routine is called on a collation sequence before it is used to
126397 ** If required, this routine calls the 'collation needed' callback to
126476 ** this routine. sqlite3LocateCollSeq() invokes the collation factory
126573 ** This routine is a wrapper around sqlite3FindCollSeq(). This routine
127539 /* Return the number of rows that were deleted. If this routine is
127569 ** This routine generates VDBE code that causes a single row of a
127746 ** This routine generates VDBE code that causes the deletion of all
127807 ** this routine returns.
127887 ** because it was a partial index, then this routine should be called to
128621 ** The comments within this routine usually assume glob matching.
128623 ** This routine is usually quick, but can be N**2 in the worst case.
130117 ** This routine does per-connection function registration. Most
130119 ** This routine only deals with those that are not global.
130460 ** After this routine runs
131337 ** fkActionTrigger() routine. This function deletes the Trigger structure
132290 ** which were then optimized out) then this routine becomes a no-op.
132418 ** or VIRTUAL columns have not yet been initialized. This routine goes
132544 ** insert routine needs to know about.
132594 ** This routine generates code that will initialize all of the
132604 /* This routine is never called during trigger-generation. It is
132653 ** This routine should be called when the regRowid register holds a
132665 ** This routine generates the code needed to write autoincrement
132669 ** routine just before the "exit" code.
132731 ** This routine is called to handle SQL of the following forms:
132815 ** end co-routine R
133049 ** is coming from a SELECT statement, then generate a co-routine that
133051 ** co-routine is the common header to the 3rd and 4th templates.
133055 ** Generate a co-routine to run the SELECT. */
133056 int regYield; /* Register holding co-routine entry-point */
133057 int addrTop; /* Top of the co-routine */
133562 ** Return the number of rows inserted. If this routine is
133629 ** The operation of this routine is the same - return true if an only if
133656 ** The sqlite3GenerateConstraintChecks() routine usually wants to visit
133733 ** for an INSERT. This routine can distinguish between UPDATE and INSERT by
133748 ** The code generated by this routine will store new index entries into
133770 ** This routine also generates code to check constraints. NOT NULL,
134689 ** This routine generates code to finish the INSERT or UPDATE operation
134694 ** The arguments to this routine should be the same as the first six
134782 ** If pTab is a virtual table, then this routine is a no-op and the
134806 /* This routine is a no-op for virtual tables. Leave the output
134915 ** This routine returns TRUE if the optimization is guaranteed to be used.
134918 ** case, this routine generates code for the xfer optimization but also
134920 ** xfer optimization code if the test fails. In that case, this routine
134922 ** an unoptimized transfer. This routine also returns FALSE if there
135341 sqlite3_callback xCallback, /* Invoke this callback routine */
136894 ** Call this routine when the database connection is closing in order
137004 ** routine is a no-op.
140784 ** This is the callback routine for the code that initializes the
140786 ** This routine is also called from the OP_ParseSchema opcode of the VDBE.
141175 ** This routine is a no-op if the database schema is already initialized.
141321 ** to immediately follow the call to this routine with:
141325 ** This routine returns a copy of its pPtr input (the third parameter)
141335 void (*xCleanup)(sqlite3*,void*), /* The cleanup routine */
141360 ** Caution: Do not confuse this routine with sqlite3ParseObjectInit() which
141441 ** while this routine is running. Hence, we do not need to hold
141804 ** into the selectInnerLoop() routine.
142023 ** This routine makes as much sense at it can from the nonsense join
142258 ** This routine processes the join information for a SELECT statement.
142276 ** This routine returns the number of errors encountered.
142434 ** This routine does the work of loading query data into an array of
142511 ** regOrigData is 0 to prevent this routine from trying to copy
142651 ** be opened before the VM code generated by this routine is executed.
142669 ** register is initialized to NULL. (The fixDistinctOpenEph() routine
142677 ** contents of each row. It is used by this routine to determine (a)
142744 ** This routine runs after codeDistinct(). It makes necessary
142746 ** routine made use of. This processing must be done separately since
142880 ** This routine generates the code for the inside of the inner loop
143202 case SRT_Coroutine: /* Send data to a co-routine */
143337 ** This routine is used only inside of assert() statements.
143429 ** routine generates the code needed to do that.
143663 ** This routine has either 3 or 6 parameters depending on whether or not
143867 ** when modifying this routine to avoid breaking legacy.
143971 ** when modifying this routine to avoid breaking legacy.
144086 ** query, or a VIEW, or a CTE). This routine computes type information
144088 ** subquery. For the purposes of this routine, "type information" means:
144238 ** This routine changes the values of iLimit and iOffset only if
144241 ** prior to calling this routine.
144366 ** This routine generates VDBE code to compute the content of a WITH RECURSIVE
144620 ** This routine is called to process a compound query form from
144626 ** in which case this routine will be called recursively.
144644 ** So if this routine is called with p equal to the t3 query, then
145115 ** starting at pDest->iSdst. Then the co-routine yields.
145128 ** SRT_Output. This routine is never called with any other
145449 VdbeNoopComment((v, "Output routine for A"));
145458 VdbeNoopComment((v, "Output routine for B"));
145614 ** This routine is part of the flattening procedure. A subquery
145617 ** FORM clause entry is iTable. This routine makes the necessary
145767 ** This routine scans the entire SELECT statement and recomputes the
145805 ** If pSrc contains any sub-selects, call this routine recursively
145933 ** This routine attempts to flatten subqueries as a performance optimization.
145934 ** This routine returns 1 if it makes changes and 0 if no flattening occurs.
145948 ** This routine attempts to rewrite queries such as the above into
146092 ** in the caller before ever reaching this routine.)
146095 ** In this routine, the "p" parameter is a pointer to the outer query.
146099 ** If flattening is not attempted, this routine is a no-op and returns 0.
146100 ** If flattening is attempted this routine returns 1.
146103 ** the subquery before this routine runs.
146552 ** This routine has to do some additional checks before completing the
146894 ** routine.)
147147 ** This routine must be called after aggregate functions have been
147200 ** This routine checks to see if it is safe to use the count optimization.
147202 ** this routine returns NULL when it could have returned a table pointer.
147277 ** This transformation is necessary because the multiSelectOrderBy() routine
147396 ** This routine pushes the WITH clause passed as the second argument
147403 ** This routine returns a copy of pWith. Or, if bFree is true and
147405 ** then this routine return NULL.
147408 ** calling this routine, Instead, use only the return value.
147430 ** CTE expression, through routine checks to see if the reference is
147693 ** This routine is a Walker callback for "expanding" a SELECT statement.
148109 ** This routine "expands" a SELECT statement and all of its subqueries.
148149 ** This routine is called after identifier resolution.
148179 ** This routine adds datatype and collating sequence information to
148183 ** Use this routine after name resolution.
148198 ** This routine sets up a SELECT statement for processing. The
148207 ** This routine acts recursively on all subqueries within the SELECT.
148264 ** aggregate functions. This routine is responsible for computing
148297 ** aggregate query with a GROUP BY clause. This routine attempts
148384 ** This routine may only be called once for each AggInfo object. Prior
148385 ** to calling this routine:
148390 ** After calling this routine:
148408 ** routine generates code that stores NULLs in all of those memory
148746 /* This routine is called before the HAVING clause of the current
148971 ** be implemented as a co-routine. The i-th entry is guaranteed to be
148974 ** The subquery is implemented as a co-routine if all of the following are
148987 ** routine nominates it to that position.
149037 ** This routine returns the number of errors. If any errors are
149041 ** This routine does NOT free the Select structure passed in. The
149258 ** will be implemented as a co-routine and there is no advantage to
149303 ** it will be implemented as a co-routine, then do not flatten. This
149477 /* Implement a co-routine that will return a single row of the result
150373 ** interface routine of sqlite3_exec().
150397 ** This routine is called once for each row in the result table. Its job
150542 ** This routine frees the space the sqlite3_get_table() malloced.
150602 ** triggers on pTab in the TEMP schema. This routine prepends all
150606 ** To state it another way: This routine returns a list of all triggers
150872 ** This routine is called after all of the trigger actions have been parsed
150991 ** The parser calls this routine when it finds a SELECT statement in
151048 ** The parser calls this routine when it sees an INSERT inside the
151093 ** a pointer to that trigger step. The parser calls this routine when it
151133 ** a pointer to that trigger step. The parser calls this routine when it
151177 ** the trigger by name. The sqlite3DropTriggerPtr() routine does the
151178 ** same job as this routine except it takes a pointer to the trigger
151411 ** This routine adds a specific database name, if needed, to the target when
151473 ** This routine makes a copy of the pList, and at the same time expands
152086 ** i-th column of table pTab. This routine sets the P4 parameter of the
153769 ** The execSqlF() routine does the same thing, except it accepts
153881 ** This routine implements the OP_Vacuum opcode of the VDBE.
154189 ** routine is called, it is guaranteed that all appropriate locks are held
154484 ** This routine is called, for example, just before deleting the Table
154537 ** The parser calls this routine when it first sees a CREATE VIRTUAL TABLE
154586 ** This routine takes the module argument that has been accumulating
154600 ** The parser calls this routine after the CREATE VIRTUAL TABLE statement
154683 ** The parser calls this routine when it sees the first token
154693 ** The parser calls this routine for each token after the first token
155278 ** This routine is used to allow virtual table implementations to
155352 ** array if it is missing. If pTab is already in the array, this routine
155378 ** exists when this routine returns or if an attempt to create it failed
155431 ** sqlite3DeleteTable() routine will know that it is not stored in
155443 ** The results of this routine are undefined unless it is called from
155970 ** routine. The limit is high enough that is should not impact real-world
155987 ** The WHERE clause processing routine has two halves. The
156191 ** This routine is a helper for explainIndexRange() below
156194 ** at a time. This routine adds a new term to the end of the expression.
156386 ** required and this routine is a no-op.
156562 ** This routine makes its own copy of zAff so that the caller is free
156563 ** to modify zAff after this routine returns.
156625 ** This routine makes a copy of the input pX expression and then adjusts
156742 ** this routine sets up a loop that will iterate over all values of X.
156910 ** constraints are coded. This routine will generate code to evaluate
156915 ** of nEq including 0. If nEq==0, this routine is nearly a no-op.
156924 ** This routine allocates a range of nEq+nExtraReg memory cells and returns
156926 ** calls this routine will use that memory range to store keys for
156929 ** this routine allocates an additional nEq memory cells for internal
157027 ** sqlite3FindInIndex() routine has already ensured that the
157063 ** bound string constants to blobs. This routine makes the necessary changes
157067 ** only the one pass through the string space is required, so this routine
157432 ** This routine is called right after An OP_Filter has been generated and
157433 ** before the corresponding index search has been performed. This routine
157584 /* Special case of a FROM clause subquery implemented as a co-routine */
158996 ** This routine will increase the size of the pWC->a[] array as necessary.
159000 ** This is true even if this routine fails to allocate a new WhereTerm.
159002 ** WARNING: This routine might reallocate the space used to store
159004 ** calling this routine. Such pointers may be reinitialized by referencing
159506 ** This routine analyzes terms such as the middle term in the above example.
159847 ** column references. This routine checks to see if pExpr is an equivalence
159855 ** If this routine returns TRUE, that means that the RHS can be substituted
159911 ** be useful for indexing. This routine checks to see if pExpr appears
159918 ** If pExpr is a TK_COLUMN column reference, then this routine always returns
159988 ** The input to this routine is an WhereTerm structure with only the
159989 ** "pExpr" field filled in. The job of this routine is to analyze the
160468 ** This routine identifies subexpressions in the WHERE clause where
160477 ** The original WHERE clause in pExpr is unaltered. All this routine
160629 ** itself is not freed. This routine is the inverse of
160692 ** the more complex analysis done by this routine. Hence, the
160693 ** computations done by this routine are broken out into a separate
160910 ** It is always safe for this routine to return the continuation of the
160978 ** If the ONEPASS optimization is used (if this routine returns true)
161105 ** sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[]
161229 ** the normal whereScanInit() routine, which is a high-runner, does not
161249 ** form X=Y then this routine might also return terms of the form
161478 ** This routine runs over generated VDBE code and translates OP_Column
161479 ** opcodes into OP_Copy when the table is being accessed via co-routine
161955 ** This routine may only be called if it has previously been determined that
162905 ** This routine can fail if it is unable to load a collating sequence
162969 ** This routine can fail if it is unable to load a collating sequence
164318 ** to see if the index is covering. This routine does that search.
164332 ** This routine is an optimization. It is always safe to return zero.
165015 ** This routine depends on there being a HiddenIndexInfo structure immediately
165942 ** Given the list of WhereLoop objects at pWInfo->pLoops, this routine
165971 char *pSpace; /* Temporary memory used by this routine */
166341 ** simple == constraints against indexed fields. This routine attempts
166654 ** This routine adds IndexedExpr entries to the Parse->pIdxEpr field for
166754 ** information needed to terminate the loop. Later, the calling routine
166758 ** If an error occurs, this routine returns NULL.
166785 ** And so forth. This routine generates code to open those VDBE cursors
166797 ** code will run much faster. Most of the work of this routine is checking
166828 ** if there is one. If there is no ORDER BY clause or if this routine
167483 ** to trace those changes if PRAGMA vdbe_addoptrace=on. This routine
167710 /* For a co-routine, change all OP_Column references to the table of
167711 ** the co-routine into OP_Copy of result contained in a register.
167935 ** sub-query, which is always implemented as a co-routine. It then calls
167940 ** by the sub-query a sub-routine (OP_Gosub) coded by select.c is invoked.
167941 ** When the sub-routine is invoked:
168419 ** let the test coverage routine know not to expect this function to be
168451 ** same routine for xFinalize and xValue and which never call
168784 ** See also the incrAggDepth() routine in resolve.c
169757 ** Invoke the sub-routine at regGosub (generated by code in select.c) to
169760 ** OP_Gosub instruction is all that this routine generates. Extra VM code
170302 ** and invoke the sub-routine at instruction addrGosub once for each row.
171016 ** Alternative datatype for the argument to the malloc() routine passed
171148 /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
173412 ** If there is a destructor routine associated with the token which
173605 ** The following routine is called if the stack overflows.
176358 ** error routine and continue going as if nothing had happened.
176563 ** The implementation of this routine was generated by a program,
177801 ** Token types used by the sqlite3_complete() routine. See the header
177826 ** (1) START At the beginning or end of an SQL statement. This routine
178029 ** This routine is the same as the sqlite3_complete() routine described
178342 ** This routine must be called to initialize the memory allocation,
178345 ** this routine will be called automatically by key routines such as
178348 ** This routine is a no-op except on its very first call for the process,
178351 ** The first thread to call this routine runs the initialization to
178352 ** completion. If subsequent threads call this routine before the first
178356 ** The first thread might call this routine recursively. Recursive
178357 ** calls to this routine should not block, of course. Otherwise the
178360 ** Let X be the first thread to enter this routine. Let Y be some other
178361 ** thread. Then while the initial invocation of this routine by X is
178364 ** * Calls to this routine from Y must block until the outer-most
178367 ** * Recursive calls to this routine from thread X return immediately
178392 ** of this routine.
178547 ** routine is not threadsafe. But it is safe to invoke this routine
178549 ** when this routine is invoked, then this routine is a harmless no-op.
178600 ** This routine should only be called when there are no outstanding
178601 ** database connections or memory allocations. This routine is not
179856 ** This routine implements a busy callback that sleeps and tries
179910 ** This routine is called when an operation failed to acquire a
179913 ** If this routine returns non-zero, the lock is retried. If it
179929 ** This routine sets the busy callback for an Sqlite database to the
179951 ** This routine sets the progress callback for an Sqlite database to the
179983 ** This routine installs a default busy handler that waits for the
180298 ** SQL function that use this routine so that the functions will exist
180320 ** this routine is a no-op. If the function does not exist, then create
180324 ** should call this routine to make sure the global function exists.
180887 ** Return the most recent error code generated by an SQLite routine. If NULL is
181371 ** This routine does the core work of extracting URI parameters from a
181388 ** This routine does the work of opening a database on behalf of
182052 ** This is a convenience routine that makes sure that all thread-specific
182055 ** SQLite no longer uses thread-specific data so this routine is now a
182410 ** as it existing before this routine was called.
182908 ** error to call this routine with any parameter other than a pointer
182919 ** This is a utility routine, useful to VFS implementations, that checks
182925 ** query parameter we seek. This routine returns the value of the zParam
182926 ** parameter if it exists. If the parameter does not exist, this routine
182975 ** Translate a filename that was handed to a VFS routine into the corresponding
182978 ** It is an error to pass this routine a filename string that was not
183388 ** before this routine returns.
183396 ** Each call to this routine overrides any prior callbacks registered
184987 ** input does not begin with a quote character, then this routine
185105 ** If *pRc is initially non-zero then this routine is a no-op.
186619 ** routine advances *ppPoslist so that it points to the next docid in
186665 ** a POS_END varint (0). This routine leaves *ppPoslist pointing to
186713 ** Before calling this routine *pi must be initialized to the value of
187775 ** this routine simply sets the EOF flag.
187952 ** routine to find out if it has reached the end of a result set.
187964 ** This is the xRowid method. The SQLite core calls this routine to
188365 ** This routine implements the xFindFunction method for the FTS3
192651 ** Call this routine to delete a hash table or to reset a hash table
193111 ** In these routine, the letters are in reverse order. So the 'y' rule
193144 ** number of vowel consonant pairs. This routine computes the value
193151 ** In this routine z[] is in reverse order. So we are really looking
193300 ** in [a-zA-Z] then no stemming is attempted and this routine just
200741 ** fts3BestSnippet() routine.
203378 ** Growing our own isspace() routine this way is twice as fast as
203858 ** This routine is a high-runner. There is a measurable performance
204094 ** This routine only gives a correct answer if h really is a valid hexadecimal
205186 ** this routine.
205251 /* The byte at index i is a node type-code. This routine
205536 ** For performance reasons, this routine does not do a detailed check of the
205841 /* This helper routine for jsonLookupStep() populates pIns with
205854 ** is: {"a":{"b":{"c"::123}}}. This routine populates pIns with
205891 ** If the value found by this routine is the value half of label/value pair
205897 ** This routine will also modify the blob. If pParse->eEdit is one of
206274 ** pParse is uninitialized upon entry. This routine will handle the
206458 ** This routine is only called if it is already known that pArg is a
206495 ** using sqlite3_result_error() or the equivalent and this routine
206496 ** returns NULL. This routine also returns NULL if the pArg argument
207362 ** this routine is a no-op. If JSON or PATH is malformed, throw an error.
207388 ** routine is a no-op. If JSON or PATH is malformed, throw an error.
207481 ** This routine runs in linear time to validate text and when doing strict
207496 ** for the FLAGS argument is 1, since FLAGS=1 causes this routine to only
212287 /* This routine implements an SQL function that returns the "depth" parameter
212294 ** routine. This routine is intended for testing and analysis only.
212824 /* Use the SQLite core versions if this routine is part of the
212839 ** Growing our own isspace() routine this way is twice as fast as
212993 /* The sqlite3AtoF() routine is much much faster than atof(), if it
213279 ** This routine can also be used to detect polygons that rotate in
213281 ** This routine returns a negative value for clockwise (CW) polygons.
213325 ** In other words, this routine returns a CCW polygon regardless of the
213328 ** Use this routine to sanitize historical inputs that that sometimes
214676 ** This routine deletes the RtreeGeomCallback object that was attached
214678 ** or sqlite3_rtree_query_callback(). In other words, this routine is the
214679 ** destructor for an RtreeGeomCallback objecct. This routine is called when
214689 ** This routine frees the BLOB that is returned by geomCallback().
214703 ** scalar function that is implemented by this routine.
216830 ** routine will determine this size for you.
216840 ** then this routine returns -1.
219212 ** This routine is a copy of the sqlite3FileSuffix3() routine from the core.
222567 ** Invoke this routine to register the "dbstat" virtual table module
223005 ** Invoke this routine to register the "dbpage" virtual table module
224434 ** always fail. It is used here to ensure that this routine can always
231106 ** Alternative datatype for the argument to the malloc() routine passed
231673 ** If there is a destructor routine associated with the token which
231866 ** The following routine is called if the stack overflows.
232474 ** error routine and continue going as if nothing had happened.
233881 ** input does not begin with a quote character, then this routine
249080 ** routine to find out if it has reached the end of a result set.
249103 ** This is the xRowid method. The SQLite core calls this routine to
250307 ** This routine implements the xFindFunction method for the FTS3
253331 ** Trigram tokenizer tokenize routine.
254255 ** This is a copy of the sqlite3GetVarint32() routine from the SQLite core.
254307 ** routine.
255253 ** routine to find out if it has reached the end of a result set.
255328 ** This is the xRowid method. The SQLite core calls this routine to
255446 ** Think of this routine as the constructor for stmt_vtab objects.
255448 ** All this routine needs to do is:
255653 ** that uses the stmt virtual table. This routine needs to create