Lines Matching refs:code
3 ** version 3.6.22. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a one translation
15 ** of the embedded sqlite3.h header file.) Additional code files may be needed
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
32 ** The author disclaims copyright to this source code. In place of
52 ** system #includes. Hence, this block of code must be the very first
53 ** code in all source files.
57 ** on a recent machine (ex: Red Hat 7.2) but you want your code to work
60 ** in Red Hat 6.0, so the code won't work. Hence, for maximum binary
86 ** The author disclaims copyright to this source code. In place of
157 ** The code generator for compound SELECT statements does one
288 #pragma warn -rch /* unreachable code */
428 ** Setting NDEBUG makes the code smaller and run faster. So the following
447 ** where multiple cases go to the same block of code, testcase()
460 ** other bits of code that are needed to support the arguments
470 ** Sometimes we need a small amount of code such as a variable initialization
471 ** to setup for a later assert() statement. We do not want this code to
473 ** used to contain that setup code. The "VVA" acronym stands for
475 ** code within VVA_ONLY() will only run during verification processes.
486 ** expressions could be omitted from the code completely. But they
488 ** of SQLite to unexpected behavior - to make the code "self-healing"
492 ** In other words, ALWAYS and NEVER are added for defensive code.
495 ** be true and false so that the unreachable code then specify will
496 ** not be counted as untested code.
513 ** use these hints to generate better code, sometimes.
528 ** The author disclaims copyright to this source code. In place of
622 ** Since version 3.6.18, SQLite source code has been stored in the
677 ** SQLite was compiled mutexing code omitted due to the
802 ** without having to use a lot of C code.
867 ** KEYWORDS: SQLITE_OK {error code} {error codes}
868 ** KEYWORDS: {result code} {result codes}
870 ** Many SQLite functions return an integer result code from the set shown
911 ** KEYWORDS: {extended error code} {extended error codes}
912 ** KEYWORDS: {extended result code} {extended result codes}
929 ** The SQLITE_OK result code will never be extended. It will always
1214 ** searches the list. Neither the application code nor the VFS
1398 ** as a mutex) it returns an [error code] other than [SQLITE_OK].
1435 ** must return [SQLITE_OK] on success and some other [error code] upon
1470 ** then this routine returns a non-zero [error code].
1487 ** configuration verb - an integer code that indicates what
1589 ** should check the return code from [sqlite3_config()] to make sure that
1591 ** non-zero [error code] if a discontinued or unsupported configuration option
1796 ** should check the return code from [sqlite3_db_config()] to make sure that
1798 ** non-zero [error code] if a discontinued or unsupported configuration option
2077 ** code is promoted from the relatively benign [SQLITE_BUSY] to
2078 ** the more severe [SQLITE_IOERR_BLOCKED]. ^This error code promotion
2282 ** The code above will render a correct SQL statement in the zSQL
2438 ** to the callback is an integer [SQLITE_COPY | action code] that specifies
2443 ** ^If the action code is [SQLITE_READ]
2450 ** ^If the action code is [SQLITE_DELETE] and the callback returns
2514 ** second parameter to the callback is an integer code that specifies
2518 ** These action code values signify what kind of operation is to be
2526 ** top-level SQL code.
2619 ** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The
2715 ** ^The sqlite3_errcode() interface returns the numeric [result code] or
2716 ** [extended result code] for the most recent failed sqlite3_* API call
2721 ** [extended result code] even when extended result codes are
2743 ** error code and message may or may not be set.
2877 ** To execute an SQL query, it must first be compiled into a byte-code
2913 ** otherwise an [error code] is returned.
2938 ** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
3015 ** for maximum code portability it is recommended that applications
3116 ** [error code] if anything goes wrong.
3363 ** ^With the legacy interface, a more specific error code (for example,
3367 ** the more specific error code is returned directly by sqlite3_step().
3377 ** API always returns a generic error code, [SQLITE_ERROR], following any
3458 ** [SQLITE_INTEGER | datatype code] for the initial data type
3601 ** [error code] or [extended error code] is returned.
3609 ** [error code] returned will be [SQLITE_ABORT].
3632 ** [sqlite3_reset(S)] returns an appropriate [error code].
3758 ** backwards compatibility with older code, these functions continue
4002 ** ^The sqlite3_result_error_code() function changes the error code
4004 ** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()
4005 ** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
4192 ** The code to implement this API is not available in the public release
4205 ** The code to implement this API is not available in the public release
4430 ** successfully. An [error code] is returned otherwise.)^
4522 ** ^If the specified table is actually a view, an [error code] is returned.
4540 ** cannot be found, an [error code] is returned and an error message left
4771 unsigned char omit; /* Do not code a test for this constraint */
4953 ** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
4955 ** ^This function sets the [database connection] error code and message
4967 ** a expired BLOB handle fail with an return code of [SQLITE_ABORT].
5012 ** an error code, the BLOB is still closed.)^
5048 ** error code of [SQLITE_ABORT].
5051 ** Otherwise, an [error code] or an [extended error code] is returned.)^
5082 ** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred
5089 ** Otherwise, an [error code] or an [extended error code] is returned.)^
5138 ** use by SQLite, code that links against SQLite is
5141 ** The SQLite source code contains multiple implementations
5415 ** code is not remembered and will not be recalled by [sqlite3_errcode()]
5430 ** purposes. ^The first parameter is an operation code that determines
5447 ** These constants are the valid operation code parameters used
5476 ** highwater marks. ^The first argument is an integer code for
5489 ** non-zero [error code] on failure.
5618 ** might be discontinued. Applications should check the return code from
5620 ** The [sqlite3_db_status()] interface will return a non-zero error code
5648 ** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]
5898 ** returned and an error code and error message are store3d in the
5900 ** ^The error code and message for the failed call to sqlite3_backup_init()
5919 ** then an [error code] is returned. ^As well as [SQLITE_OK] and
5922 ** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
5979 ** sqlite3_backup_finish() returns the corresponding [error code].
6012 ** and so no error code is reported, but the operations may malfunction
6150 ** One way around this problem is to check the extended error code returned
6152 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
6153 ** the special "DROP TABLE/INDEX" case, the extended error code is just
6220 ** The author disclaims copyright to this source code. In place of
6240 ** code should not attempt to access or modify the fields of this structure
6506 ** to omit code used by TEMP tables without messy #ifndef statements.
6671 ** macro is used only within assert() to verify that the code gets
6736 ** throughout the SQLite code must become constants instead. The SQLITE_WSD
6831 ** The author disclaims copyright to this source code. In place of
6840 ** subsystem. See comments in the source code for a detailed description
7077 ** The author disclaims copyright to this source code. In place of
7493 ** The author disclaims copyright to this source code. In place of
7571 ** that make up the Pager sub-system API. See source code comments for
7663 ** The author disclaims copyright to this source code. In place of
7824 ** The author disclaims copyright to this source code. In place of
7833 ** This header file (together with is companion C source-code file
7954 ** anybody smart enough to figure out the code is also likely smart
8100 ** The author disclaims copyright to this source code. In place of
8111 ** to all source files. We break it out in an effort to keep the code
8121 ** Figure out what version of the code to use. The choices are
8310 ** store the most recent error code and, if applicable, string. The
8320 int errCode; /* Most recent error code (SQLITE_*) */
8400 ** mutex, not by sqlite3.mutex. They are used by code in notify.c.
8848 ** the operation in progress stops and returns an error code. But prior
8997 ** code for a SELECT that contains aggregate functions.
9002 ** code for that node.
9061 ** code representing the ">=" operator. This same integer code is reused
9191 ** so as not to burden production code.
9424 #define WHERE_ONETABLE_ONLY 0x0080 /* Only code the 1st table in pTabList */
9434 Parse *pParse; /* Parsing and code generating context */
9484 ** needed to generate code for a single SELECT statement.
9566 ** During code generation of statements that do inserts into AUTOINCREMENT
9569 ** the code generator needs. We have to keep per-table autoincrement
9619 ** The structure is divided into two parts. When the parser and code
9632 int rc; /* Return code from execution */
9638 u8 nested; /* Number of nested calls to the parser/code generator */
9711 Table *pZombieTab; /* List of Table objects to delete after code gen */
9867 int rc; /* Result code stored here */
9930 ** Return code from the parse-tree walking primitives and their
10029 ** The alloca() routine never returns NULL. This will cause code paths
10324 ** file. Code should use the MACRO forms below, as the Varint32 versions
10543 ** The interface to the code in fault.c used for identifying "benign"
10620 ** The author disclaims copyright to this source code. In place of
10802 ** a different position in the file. This allows code that has to
10827 ** The author disclaims copyright to this source code. In place of
10949 ** The author disclaims copyright to this source code. In place of
10962 ** All other code has file scope.
12055 ** The author disclaims copyright to this source code. In place of
12064 ** This file contains OS interface code that is common to all
12354 ** The author disclaims copyright to this source code. In place of
12363 ** This file contains code to support the concept of "benign"
12369 ** abandons the current operation and returns an error code (usually
12419 ** This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that
12443 ** The author disclaims copyright to this source code. In place of
12504 ** The author disclaims copyright to this source code. In place of
12657 ** The author disclaims copyright to this source code. In place of
12700 ** The application code sees only a pointer to the allocation. We have
12987 ** higher level code is using pointer to the old allocation, it is
13126 ** The author disclaims copyright to this source code. In place of
13340 ** will already be held (obtained by code in malloc.c) if
13815 ** The author disclaims copyright to this source code. In place of
13997 ** will already be held (obtained by code in malloc.c) if
14397 ** The author disclaims copyright to this source code. In place of
14407 ** This file contains code that is common across all mutex implementations.
14549 ** The author disclaims copyright to this source code. In place of
14735 ** The author disclaims copyright to this source code. In place of
14747 ** The code in this file is only used if SQLITE_MUTEX_OS2 is defined.
15008 ** The author disclaims copyright to this source code. In place of
15020 ** The code in this file is only used if we are compiling threadsafe
15337 ** The author disclaims copyright to this source code. In place of
15349 ** The code in this file is only used if we are compiling multithreaded
15621 ** The author disclaims copyright to this source code. In place of
15814 ** Deprecated external interface. Internal/core SQLite code
16164 ** code that do things like this:
16310 ** then the connection error-code (the value returned by sqlite3_errcode())
16330 ** The "printf" code that follows dates from the 1980's. It is in
16418 char fmttype; /* The format field code letter */
16478 ** Return the ascii code for the leading digit of *val, then
17341 ** The author disclaims copyright to this source code. In place of
17349 ** This file contains code to implement a pseudo-random number
17380 ** randomness any more. But we will leave this code in all the same.
17488 ** The author disclaims copyright to this source code. In place of
17525 ** The author disclaims copyright to this source code. In place of
17535 ** source code file "vdbe.c". When that file became too big (over
17734 ** expression argument once and reused the compiled code for multiple
17764 int isError; /* Error code returned by the function. */
17770 ** is part of a small set. Sets are used to implement code like
18465 ** The author disclaims copyright to this source code. In place of
18554 ** Set the most recent error code and error string for the sqlite
18555 ** handle "db". The error code is set to "err_code".
19078 ** is provided which inlines the single-byte case. All code should use
19264 ** single-byte case. All code should use the MACRO version as
19337 /* For following code (kept for historical record only) shows an
19338 ** unrolling for the 3- and 4-byte varint cases. This code is
19516 ** The author disclaims copyright to this source code. In place of
19951 ** The author disclaims copyright to this source code. In place of
19960 ** This file contains code that is specific to OS/2.
19981 ** the OS driver, but the code to deal with those failure would not
19984 ** code. Better to leave the code out, we think.
20000 ** Include code that is common to all os_*.c files
20007 ** The author disclaims copyright to this source code. In place of
20016 ** This file contains macros and a little bit of code that is common to
20029 ** switch. The following code should catch this problem at compile-time.
20063 ** hwtime.h contains inline assembler code for implementing
20071 ** The author disclaims copyright to this source code. In place of
20080 ** This file contains inline asm code for retrieving "high-performance"
20170 ** of code will give us the ability to simulate a disk I/O error. This
20182 #define SimulateIOError(CODE) \
20185 { local_ioerr(); CODE; }
20191 #define SimulateDiskfullError(CODE) \
20197 CODE; \
20298 ** or some other error code on failure.
20454 int rc = SQLITE_OK; /* Return code from subroutines */
20550 OSTRACE2( "OS/2 error-code = %d\n", res );
20570 ** return the appropriate result code.
20609 APIRET rcu = NO_ERROR; /* return code for unlocking */
20706 ** SQLite code assumes this function cannot fail. It also assumes that
20829 ** The next block of code implements the VFS methods.
21098 ** A no-op since the error code is returned on the DosLoadModule call.
21297 ** The author disclaims copyright to this source code. In place of
21317 ** KEEP THE STRUCTURE OF THIS FILE INTACT. New code should be placed
21385 ** on a recent machine (ex: RedHat 7.2) but you want your code to work
21388 ** in RedHat 6.0, so the code won't work. Hence, for maximum binary
21454 ** Only set the lastErrno if the error code is a real error and not
21455 ** a normal expected return code
21525 ** Include code that is common to all os_*.c files
21532 ** The author disclaims copyright to this source code. In place of
21541 ** This file contains macros and a little bit of code that is common to
21554 ** switch. The following code should catch this problem at compile-time.
21588 ** hwtime.h contains inline assembler code for implementing
21596 ** The author disclaims copyright to this source code. In place of
21605 ** This file contains inline asm code for retrieving "high-performance"
21695 ** of code will give us the ability to simulate a disk I/O error. This
21707 #define SimulateIOError(CODE) \
21710 { local_ioerr(); CODE; }
21716 #define SimulateDiskfullError(CODE) \
21722 CODE; \
21837 ** command-line option on the compiler. This code is normally
21893 ** This routine translates a standard POSIX errno code into something
22311 ** it a global so that the test code can change its value in order to verify
22461 ** Return an appropriate error code.
22468 int rc; /* System call return code */
22681 ** code into *pErrcode.
23042 int rc = SQLITE_OK; /* Return code from this interface */
23044 int tErrno; /* Error code from system call errors */
23857 ** Third-party implementations of AFP are available. But this code here
24225 ** The code above is the AFP lock implementation. The code is specific
24363 ** or some other error code on failure.
24484 ** up the real code with the UNUSED_PARAMETER() macros.
24717 ** SQLite code assumes this function cannot fail. It also assumes that
25373 int rc = SQLITE_OK; /* Function Return Code */
26405 int code = errno;
26407 buf.st_mode, code, strerror(code));
26412 int code = errno;
26414 err, code, strerror(code));
26520 int code = errno;
26522 cmode, code, strerror(code));
26527 int code = errno;
26529 err, code, strerror(code));
26611 int rc; /* Subroutine return code */
27103 ** The author disclaims copyright to this source code. In place of
27112 ** This file contains code that is specific to windows.
27132 ** the OS driver, but the code to deal with those failure would not
27135 ** code. Better to leave the code out, we think.
27157 ** Include code that is common to all os_*.c files
27164 ** The author disclaims copyright to this source code. In place of
27173 ** This file contains macros and a little bit of code that is common to
27186 ** switch. The following code should catch this problem at compile-time.
27220 ** hwtime.h contains inline assembler code for implementing
27228 ** The author disclaims copyright to this source code. In place of
27237 ** This file contains inline asm code for retrieving "high-performance"
27327 ** of code will give us the ability to simulate a disk I/O error. This
27339 #define SimulateIOError(CODE) \
27342 { local_ioerr(); CODE; }
27348 #define SimulateDiskfullError(CODE) \
27354 CODE; \
27398 ** with some code of our own.
27612 ** This section contains code for WinCE only.
27640 /* This will never be called, but defined to make the code compile */
27923 ** End of the special code for wince
28019 ** or some other error code on failure.
28235 int rc = SQLITE_OK; /* Return code from subroutines */
28325 OSTRACE2("error-code = %d\n", error);
28338 ** return the appropriate result code.
28440 ** SQLite code assumes this function cannot fail. It also assumes that
28481 ** The next block of code implements the VFS methods.
29248 ** The author disclaims copyright to this source code. In place of
29397 ** Set the i-th bit. Return 0 on success and an error code if
29547 ** This routine runs an extensive test of the Bitvec code.
29658 ** The author disclaims copyright to this source code. In place of
29687 ** Some of the assert() macros in this code are too expensive to run
30236 ** The author disclaims copyright to this source code. In place of
30324 ** All code in this file should access the global structure above via the
31017 ** The author disclaims copyright to this source code. In place of
31441 ** The author disclaims copyright to this source code. In place of
31588 ** SQLITE_FULL return code is slightly different. It persists only until the
31812 ** out code that would never execute.
31875 ** error code is something goes wrong.
31895 ** on success or an error code is something goes wrong.
32033 ** error code is returned.
32036 int rc; /* Return code */
32118 ** If an IO error occurs, abandon processing and return the IO error code.
32122 int rc = SQLITE_OK; /* Return code */
32171 int rc = SQLITE_OK; /* Return code */
32285 ** cannot be read from the journal file an error code is returned.
32294 int rc; /* Return code */
32312 ** SQLITE_DONE. If an IO error occurs, return an error code. Otherwise,
32327 ** of the transaction. Return an error code if anything goes wrong.
32408 int rc; /* Return code */
32438 ** an error occurs, return the error code to the caller.
32454 ** dangerous because the code to rollback a hot-journal file
32524 int rc = SQLITE_OK; /* Result code */
32549 int rc; /* Return code */
32575 ** cache can be discarded and the error code safely cleared.
32593 ** structure, the second the error-code about to be returned by a pager
32600 ** error code.
32698 ** database then the IO error code is returned to the user. If the
32699 ** operation to finalize the journal file fails, then the code still
32701 ** unlock operation fails as well, then the first error code related
32706 int rc = SQLITE_OK; /* Error code from journal finalization operation */
32707 int rc2 = SQLITE_OK; /* Error code from db file unlock operation */
32834 ** to the database file, then the IO error code is returned. If data
32873 ** file. Return an error code to the caller if an IO error occurs.
33066 ** If an IO error within this function, an error code is returned. This
33078 int rc; /* Return code */
33186 ** the database file, return the error code to the caller.
33290 ** and an error code is returned.
33305 int rc; /* Result code of a subroutine */
33419 ** code. This will cause the pager to enter the error state
33520 int rc = SQLITE_OK; /* Return code */
33668 ** or some other error code if we fail. The OS will automatically
33684 int rc; /* Return code */
33747 ** is a no-op. The value returned is the error state error code (i.e.
33835 ** and generate no code.
33864 ** the error code is returned to the caller and the contents of the
33888 ** error state error code is returned and *pnPage left unchanged. Or,
33890 ** the query attempt returns an IO error, the IO error code is returned
33899 /* If the pager is already in the error state, return the error code. */
33954 ** Return SQLITE_OK on success and an error code if we cannot obtain
33959 int rc; /* Return code */
34132 ** Or, in pseudo-code:
34147 ** error is encountered, then the IO error code
34153 int rc; /* Return code */
34270 ** occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot
34275 int rc; /* Return code */
34313 ** make the file smaller (presumably by auto-vacuum code). Do not write
34371 ** error code if the attempt to write to the sub-journal fails, or
34416 ** page clean, the IO error code is returned. If the page cannot be
34533 ** and error code returned. This function may return SQLITE_NOMEM
34548 int rc = SQLITE_OK; /* Return code */
34818 ** code is returned and the value of *pExists is undefined.
34822 int rc; /* Return code */
34915 int rc; /* Return code */
34971 ** the error state error code is returned. It is permitted to read the
34976 ** file or rolling back a journal file, the IO error code is returned.
34979 int rc = SQLITE_OK; /* Return code */
35036 ** this point in the code and fail to obtain its own EXCLUSIVE lock
35212 ** an appropriate error code is returned and *ppPage is set to NULL.
35377 ** An SQLITE_IOERR_XXX error code is returned if a call to
35412 ** an IO error code if opening or writing the journal file fails.
35415 int rc = SQLITE_OK; /* Return code */
35725 ** If an error occurs, SQLITE_NOMEM or an IO error code is returned
35942 ** function returns SQLITE_OK. Otherwise, an IO error code is returned.
35945 int rc; /* Return code */
35986 int rc = SQLITE_OK; /* Return code */
36149 ** If an error occurs, an IO error code is returned and the pager
36153 int rc = SQLITE_OK; /* Return code */
36157 ** called, just return the same error code without doing anything. */
36209 ** of either, the error state error code is returned to the caller
36215 ** error code encountered.
36224 ** otherwise enter the error state and return the error code from the
36234 int rc = SQLITE_OK; /* Return code */
36325 ** occurs while opening the sub-journal file, then an IO error code is
36329 int rc = SQLITE_OK; /* Return code */
36406 ** or an IO error code if an IO error occurs while rolling back a
36539 ** This function may return SQLITE_NOMEM or an IO error code if an error
36545 int rc; /* Return code */
36786 ** The author disclaims copyright to this source code. In place of
36795 ** This file contains code used to implement mutexes on Btree objects.
36796 ** This code really belongs in btree.c. But btree.c is getting too
36805 ** The author disclaims copyright to this source code. In place of
37326 ** should return the error code stored in BtCursor.skip
37788 ** The author disclaims copyright to this source code. In place of
38433 int rc; /* Status code */
38486 ** This routine returns an error code if something goes wrong. The
38531 ** a no-op. If an error occurs, the appropriate error code is written
38539 int rc; /* Return code from subfunctions */
38583 ** An error code is returned if something goes wrong, otherwise SQLITE_OK.
38913 ** an error code (usually SQLITE_CORRUPT).
38928 int rc; /* Integer return code */
39189 ** The following block of code checks early to see if a cell extends
39472 int rc = SQLITE_OK; /* Result code from this function */
39550 ** even when they are not. This exercises the locking code and
40339 int rc; /* Return code */
40645 ** SQLITE_OK is returned. Otherwise an SQLite error code.
40893 ** code to errCode for every cursor on BtShared that pBtree
41319 ** to return an integer result code for historical reasons.
41335 ** If an error occurs an SQLite error code is returned. Otherwise:
41414 ** SQLITE_OK is returned on success, otherwise an error code.
41605 ** Return SQLITE_OK on success or an error code if anything goes
41622 ** Return SQLITE_OK on success or an error code if anything goes
42023 ** specified by pIdxKey or intKey. Return a success code.
42236 ** have been deleted? This API will need to change to return an error code
42445 /* The code
42676 int rc; /* Return Code */
43020 int rc; /* The return code */
43077 int *pRC /* Read and write return code from here */
43236 int rc; /* Return Code */
43266 ** operations fails, the return code is set, but the contents
43267 ** of the parent page are still manipulated by thh code below.
43269 ** be marked as dirty. Returning an error code will cause a
43316 ** it is sometimes activated temporarily while debugging code responsible
43466 int rc = SQLITE_OK; /* The return code */
43703 ** right-most sibling might be nearly empty. This block of code attempts
43938 ** moved to the free-list - the freePage() code has taken care
43943 ** have also already been taken care of by the insertCell() code.
43956 ** Cases 1 and 2 are dealt with above by other code. The next
43959 ** code only sets pointer map entries for child or overflow pages that have
44071 ** an error code is returned and *ppChild is set to 0.
44407 int rc; /* Return code */
44938 ** corruption) an SQLite error code is returned.
44942 int rc; /* Return code */
44996 /* An error has occurred. Return an error code. */
45211 "unable to get the page. error code=%d", rc);
45215 /* Clear MemPage.isInit to make sure the corruption detection code in
45221 "btreeInitPage() returns error code %d", rc);
45560 ** a single shared-btree. The memory is used by client code for its own
45698 ** The author disclaims copyright to this source code. In place of
45729 int rc; /* Backup process error code */
45817 ** If an error occurs, NULL is returned and an error code and error message
45881 ** Argument rc is an SQLite error code. Return true if this error is
45933 ** and the pager code use this trick (clearing the first byte
45953 ** code if an error occurs.
46195 /* Set the error code of the destination database handle. */
46307 ** or an error code.
46327 ** The author disclaims copyright to this source code. In place of
46336 ** This file contains code use to manipulate "Mem" structure. A "Mem"
47204 int rc = SQLITE_OK; /* Return code */
47429 ** The author disclaims copyright to this source code. In place of
47437 ** This file contains code used for creating, destroying, and populating
47439 ** to version 2.8.7, all this code was combined into the vdbe.c source file.
47446 ** When debugging the code generator in a symbolic debugger, one can
48202 ** makes the code easier to read during debugging. None of this happens
48426 ** The justification for duplicating code is that according to
48467 ** running the code, it invokes the callback once for each instruction.
48487 int rc = SQLITE_OK; /* Return code */
49243 ** may be lying around. Returning an error code won't help matters.
49325 ** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.
49432 ** Return an error code. If the commit could not complete because of
49467 int mrc; /* Primary error code from p->rc */
49553 ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then set the error
49554 ** code to the new value.
49624 ** Write any error messages into *pzErrMsg. Return the result code.
49643 /* If the VDBE has be run even partially, then transfer the error code
49707 ** the result code. Write any error message text into *pzErrMsg.
49768 ** was last positioned. Return an error code if an OOM fault or I/O error
49820 ** encapsulate the code that serializes values for storage in SQLite
49932 ** rather than a 64-bit float. Frank assures us that the code here
50341 ** Return SQLITE_OK if everything works, or an error code otherwise.
50359 ** this code can safely assume that nCellKey is 32-bits
50542 ** The author disclaims copyright to this source code. In place of
50551 ** This file contains code use to implement APIs that are part of the
50595 ** success/failure code that describes the result of executing the virtual
50598 ** This routine sets the error code and string returned by
50625 ** back to its starting state so that it can be reused. A success code from
50628 ** This routine sets the error code and string returned by
50724 ** then sets the error code to SQLITE_TOOBIG
50942 ** error has occured, then return the error code in p->rc to the
50943 ** caller. Set the error code in the database handle to the same value.
51129 ** This function is deprecated. Do not use it for new code. It is
51130 ** provide only to avoid breaking legacy code. New aggregate function
51182 ** running with SQLITE_DEBUG defined the SQLite code sometimes assert()s
51207 ** code of statement pStmt set to SQLITE_NOMEM.
51224 ** sqlite3_column_XXX API, then set the return code of the statement to
51458 ** The error code stored in database p->db is overwritten with the return
51728 ** Deprecated external interface. Internal/core SQLite code
51798 ** The author disclaims copyright to this source code. In place of
51807 ** This file contains code used to insert the values of host parameters
51941 ** The author disclaims copyright to this source code. In place of
51949 ** The code in this file implements execution method of the
51972 ** Most of the code in this file is taken up by the sqlite3VdbeExec()
51979 ** of the code in this file is, therefore, important. See other comments
51981 ** commenting and indentation practices when changing or adding code.
52385 ** hwtime.h contains inline assembler code for implementing
52393 ** The author disclaims copyright to this source code. In place of
52402 ** This file contains inline asm code for retrieving "high-performance"
52548 ** The error code is stored in p->rc and this routine returns SQLITE_ERROR.
52588 ** Automatically generated code
52984 /* End automatically generated code
53067 ** a return code SQLITE_ABORT.
53130 ** that is a lot of wasted space on the left margin. So the code within
53132 ** big comment (similar to this one) will mark the point in the code where
53235 ** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),
53517 ** with an SQLITE_ROW return code and it sets up the sqlite3_stmt
54693 ** the record to 0. This tells code below to store a NULL
54801 ** Refer to source code comments for the details of the record
55358 ** discard the database schema, as the user code implementing the
55393 ** SQLITE_BUSY error code.
55753 /* The next line of code computes as follows, only faster:
56383 ** to guard against future changes to the code generator.
57717 ** fails with an error code of SQLITE_SCHEMA if it is ever executed
57772 ** code will be set to SQLITE_LOCKED.
58022 ** data is available) and the error code returned when xColumn or
58220 /* The following code adds nothing to the actual functionality
58304 ** The author disclaims copyright to this source code. In place of
58313 ** This file contains code used to implement incremental BLOB I/O.
58349 ** of writing code to use the b-tree layer directly is that the
58354 ** Code external to the Vdbe then "borrows" the b-tree cursor and
58686 ** The author disclaims copyright to this source code. In place of
58922 ** The author disclaims copyright to this source code. In place of
58931 ** This file contains code use to implement an in-memory rollback journal.
59181 ** The author disclaims copyright to this source code. In place of
59317 ** The author disclaims copyright to this source code. In place of
59978 int rc; /* Return code from subprocedures */
60518 ** The author disclaims copyright to this source code. In place of
60527 ** for generating VDBE code that evaluates expressions in SQLite.
60744 ** Generate code for a comparison operator.
60747 Parse *pParse, /* The parsing (and code generating) context */
61926 ** caller to use vdbe code equivalent to the following:
61958 /* Code an OP_VerifyCookie and OP_TableLock for <table>. */
62041 ** Generate code for scalar subqueries used as an expression
62086 /* This code must be run in its entirety every time it is encountered
62093 ** If all of the above are false, then we can run this code just once
62137 ** Generate code to write the results of the select into the temporary
62183 ** this code only executes once. Because for a non-constant
62184 ** expression we need to rerun this code each time.
62219 /* If this has to be a scalar SELECT. Generate code to put the
62267 ** Generate code for an IN expression.
62278 ** This routine generates code will jump to destIfFalse if the LHS is not
62284 Parse *pParse, /* Parsing and code generating context */
62309 /* Code the LHS, the <expr> from "<expr> IN (...)".
62352 ** over all of the code that follows.
62356 /* Here we begin generating code that runs if the LHS is not
62357 ** contained within the RHS. Generate additional code that
62487 #if 0 /* This code wold remove the entry from the cache if it existed */
62596 ** Generate code that will extract the iColumn-th column from
62602 ** is called. If iColumn<0 then code is generated that extracts the rowid.
62605 Parse *pParse, /* Parsing and code generating context */
62658 ** Generate code to move content from registers iFrom...iFrom+nReg-1
62675 ** Generate code to copy content from registers iFrom...iFrom+nReg-1
62725 ** Generate code to store the value of the iAlias-th alias in register
62729 ** the register number is returned without generating any code.
62731 ** Note that in order for this to work, code must be generated in the
62773 ** Generate code into the current Vdbe to evaluate the given
62780 ** must check the return code and move the results to the desired
63385 ** Generate code to evaluate an expression and store the results
63406 ** Generate code that will evaluate expression pExpr and store the
63423 ** Generate code that evalutes the given expression and puts the result
63575 ** Generate code that pushes the value of every element of the given
63609 ** Generate code for a BETWEEN operator.
63617 ** Code it as such, taking care to do the common subexpression
63621 Parse *pParse, /* Parsing and code generating context */
63665 ** Generate code for a boolean expression such that a jump is made
63672 ** This code depends on the fact that certain token values (ex: TK_EQ)
63675 ** the make process cause these values to align. Assert()s in the code
63788 ** Generate code for a boolean expression such that a jump is made
63941 ** just might result in some slightly slower code. But returning
64256 ** The author disclaims copyright to this source code. In place of
64264 ** This file contains C code routines that used to generate VDBE code
64269 ** The code in this file only exists if we are not omitting the
64338 ** This C function implements an SQL user function that is used by SQL code
64565 ** Generate code to drop and reload the internal representation of table
64568 ** the time the generated code is executed. This can be different from
64569 ** pTab->zName if this function is being called to code part of an
64614 ** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
64696 /* Begin a transaction and code the VerifyCookie for database iDb.
64814 ** Generate code to make sure the file format number is at least minFormat.
64815 ** The generated code will increase the file format number if necessary.
65051 ** The author disclaims copyright to this source code. In place of
65059 ** This file contains code associated with the ANALYZE command.
65064 ** This routine generates code that opens the sqlite_stat1 table for
65076 ** with the named table are deleted. If zWhere==0, then code is generated
65146 ** Generate code to do an analysis of all indices associated with
65221 /* If this iteration of the loop is generating code to analyze the
65371 ** Generate code that will cause the most recent index analysis to
65382 ** Generate code that will do an analysis of an entire database
65404 ** Generate code that will do an analysis of a single table in
65423 ** Generate code for the ANALYZE command. The parser calls this routine
65443 ** and code in pParse and return NULL. */
65576 ** code may be ignored.
65698 ** The author disclaims copyright to this source code. In place of
65706 ** This file contains code used to implement the ATTACH and DETACH commands.
65976 ** This procedure generates VDBE code for a single invocation of either the
66033 /* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this
66237 ** The author disclaims copyright to this source code. In place of
66245 ** This file contains code used to implement the sqlite3_set_authorizer()
66252 ** All of the code in this file may be omitted by defining a single
66341 int rc; /* Auth callback return code */
66418 ** Do an authorization check using the code and arguments given. Return
66425 int code,
66443 rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
66488 ** The author disclaims copyright to this source code. In place of
66496 ** This file contains C code routines that are called by the SQLite parser
66538 ** code to make the lock occur is generated by a later call to
66578 ** Code an OP_TableLock instruction for each table locked by the
66607 ** no VDBE code was generated.
66618 /* Begin by generating some termination code at the end of the
66629 ** set for each database that is used. Generate code to start a
66666 /* Finally, jump back to the beginning of the executable code. */
66700 ** Run the parser and code generator recursively in order to generate
66701 ** code for the SQL statement given onto the end of the pParse context
66783 ** and code in pParse and return NULL. */
67135 Parse *pParse, /* Parsing and code generating context */
67249 int code;
67256 code = SQLITE_CREATE_TEMP_VIEW;
67258 code = SQLITE_CREATE_VIEW;
67262 code = SQLITE_CREATE_TEMP_TABLE;
67264 code = SQLITE_CREATE_TABLE;
67267 if( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){
67322 /* Begin generating the code that will insert the table record into
67361 ** by the real entry in code generated at sqlite3EndTable().
67365 ** The rowid and root page number values are needed by the code that
67396 ** produces larger code.
67759 ** Generate code that will increment the schema cookie.
68359 ** Write code to erase the table with root-page iTable from database iDb.
68360 ** Also write code to modify the sqlite_master table and internal schema
68372 ** location iTable. The following code modifies the sqlite_master table to
68387 ** Write VDBE code to erase table pTab and all associated indices on disk.
68388 ** Code to update the sqlite_master tables and internal schema definitions
68479 int code;
68488 code = SQLITE_DROP_TEMP_VIEW;
68490 code = SQLITE_DROP_VIEW;
68494 code = SQLITE_DROP_VTABLE;
68499 code = SQLITE_DROP_TEMP_TABLE;
68501 code = SQLITE_DROP_TABLE;
68504 if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
68531 /* Generate code to remove the table from the master table
68547 /* Drop all triggers associated with the table being dropped. Code
68757 ** Generate code that will erase and refill index *pIdx. This is
68773 Vdbe *v; /* Generate code into this virtual machine */
69268 /* Fill the index with data and reparse the schema. Code an OP_Expire
69384 int code = SQLITE_DROP_INDEX;
69391 if( !OMIT_TEMPDB && iDb ) code = SQLITE_DROP_TEMP_INDEX;
69392 if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){
69398 /* Generate code to remove the index and from the master table */
69770 ** is initially attached to the left operand. But the code generator
69910 ** Generate VDBE code that will verify the schema cookie and start
69916 ** code has been generated. So here is what we do:
69918 ** The first time this routine is called, we code an OP_Goto that
69921 ** pParse->cookieMask field. Later, after all other code has been
69925 ** cookie verification subroutine code happens in sqlite3FinishCoding().
69927 ** If iDb<0 then code the OP_Goto only - don't set flag to verify the
69929 ** early in the code, before we know if any database tables will be used.
69958 ** Generate VDBE code that prepares for doing an operation that
69990 ** The code generator calls this routine if is discovers that it is
70000 ** makes it more difficult to prove that the code is correct (in
70011 ** Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT
70084 ** Generate code for the REINDEX command.
70108 ** and code in pParse and return NULL. */
70193 ** The author disclaims copyright to this source code. In place of
70645 ** The author disclaims copyright to this source code. In place of
70653 ** This file contains C code routines that are called by the parser
70654 ** in order to generate code for DELETE FROM statements.
70848 ** Generate code for a DELETE FROM statement.
70862 int end, addr = 0; /* A couple addresses of generated code */
70942 /* Begin generating code.
71065 ** generating code because of a call to sqlite3NestedParse(), do not
71091 ** This routine generates VDBE code that causes a single row of a
71106 ** This routine generates code to remove both the table record and all
71120 int iLabel; /* Label resolved to end of generated code */
71202 ** This routine generates VDBE code that causes the deletion of all
71218 Parse *pParse, /* Parsing and code generating context */
71235 ** Generate code that will assemble an index key and put it in register
71283 ** The author disclaims copyright to this source code. In place of
71296 ** All other code has file scope.
71633 ** here. But now they are implemented as VDBE code so that unused arguments
72018 ** that identifies the particular version of the source code used to build
72039 ** change. This function may disappear. Do not write code that depends
72368 int code = iCode[zIn[i]&0x7f];
72369 if( code>0 ){
72370 if( code!=prevcode ){
72371 prevcode = code;
72372 zResult[j++] = code + '0';
72807 ** The author disclaims copyright to this source code. In place of
72815 ** This file contains code used by the compiler to add foreign key
72906 ** Before coding an UPDATE or DELETE row operation, the code-generator
72909 ** row are required by the FK processing VDBE code (i.e. if FKs were
72911 ** accessed). No information is required by the code-generator before
72913 ** generation code to query for this information are:
72923 ** sqlite3FkActions() - Code triggers for ON UPDATE/ON DELETE actions.
73098 ** Each time it is called, this function generates VDBE code to locate the
73129 Vdbe *v = sqlite3GetVdbe(pParse); /* Vdbe to add code to */
73215 ** incrementing a counter. This is necessary as the VM code is being
73233 ** This function is called to generate code executed when a row is deleted
73236 ** code for an SQL UPDATE operation, this function may be called twice -
73239 ** The code generated by this function scans through the rows in the child
73408 ** This function is called to generate code that runs when table pTab is
73413 ** Normally, no code is required. However, if either
73434 ** generating any VDBE code. If one can be found, then jump over
73467 ** table pTab to generate VDBE code to perform foreign key constraint
73492 Vdbe *v; /* VM to write code to */
73630 ** This function is called before generating code to update or delete a
73656 ** This function is called before generating code to update or delete a
73726 ** sub-system, code for them is created by fkScanChildren()).
74001 ** The author disclaims copyright to this source code. In place of
74009 ** This file contains C code routines that are called by the parser
74014 ** Generate code that will open a table for reading.
74017 Parse *p, /* Generate code into this VDBE */
74216 ** This routine generates code that will initialize all of the
74267 ** This routine generates the code needed to write autoincrement
74271 ** routine just before the "exit" code.
74340 ** The code generated follows one of four templates. For a simple
74341 ** select with data coming from a VALUES clause, the code executes
74342 ** once straight down through. Pseudo-code follows (we call this
74376 ** The generated code follows this template:
74440 Vdbe *v; /* Generate code into this virtual machine */
74565 /* Data is coming from a SELECT. Generate code to implement that SELECT
74566 ** as a co-routine. The code is common to both the 3rd and 4th
74630 ** and add it to a transient table srcTab. The code generated
74960 /* Generate code to check constraints and generate index keys and
74990 /* Code AFTER triggers */
75027 ** generating code because of a call to sqlite3NestedParse(), do not
75059 ** Generate code to do constraint checks prior to an INSERT or an UPDATE.
75082 ** The code generated by this routine store new index entries into
75088 ** This routine also generates code to check constraints. NOT NULL,
75097 ** return code of SQLITE_CONSTRAINT.
75105 ** return code of SQLITE_CONSTRAINT. The
75339 /* Generate code that executes if the new index entry is not unique */
75396 ** This routine generates code to finish the INSERT or UPDATE operation
75458 ** Generate code that will open cursors for a table and for all
75818 ** The author disclaims copyright to this source code. In place of
75834 ** Execute SQL code. Return one of the SQLITE_ success/failure
75850 int rc = SQLITE_OK; /* Return code */
75964 ** The author disclaims copyright to this source code. In place of
75972 ** This file contains code used to dynamically load extensions into
75984 ** The author disclaims copyright to this source code. In place of
76812 ** The auto-extension code added regardless of whether or not extension
76814 ** code if regular extension loading is not available. This is that
76955 ** The author disclaims copyright to this source code. In place of
76963 ** This file contains code used to implement the PRAGMA command.
76977 ** to support legacy SQL code. The safety level used to be boolean
77093 ** Generate code to return a single integer value.
77174 /* Many of the flag-pragmas modify the code generated by the SQL
77766 /* The flagPragma() subroutine also generates any necessary code
77989 /* Code that appears at the end of the integrity check. If no error
78387 ** The author disclaims copyright to this source code. In place of
78423 ** This is the callback routine for the code that initializes the
78454 ** But because db->init.busy is set to 1, no VDBE code is generated
78756 ** created using ATTACH statements. Return a success code. If an
78802 ** Otherwise, the schema is loaded. An error code is returned.
78874 /* If pSchema is NULL, then return -1000000. This happens when code in
78910 int rc = SQLITE_OK; /* Result code */
79245 ** The author disclaims copyright to this source code. In place of
79253 ** This file contains C code routines that are called by the parser
79372 u8 code; /* Join type mask */
79391 jointype |= aKeyword[j].code;
79649 ** Insert code into "v" that will push the record on the top of the
79690 ** Add code to implement the OFFSET
79693 Vdbe *v, /* Generate code into this VM */
79708 ** Add code that will check to make sure the N registers starting at iMem
79717 Parse *pParse, /* Parsing and code generating context */
79756 ** This routine generates the code for the inside of the inner loop
80021 ** routine generates the code needed to do that.
80026 Vdbe *v, /* Generate code into this VDBE */
80174 /* At one time, code such as "SELECT new.x" within a trigger would
80176 ** trigger code is generated and so this condition is no longer
80261 ** Generate code that will tell the VDBE the declaration types of columns
80300 ** Generate code that will tell the VDBE the names of columns
80541 ** is disabled, so we might as well hard-code pTab->dbMem to NULL. */
80710 int rc = SQLITE_OK; /* Success code from a subroutine */
80712 Vdbe *v; /* Generate code to this VDBE */
80767 /* Generate code for the left and right SELECT statements.
80831 /* Code the SELECT statements to our left
80840 /* Code the current SELECT statement
80916 /* Code the SELECTs to our left into temporary table "tab1".
80924 /* Code the current SELECT into temporary table "tab2"
80943 /* Generate code to take the intersection of the two temporary
81032 ** Code an output subroutine for a coroutine implementation of a
81044 ** if there has been no previous output. If regPrev>0 then code is
81189 ** Alternative compound select code generator for cases when there
81197 ** is to code both <selectA> and <selectB> with the ORDER BY clause as
81281 Vdbe *v; /* Generate code to this VDBE */
81316 assert( pKeyDup==0 ); /* "Managed" code needs this. Ticket #3382. */
81533 /* Generate code to handle the case of A<B
81541 /* Generate code to handle the case of A==B
81556 /* Generate code to handle the case of A>B
81567 /* This code runs once to initialize everything.
81727 ** The code generated for this simpification gives the same result
82020 ** subquery until code generation is
82046 ** iParent. The iParent cursor will never be used. Subsequent code
82081 ** block of code will expand the out query to 4 slots. The middle
82380 ** The following code just has to locate the TK_ALL expressions and expand
82748 ** Generate code for the SELECT statement given in the p argument.
82850 /* Begin generating code.
82855 /* Generate code for all sub-queries in the FROM clause
83199 /* Generate code that runs whenever the GROUP BY changes.
83200 ** Changes in the GROUP BY are detected by the previous code
83203 ** This code copies current group by terms in b0,b1,b2,...
83337 ** If it is, then ask the code in where.c to attempt to sort results
83340 ** add vdbe code to break out of the processing loop after the
83352 ** + The optimizer code in where.c (the thing that decides which
83355 ** Refer to code and comments in where.c for details.
83410 /* The SELECT was successfully coded. Set the return code to 0
83434 ** The following code is used for testing and debugging only. The code
83439 ** for helping to understand what is happening inside the code generator
83443 ** code base. Then are intended to be called from within the debugger
83523 /* End of the structure debug printing code
83532 ** The author disclaims copyright to this source code. In place of
83561 int rc; /* Return code from sqlite3_exec() */
83728 code. In place of
83923 int code = SQLITE_CREATE_TRIGGER;
83926 if( iTabDb==1 || isTemp ) code = SQLITE_CREATE_TEMP_TRIGGER;
83927 if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
83938 ** INSTEAD OF trigger into a BEFORE trigger. It simplifies code
84256 int code = SQLITE_DROP_TRIGGER;
84259 if( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;
84260 if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
84267 /* Generate code to destroy the database record of the trigger.
84395 ** Generate VDBE code for the statements inside the body of a single
84473 ** program. It is not used in production code, only for debugging.
84510 Trigger *pTrigger, /* Trigger to code */
84512 int orconf /* ON CONFLICT policy to code trigger program with */
84569 /* If one was specified, code the WHEN clause. If it evaluates to false
84583 /* Code the trigger program into the sub-vdbe. */
84620 Trigger *pTrigger, /* Trigger to code */
84647 ** Generate code for the trigger program associated with trigger p on
84654 Trigger *p, /* Trigger to code */
84655 Table *pTab, /* The table to code triggers from */
84665 /* Code
84684 ** This is called to code the required FOR EACH ROW triggers for an operation
84685 ** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
84729 Table *pTab, /* The table to code triggers from */
84750 /* Determine whether we should code this trigger */
84791 Table *pTab, /* The table to code triggers from */
84821 ** The author disclaims copyright to this source code. In place of
84829 ** This file contains C code routines that are called by the parser
84871 ** If parameter iReg is not negative, code an OP_RealAffinity instruction
85076 /* Begin generating code. */
85363 ** generating code because of a call to sqlite3NestedParse(), do not
85393 ** Generate code for an UPDATE of a virtual table.
85463 /* Generate code to scan the ephemeral table and call VUpdate. */
85489 ** The author disclaims copyright to this source code. In place of
85497 ** This file contains code used to implement the VACUUM command.
85499 ** Most of the code in this file may be omitted by defining the
85506 ** text of the error message in *pzErrMsg. Return the result code.
85518 ** Execute zSql on database db. Return an error code.
85579 int rc = SQLITE_OK; /* Return code from service routines */
85817 ** The author disclaims copyright to this source code. In place of
85825 ** This file contains code used to help implement virtual tables.
86344 ** of the virtual table pTab. If an error occurs, an error code is returned
86409 ** description of the error and an SQLITE_XXX error code is returned.
86565 ** array. Return the error code for the first error that occurs, or
86759 ** The author disclaims copyright to this source code. In place of
86767 ** This module contains C code that generates VDBE code used to process
86769 ** generating the code that loops through a table looking for applicable
86868 #define TERM_VIRTUAL 0x02 /* Added by the optimizer. Do not code */
87378 Parse *pParse, /* Parsing and code generating context */
88555 ** code is generated to access the virtual table. The whereInfoDelete()
88795 ** If an error occurs, return an error code. Otherwise, SQLITE_OK.
88859 Parse *pParse, /* Parsing & code generating context */
89346 ** Code an OP_Affinity opcode to apply the column affinity string zAff
89351 ** SQLITE_AFF_NONE, then no code gets generated.
89376 /* Code the OP_Affinity opcode if there is anything left to do. */
89386 ** Generate code for a single equality term of the WHERE clause. An equality
89451 ** Generate code that will evaluate all == and IN constraints for an
89458 ** constraints are coded. This routine will generate code to evaluate
89468 ** the index of that memory cell. The code that
89497 int nEq = pLevel->plan.nEq; /* The number of == or IN constraints to code */
89560 ** Generate code for the start of the iLevel-th loop in the WHERE clause
89849 /* Generate code to evaluate all constraint terms using == or IN
89998 ** Gosub opcode and jumps straight to the code generated by WhereEnd().
90005 ** Following the above, code to terminate the loop. Label A, the target
90068 ** correct response for the end-of-loop code (the OP_Return) is to
90134 /* Insert code to test every subexpression that can be completely
90159 /* For a LEFT OUTER JOIN, generate code that will record the fact that
90236 ** Then the code generated is conceptually like the following:
90238 ** foreach row1 in t1 do \ Code generated
90242 ** end \ Code generated
90254 ** And so forth. This routine generates code to open those VDBE cursors
90255 ** and sqlite3WhereEnd() generates the code to close them.
90257 ** The code that sqlite3WhereBegin() generates leaves the cursors named
90258 ** in pTabList pointing at their appropriate entries. The [...] code
90266 ** code will run much faster. Most of the work of this routine is checking
90339 ** only generate code for the first table in pTabList and assume that
90378 ** expression and either jump over all of the code or fall thru.
90673 /* Generate the code to do the search. Each iteration of the for
90674 ** loop below generates code for a single nested loop of the VM
90755 /* Generate loop termination code.
90819 /* If this scan uses an index, make code substitutions to read data
90826 ** Calls to the code generator in between sqlite3WhereBegin and
90827 ** sqlite3WhereEnd will have created code that references the table
90828 ** directly. This loop scans all that code looking for opcodes
90869 ** The author disclaims copyright to this source code.
90877 /* First off, code is included that follows the "include" declaration
91041 ** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
91042 ** sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser
91045 ** YYERRORSYMBOL is the code number of the error symbol. If not
91092 ** to a macro that can assist in verifying code coverage. For production
91093 ** code the yytestcase() macro should be turned off. But it is useful
91712 YYCODETYPE major; /* The major token value. This is the code
92231 ** "yymajor" is the symbol code, and "yypminor" is a pointer to
92236 YYCODETYPE yymajor, /* Type code for object to destroy */
92249 ** inside the C code.
92499 /* Here code is inserted which will execute if the parser
92923 ** as the value is never used. So really the only thing this code
92927 ** without this code, their parser segfaults. I'm not sure what there
92941 ** { ... } // User supplied code
94054 ** The following code executes when the parse fails
94067 /* Here code is inserted which will be executed whenever the
94074 ** The following code executes when a syntax error first occurs.
94104 /* Here code is inserted which will be executed whenever the
94130 int yymajor, /* The major token code number */
94284 ** The author disclaims copyright to this source code. In place of
94294 ** This file contains C code that splits an SQL input string up into
94334 ** it is a keyword. If it is a keyword, the token code of that keyword is
94345 /***** This file contains automatically generated code ******
94347 ** The code in this file has been automatically generated by
94351 ** The code in this file implements a function that determines whether
94354 ** But by using this automatically generated code, the size of the code
94935 ** passed in. An SQLITE_ status code is returned. If an error occurs
95056 ** structure built up in pParse->pNewTable. The calling code (see vtab.c)
95086 ** The author disclaims copyright to this source code. In place of
95096 ** This file contains C code that implements the sqlite3_complete() API.
95097 ** This code used to be part of the tokenizer.c source file. But by
95098 ** separating it out, the code will be automatically omitted from
95371 ** The author disclaims copyright to this source code. In place of
95391 ** The author disclaims copyright to this source code. In place of
95425 ** The author disclaims copyright to this source code. In place of
95457 ** The author disclaims copyright to this source code. In place of
95548 int rc; /* Result code */
95650 ** been compiled correctly. It is important to run this code, but
95656 /* This section of code's only "output" is via assert() statements. */
96109 /* Tell the code in notify.c that the connection no longer holds any
96383 ** that it is designed to be called by internal code. The difference is
96384 ** that if a malloc() fails in sqlite3_create_function(), an error code
96802 ** Return the most recent error code generated by an SQLite routine. If NULL is
97022 ** dealt with in the previous code block. Besides these, the only
97427 ** 2. Invoke sqlite3_log() to provide the source code location where
97832 ** The author disclaims copyright to this source code. In place of
98098 ** code to the caller is insufficient, as even if an error code
98164 ** The author disclaims copyright to this source code. In place of
98177 ** The code in this file is only compiled if:
98446 ** The author disclaims copyright to this source code. In place of
98469 ** The author disclaims copyright to this source code.
98535 ** code. If SQLITE_OK is returned, then *ppTokenizer should be set
98573 ** the end of the buffer has been reached, or an SQLite error code.
98625 ** The author disclaims copyright to this source code. In place of
98647 ** code should not attempt to access or modify the fields of this structure
99171 int rc; /* Return code */
99194 ** Otherwise, return an SQLite error code.
99207 int rc; /* Return code */
99239 int rc; /* Return code */
99303 int rc; /* Return code */
99568 int rc = SQLITE_OK; /* Return code */
99602 ** If an error occurs, an error code other than SQLITE_OK is returned.
99612 int rc = SQLITE_OK; /* Return code */
100277 int rc; /* Return code */
100295 ** The code in this loop does not actually load any leaves into memory
100424 ** smaller than nList bytes. The code in fts3DoclistMerge() is written
100459 int rc = SQLITE_OK; /* Return code */
100586 int rc; /* Return code */
100676 int rc; /* Return Code */
100955 int rc; /* Return code */
101048 int rc = SQLITE_NOMEM; /* Return Code */
101184 /* An error has occurred. Delete the hash table and return the error code. */
101211 ** The author disclaims copyright to this source code. In place of
101220 ** This module contains code that implements a parser for fts3 query strings
101506 ** Returns an SQLite error code. SQLITE_OK if everything works, SQLITE_NOMEM
101520 unsigned char eType; /* Keyword code */
101948 ** Everything after this point is just test code.
102133 ** The author disclaims copyright to this source code. In place of
102147 ** The code in this file is only compiled if:
102276 ** For help in interpreted the obscure C code in the function definition,
102514 ** The author disclaims copyright to this source code. In place of
102527 ** The code in this file is only compiled if:
103155 ** The author disclaims copyright to this source code. In place of
103169 ** The code in this file is only compiled if:
103541 ** can be used as designed by the C-code in the queryTokenizer and
103650 ** The author disclaims copyright to this source code. In place of
103663 ** The code in this file is only compiled if:
103876 ** The author disclaims copyright to this source code. In place of
103886 ** this file contains code to insert, update and delete rows from FTS3
103887 ** tables. It also contains code to merge FTS3 b-tree segments. Some
103889 ** code in fts3.c.
103916 ** this structure are only manipulated by code in this file, opaque handles
103917 ** of type Fts3SegReader* are also used by code in fts3.c to iterate through
103982 ** the leaf nodes). These functions and type are only ever used by code
104028 ** Otherwise, an SQLite error code is returned and *pp is set to 0.
104120 ** SQLite error code otherwise.
104136 ** etc.) occurs, return the appropriate SQLite error code.
104176 ** return an SQLite error code.
104196 ** if successful, or an SQLite error code otherwise.
104255 int *pRc /* OUT: Return code */
104307 ** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.
104438 int rc; /* Return code */
104492 int rc; /* Return code */
104556 ** returned. Otherwise, an SQLite error code is returned.
104559 int rc; /* Return Code */
104593 ** SQLITE_DONE. Otherwise, an SQLite error code.
104752 int rc = SQLITE_OK; /* Return code */
104864 int rc = SQLITE_OK; /* Return Code */
104947 ** code is returned.
105292 ** blocks were written to the db). Otherwise, an SQLite error code is
105362 ** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.
105500 ** returned. Otherwise, an SQLite error code.
105508 int rc; /* Return code */
105554 ** error occurs, an SQLite error code is returned.
105572 ** Return SQLITE_OK if successful, or an SQLite error code if not.
105593 ** Return SQLITE_OK if successful, or an SQLite error code if not.
105620 ** SQLITE_OK is returned if successful, otherwise an SQLite error code.
105628 int rc; /* Return Code */
105771 int rc = SQLITE_OK; /* Return code */
105926 ** an SQLite error code is returned.
105930 int rc; /* Return code */
106031 int rc; /* Return Code */
106091 int rc; /* Return Code */
106130 int rc = SQLITE_OK; /* Return Code */
106206 ** The author disclaims copyright to this source code. In place of
106448 int rc; /* Return code */
106952 ** the iteration is abandoned and the error code returned immediately.
107130 int rc; /* Return Code */
107267 int rc; /* Return code */
107549 ** The author disclaims copyright to this source code. In place of
107557 ** This file contains code for implementations of the r-tree and r*-tree
108512 ** to zero and return an SQLite error code.
110166 ** code is returned.
110410 ** The author disclaims copyright to this source code. In place of
110611 UErrorCode e /* Error code returned by ICU function */
110823 int rc; /* Return code from sqlite3_create_collation_x() */
110909 ** The author disclaims copyright to this source code. In place of