Lines Matching refs:sqlite3
11 ** programs, you need this file and the "sqlite3.h" header file that defines
13 ** the "sqlite3.h" header file at hand, you will find a copy embedded within
14 ** the text of this file. Search for "Begin file sqlite3.h" to find the start
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
570 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
571 /************** Begin file sqlite3.h *****************************************/
601 ** the version number) and changes its name to "sqlite3.h" as
657 ** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header
790 ** the opaque structure named "sqlite3". It is useful to think of an sqlite3
797 ** sqlite3 object.
799 typedef struct sqlite3 sqlite3;
842 ** for the [sqlite3] object.
844 ** the [sqlite3] object is successfully destroyed and all associated
861 ** with the [sqlite3] object prior to attempting to close the object. ^If
868 ** ^If an [sqlite3] object is destroyed while a transaction is open,
873 ** pointer or an [sqlite3] object pointer obtained
879 SQLITE_API int sqlite3_close(sqlite3*);
880 SQLITE_API int sqlite3_close_v2(sqlite3*);
951 sqlite3*, /* An open database */
1900 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
2220 ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
2341 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
2390 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2444 SQLITE_API int sqlite3_changes(sqlite3*);
2470 SQLITE_API int sqlite3_total_changes(sqlite3*);
2509 SQLITE_API void sqlite3_interrupt(sqlite3*);
2611 SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
2631 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2706 sqlite3 *db, /* An open database */
3015 sqlite3*,
3117 SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
3118 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
3151 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3161 ** if SQLite is unable to allocate memory to hold the [sqlite3] object,
3162 ** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
3357 sqlite3 **ppDb /* OUT: SQLite db handle */
3361 sqlite3 **ppDb /* OUT: SQLite db handle */
3365 sqlite3 **ppDb, /* OUT: SQLite db handle */
3452 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3453 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3454 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3455 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3523 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3672 sqlite3 *db, /* Database handle */
3679 sqlite3 *db, /* Database handle */
3686 sqlite3 *db, /* Database handle */
3693 sqlite3 *db, /* Database handle */
4559 sqlite3 *db,
4569 sqlite3 *db,
4579 sqlite3 *db,
4748 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
5021 sqlite3*,
5028 sqlite3*,
5036 sqlite3*,
5070 sqlite3*,
5072 void(*)(void*,sqlite3*,int eTextRep,const char*)
5075 sqlite3*,
5077 void(*)(void*,sqlite3*,int eTextRep,const void*)
5089 sqlite3 *db, /* Database to be rekeyed */
5102 sqlite3 *db, /* Database to be rekeyed */
5248 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
5260 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
5276 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5285 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5300 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5348 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5349 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5398 sqlite3*,
5461 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
5590 sqlite3 *db, /* Connection handle */
5636 sqlite3 *db, /* Load the extension into this database connection */
5655 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5672 ** sqlite3 *db,
5737 int (*xCreate)(sqlite3*, void *pAux,
5740 int (*xConnect)(sqlite3*, void *pAux,
5890 sqlite3 *db, /* SQLite connection to register module with */
5896 sqlite3 *db, /* SQLite connection to register module with */
5958 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
5976 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6059 sqlite3*,
6491 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6525 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6722 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7300 sqlite3 *pDest, /* Destination database handle */
7302 sqlite3 *pSource, /* Source database handle */
7425 sqlite3 *pBlocked, /* Waiting connection */
7516 sqlite3*,
7517 int(*)(void *,sqlite3*,const char*,int),
7546 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7564 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7637 sqlite3 *db, /* Database handle */
7670 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
7723 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
7787 sqlite3 *db,
7818 /************** End of sqlite3.h *********************************************/
8538 sqlite3 *db, /* Associated database connection */
8712 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*);
8723 SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*);
8727 SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3*);
8728 SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
9108 SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*);
9129 SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3*,Vdbe*);
9144 SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
9929 ** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing.
9939 ** holding a mutex on the sqlite3 connection pointer that owns the Btree.
10033 struct sqlite3 {
10082 int (*xWalCallback)(void *, sqlite3 *, const char *, int);
10085 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
10086 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
10126 ** mutex, not by sqlite3.mutex. They are used by code in notify.c.
10135 sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */
10136 sqlite3 *pUnlockConnection; /* Connection to watch for unlock */
10139 sqlite3 *pNextBlocked; /* Next in list of all blocked connections */
10149 ** Possible values for the sqlite3.flags.
10179 ** Bits of the sqlite3.dbOptFlags field that are used by the
10314 ** sqlite3.pSavepoint. The first element in the list is the most recently
10335 ** instance of the following structure, stored in the sqlite3.aModule
10429 ** structure for each database connection (sqlite3*) that uses the shared
10454 ** another linked list headed by the sqlite3.pDisconnect member of the
10455 ** corresponding sqlite3 structure. They are then deleted/xDisconnected
10456 ** next time a statement is prepared using said sqlite3*. This is done
10457 ** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.
10459 ** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect
10460 ** list without holding the corresponding sqlite3.mutex mutex.
10467 sqlite3 *db; /* Database connection associated with this table */
10641 sqlite3 *db; /* The database connection */
11380 int iDb; /* Index in sqlite3.aDb[] of database holding pTab */
11443 sqlite3 *db; /* The main database structure */
11570 * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
11674 sqlite3 *db; /* Optional database for lookaside. Can be NULL */
11690 sqlite3 *db; /* The database being initialized */
11739 void(*xSqllog)(void*,sqlite3*,const char*, int);
11853 SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3*, int);
11854 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, int);
11855 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
11856 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, int);
11858 SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
11859 SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, int);
11860 SQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);
11862 SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, void*);
11919 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
11920 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
11921 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
11951 SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
11962 SQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);
11963 SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
11964 SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);
11966 SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);
11969 SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
11973 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);
11974 SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
11977 SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3*);
11978 SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3*,int);
11979 SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3*);
11981 SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
11995 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);
12006 SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);
12022 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3*, Table*);
12032 SQLITE_PRIVATE void *sqlite3ArrayAllocate(sqlite3*,void*,int,int*,int*);
12033 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3*, IdList*, Token*);
12035 SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(sqlite3*, SrcList*, int, int);
12036 SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*);
12043 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);
12044 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);
12051 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
12079 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
12082 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
12083 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
12084 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
12086 SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
12087 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
12097 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*,int);
12104 SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);
12105 SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*);
12125 SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
12126 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
12127 SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
12128 SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3*,IdList*);
12129 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3*,Select*,int);
12131 SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,u8);
12132 SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*);
12135 SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);
12136 SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);
12155 SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);
12156 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);
12157 SQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,
12159 SQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, u8);
12160 SQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);
12161 SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3*, Trigger*);
12162 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
12252 SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
12253 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
12264 SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
12272 SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, int);
12289 SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);
12290 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
12292 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *, u8, char *, int, int *);
12294 SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
12307 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3*, int, int, int);
12313 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
12327 SQLITE_PRIVATE int sqlite3FindDb(sqlite3*, Token*);
12328 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);
12329 SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3*,int iDB);
12330 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3*,Index*);
12332 SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);
12333 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
12336 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
12337 SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
12339 SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,
12344 SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);
12353 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);
12368 SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3*);
12370 SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3*);
12397 SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table*);
12398 SQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p);
12399 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **);
12400 SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db);
12401 SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db);
12404 SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3*);
12405 SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *, int, int);
12406 SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
12414 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);
12416 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);
12417 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *);
12418 SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);
12425 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3*);
12428 SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3*, int, int, int*, int*);
12429 SQLITE_PRIVATE int sqlite3WalDefaultHook(void*,sqlite3*,const char*,int);
12454 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
12515 SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);
12516 SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db);
12517 SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db);
13376 i64 lastRowid; /* Last insert rowid (sqlite3.lastRowid) */
13400 sqlite3 *db; /* The associated database connection */
13551 sqlite3 *db; /* The database connection that owns this statement */
13639 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor *, i64 *);
13683 SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *, VdbeCursor *);
13684 SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *, VdbeCursor *);
13686 SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *, const VdbeCursor *, int *);
13687 SQLITE_PRIVATE int sqlite3VdbeSorterRewind(sqlite3 *, const VdbeCursor *, int *);
13688 SQLITE_PRIVATE int sqlite3VdbeSorterWrite(sqlite3 *, const VdbeCursor *, Mem *);
13811 sqlite3 *db, /* The database connection whose status is desired */
14261 sqlite3 *db = sqlite3_context_db_handle(context);
14852 sqlite3 *db;
15036 sqlite3 *db;
19200 static int isLookaside(sqlite3 *db, void *p){
19216 SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
19250 SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
19354 SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, int n){
19380 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, int n){
19424 SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, int n){
19461 SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, int n){
19477 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
19491 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
19510 SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
19535 SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
20349 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
20369 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
20386 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
21107 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
21135 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *db, u8 enc, char *z, int n, int *pnOut){
21346 SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
21382 sqlite3 *db = pParse->db;
22268 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
22310 SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
22327 SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
23810 ** useful to the clients of the sqlite3 functions. Specifically, it is
37791 sqlite3 *db; /* The database connection */
37819 SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
48949 ** All fields in this structure are accessed under sqlite3.mutex.
48953 ** they often do so without holding sqlite3.mutex.
48956 sqlite3 *db; /* The database connection holding this btree */
49018 sqlite3 *db; /* Database connection currently using this Btree */
49444 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
49453 SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
49478 SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){
49507 SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){
49534 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
51284 sqlite3 *db, /* Associated database handle */
52203 sqlite3 *pBlock = 0;
58060 sqlite3* pDestDb; /* Destination database handle */
58066 sqlite3* pSrcDb; /* Source database handle */
58120 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
58171 sqlite3* pDestDb, /* Database to write to */
58173 sqlite3* pSrcDb, /* Database connection to read from */
58612 sqlite3 *pSrcDb; /* Source database connection */
59344 sqlite3 *db = pMem->db;
59784 SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){
59805 sqlite3 *db, /* The database connection */
59971 SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3 *db){
60523 static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){
60529 static void vdbeFreeOpArray(sqlite3 *, Op *, int);
60534 static void freeP4(sqlite3 *db, int p4type, void *p4){
60585 static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
60614 sqlite3 *db = p->db;
60648 sqlite3 *db;
60937 sqlite3 *db;
60959 sqlite3 *db;
61002 sqlite3 *db = p->db;
61076 sqlite3 *db = p->db; /* The database connection */
61402 sqlite3 *db; /* The database connection */
61597 sqlite3 *db = p->db;
61623 sqlite3 *db = p->db;
61676 static int vdbeCommit(sqlite3 *db, Vdbe *p){
61914 ** This routine checks that the sqlite3.activeVdbeCnt count variable
61915 ** matches the number of vdbe's in the list sqlite3.pVdbe that are
61923 static void checkActiveVdbeCnt(sqlite3 *db){
61953 sqlite3 *const db = p->db;
62018 sqlite3 *db = p->db;
62044 sqlite3 *db = p->db;
62249 sqlite3 *db = p->db;
62297 sqlite3 *db;
62401 SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){
62428 sqlite3 *db;
63010 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
63124 SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, int nChange){
63148 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db){
63158 SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe *v){
63273 sqlite3 *db = v->db;
63509 static int doWalCallbacks(sqlite3 *db){
63536 sqlite3 *db;
63666 sqlite3 *db; /* The database connection */
63724 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
64048 sqlite3 *db = p->db;
64451 ** Return the sqlite3* database handle to which the prepared statement given
64456 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
64482 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
64553 ** obtained from sqlite3DbMalloc(). If sqlite3.vdbeExecCnt is 1, then the
64555 ** their current bindings. Or, if sqlite3.vdbeExecCnt is greater than 1,
64579 sqlite3 *db; /* The database connection */
64873 ** field of the sqlite3 structure is set in order to simulate an interrupt.
65371 ** checks that the sqlite3.nTransaction variable is correctly set to
65373 ** linked list starting at sqlite3.pSavepoint.
65379 static int checkSavepointCount(sqlite3 *db){
65394 sqlite3 *db = p->db;
65440 sqlite3 *db = p->db; /* The database */
66466 /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then
69404 ** (sqlite3.xUpdateCallback) is invoked following a successful insert.
71112 ** P1 is the index of the database in sqlite3.aDb[] of the database
71734 sqlite3 *db; /* The associated database */
71811 sqlite3* db, /* The database connection */
72042 sqlite3 *db;
72069 sqlite3 *db;
72144 sqlite3 *db;
72335 static void vdbeSorterIterZero(sqlite3 *db, VdbeSorterIter *pIter){
72351 sqlite3 *db, /* Database handle (for malloc) */
72436 static int vdbeSorterIterVarint(sqlite3 *db, VdbeSorterIter *p, u64 *pnOut){
72462 sqlite3 *db, /* Database handle (for sqlite3DbMalloc() ) */
72490 sqlite3 *db, /* Database handle */
72640 SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *db, VdbeCursor *pCsr){
72670 static void vdbeSorterRecordFree(sqlite3 *db, SorterRecord *pRecord){
72682 SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *db, VdbeCursor *pCsr){
72707 static int vdbeSorterOpenTempFile(sqlite3 *db, sqlite3_file **ppFile){
72792 sqlite3 *db, /* Database (for malloc) */
72848 static int fileWriterFinish(sqlite3 *db, FileWriter *p, i64 *piEof){
72887 static int vdbeSorterListToPMA(sqlite3 *db, const VdbeCursor *pCsr){
72933 sqlite3 *db, /* Database handle */
72985 sqlite3 *db, /* Database handle */
73016 SQLITE_PRIVATE int sqlite3VdbeSorterRewind(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){
73125 SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){
73984 sqlite3 *db; /* The database connection */
74110 sqlite3 *db = pParse->db; /* The database connection */
74394 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
74661 sqlite3 *db; /* Database connection */
74733 sqlite3 *db;
74829 sqlite3 *db = pParse->db;
74937 sqlite3 *db; /* Database connection */
75331 sqlite3 *db = pParse->db;
75625 sqlite3 *db, /* Handle for sqlite3DbMallocZero() (may be null) */
75674 sqlite3 *db, /* Handle for sqlite3DbMallocZero() (may be null) */
75691 sqlite3 *db,
75767 SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
75789 sqlite3 *db = pParse->db;
75819 sqlite3 *db = pParse->db;
75889 SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3 *db, Expr *p){
76019 static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){
76120 SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3 *db, Expr *p, int flags){
76123 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
76160 SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
76197 SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, IdList *p){
76220 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
76247 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
76267 sqlite3 *db = pParse->db;
76337 sqlite3 *db = pParse->db;
76369 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
76744 sqlite3 *db = pParse->db; /* Database connection */
77558 sqlite3 *db = pParse->db; /* The database connection */
79151 static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
79167 static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
79466 sqlite3 *db = sqlite3_context_db_handle(context);
79522 sqlite3 *db = sqlite3_context_db_handle(context);
79586 sqlite3 *db = sqlite3_context_db_handle(context);
79679 static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
79724 sqlite3 *db = pParse->db;
79817 sqlite3 *db = pParse->db; /* Database connection */
80047 sqlite3 *db; /* The database connection; */
80169 sqlite3 *db = pParse->db;
80399 sqlite3 *db = pParse->db;
80678 sqlite3 *db = pParse->db; /* Database handle */
80961 sqlite3 *db = pParse->db;
81017 sqlite3 *db = pParse->db;
81079 sqlite3 *db;
81141 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){
81168 static int loadStat3(sqlite3 *db, const char *zDb){
81312 SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
81439 sqlite3 *db = sqlite3_context_db_handle(context);
81540 extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
81541 extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
81625 sqlite3 *db = sqlite3_context_db_handle(context);
81683 sqlite3* db = pParse->db;
81799 sqlite3 *db;
82001 sqlite3 *db,
82025 ** callback has been registered (i.e. that sqlite3.xAuth is not NULL).
82037 sqlite3 *db = pParse->db; /* Database handle */
82070 sqlite3 *db = pParse->db;
82128 sqlite3 *db = pParse->db;
82308 sqlite3 *db;
82415 sqlite3 *db = pParse->db;
82449 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
82541 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
82562 static void freeIndex(sqlite3 *db, Index *p){
82576 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
82611 SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3 *db){
82638 SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3 *db, int iDb){
82664 SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
82682 SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){
82690 static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
82721 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
82777 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
82806 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
82837 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
82858 SQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){
82890 sqlite3 *db = pParse->db;
82957 sqlite3 *db = pParse->db;
83174 sqlite3 *db = pParse->db;
83320 sqlite3 *db = pParse->db;
83450 sqlite3 *db;
83498 sqlite3 *db = pParse->db;
83530 sqlite3 *db = pParse->db;
83595 static char *createTableStmt(sqlite3 *db, Table *p){
83686 sqlite3 *db = pParse->db;
83907 sqlite3 *db = pParse->db;
83974 sqlite3 *db = pParse->db; /* Database connection for malloc errors */
84064 static void sqliteViewResetAll(sqlite3 *db, int idx){
84100 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3 *db, int iDb, int iFrom, int iTo){
84241 sqlite3 *db = pParse->db;
84313 sqlite3 *db = pParse->db;
84431 sqlite3 *db = pParse->db;
84577 sqlite3 *db = pParse->db; /* The database connection */
84678 sqlite3 *db = pParse->db;
85166 sqlite3 *db = pParse->db;
85245 sqlite3 *db, /* Connection to notify of malloc failures */
85275 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
85299 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
85342 sqlite3 *db, /* Database connection to notify of OOM errors */
85424 sqlite3 *db, /* Connection to notify of malloc failures */
85476 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
85520 sqlite3 *db = pParse->db;
85598 sqlite3 *db;
85679 sqlite3 *db = pParse->db;
85747 sqlite3 *db = pToplevel->db;
85770 sqlite3 *db = pParse->db;
85899 sqlite3 *db = pParse->db; /* The database connection */
85935 sqlite3 *db = pParse->db; /* The database connection */
85996 sqlite3 *db = pParse->db;
86042 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
86071 static int synthCollSeq(sqlite3 *db, CollSeq *pColl){
86108 sqlite3 *db = pParse->db;
86145 sqlite3 *db = pParse->db;
86162 ** Each pointer stored in the sqlite3.aCollSeq hash table contains an
86171 sqlite3 *db, /* Database connection */
86224 sqlite3 *db,
86365 sqlite3 *db, /* An open database */
86480 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
86597 sqlite3 *db = pParse->db;
86733 sqlite3 *db; /* Main database structure */
87514 sqlite3 *db = sqlite3_context_db_handle(context);
87640 sqlite3 *db = sqlite3_context_db_handle(context);
87660 sqlite3 *db = sqlite3_context_db_handle(context);
87674 sqlite3 *db = sqlite3_context_db_handle(context);
87885 sqlite3 *db = sqlite3_context_db_handle(context);
88218 sqlite3 *db = sqlite3_context_db_handle(context);
88288 sqlite3 *db = sqlite3_context_db_handle(context);
88469 sqlite3 *db = sqlite3_context_db_handle(context);
88615 ** returns (void *)db, where db is the sqlite3* database pointer.
88658 sqlite3 *db = sqlite3_context_db_handle(context);
88697 SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
88708 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
88722 SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
88745 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
89359 sqlite3 *db = pParse->db; /* Database handle */
89489 static void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){
89518 sqlite3 *db = pParse->db;
89584 sqlite3 *db = pParse->db; /* Database handle */
89859 sqlite3 *db = pParse->db; /* Database handle */
90067 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
90128 int iDb, /* The database index in sqlite3.aDb[] */
90174 sqlite3 *db = sqlite3VdbeDb(v);
90215 sqlite3 *db = sqlite3VdbeDb(v);
90330 sqlite3 *db = pParse->db; /* The database connection */
90387 sqlite3 *db = pParse->db;
90638 sqlite3 *db; /* The main database structure */
91317 sqlite3 *db; /* Database connection */
92045 sqlite3 *db, /* The database on which the SQL executes */
92194 ** sqlite3.h.
92225 int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
92226 int (*busy_timeout)(sqlite3*,int ms);
92227 int (*changes)(sqlite3*);
92228 int (*close)(sqlite3*);
92229 int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
92231 int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
92254 void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
92257 int (*create_collation)(sqlite3*,const char*,int,void*,
92259 int (*create_collation16)(sqlite3*,const void*,int,void*,
92261 int (*create_function)(sqlite3*,const char*,int,int,void*,
92265 int (*create_function16)(sqlite3*,const void*,int,int,void*,
92269 int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
92271 sqlite3 * (*db_handle)(sqlite3_stmt*);
92272 int (*declare_vtab)(sqlite3*,const char*);
92274 int (*errcode)(sqlite3*db);
92275 const char * (*errmsg)(sqlite3*);
92276 const void * (*errmsg16)(sqlite3*);
92277 int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
92282 int (*get_autocommit)(sqlite3*);
92284 int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
92286 void (*interruptx)(sqlite3*);
92287 sqlite_int64 (*last_insert_rowid)(sqlite3*);
92292 int (*open)(const char*,sqlite3**);
92293 int (*open16)(const void*,sqlite3**);
92294 int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
92295 int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
92296 void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
92297 void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
92312 void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
92313 int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
92318 int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
92321 int (*total_changes)(sqlite3*);
92322 void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
92324 void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
92341 int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
92343 int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
92344 int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
92347 int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
92353 int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
92357 int (*create_collation_v2)(sqlite3*,const char*,int,void*,
92360 int (*file_control)(sqlite3*,const char*,int,void*);
92368 int (*open_v2)(const char*,sqlite3**,int,const char*);
92382 sqlite3 *(*context_db_handle)(sqlite3_context*);
92383 int (*extended_result_codes)(sqlite3*,int);
92384 int (*limit)(sqlite3*,int,int);
92385 sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
92389 sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
92395 int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
92400 int (*db_config)(sqlite3*,int,...);
92401 sqlite3_mutex *(*db_mutex)(sqlite3*);
92402 int (*db_status)(sqlite3*,int,int*,int*,int);
92403 int (*extended_errcode)(sqlite3*);
92409 int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
92410 int (*wal_autocheckpoint)(sqlite3*,int);
92411 int (*wal_checkpoint)(sqlite3*,const char*);
92412 void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
92414 int (*vtab_config)(sqlite3*,int op,...);
92415 int (*vtab_on_conflict)(sqlite3*);
92417 int (*close_v2)(sqlite3*);
92418 const char *(*db_filename)(sqlite3*,const char*);
92419 int (*db_readonly)(sqlite3*,const char*);
92420 int (*db_release_memory)(sqlite3*);
92429 int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
93053 sqlite3 *db, /* Load the extension into this database connection */
93060 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
93117 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
93150 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
93192 sqlite3 *db, /* Load the extension into this database connection */
93209 SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
93222 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
93340 SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
93344 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
93361 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
93487 sqlite3 *db = pParse->db;
93510 sqlite3 *db = pParse->db;
93587 sqlite3 *db = pParse->db;
93695 sqlite3 *db = pParse->db; /* The database connection */
93919 ** Also, the sqlite3.dfltLockMode variable is set so that
95229 sqlite3 *db = pData->db;
95256 sqlite3 *db = pData->db;
95336 static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
95458 ** main database, set sqlite3.enc to the encoding of the main database.
95460 ** as sqlite3.enc.
95594 SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
95637 sqlite3 *db = pParse->db;
95656 sqlite3 *db = pParse->db;
95704 SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
95733 sqlite3 *db, /* Database handle. */
95892 sqlite3 *db, /* Database handle. */
95931 sqlite3 *db;
95965 sqlite3 *db, /* Database handle. */
95977 sqlite3 *db, /* Database handle. */
95995 sqlite3 *db, /* Database handle. */
96045 sqlite3 *db, /* Database handle. */
96057 sqlite3 *db, /* Database handle. */
96093 static void clearSelect(sqlite3 *db, Select *p){
96135 sqlite3 *db = pParse->db;
96175 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){
96322 sqlite3 *db = pParse->db;
96892 sqlite3 *db = pParse->db;
97311 sqlite3 *db = pParse->db;
97386 sqlite3 *db = pParse->db; /* Database connection */
97489 sqlite3 *db = pParse->db;
97522 sqlite3 *db = pParse->db;
97713 sqlite3 *db; /* Database connection */
98338 sqlite3 *db; /* Database connection */
98651 static void substExprList(sqlite3*, ExprList*, int, ExprList*);
98652 static void substSelect(sqlite3*, Select *, int, ExprList *);
98668 sqlite3 *db, /* Report malloc errors to this connection */
98697 sqlite3 *db, /* Report malloc errors here */
98709 sqlite3 *db, /* Report malloc errors here */
98874 sqlite3 *db = pParse->db;
99359 sqlite3 *db;
99428 sqlite3 *db = pParse->db;
99801 sqlite3 *db;
100048 sqlite3 *db; /* The database connection */
101029 sqlite3 *db, /* The database on which the SQL executes */
101128 SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){
101204 sqlite3 *db = pParse->db; /* The database connection */
101387 sqlite3 *db = pParse->db; /* The database */
101460 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
101479 sqlite3 *db, /* Database connection */
101504 sqlite3 *db, /* The database connection */
101537 sqlite3 *db, /* The database connection */
101562 sqlite3 *db, /* Database connection */
101580 SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){
101604 sqlite3 *db = pParse->db;
101654 sqlite3 *db = pParse->db;
101709 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
101801 sqlite3 *db = pParse->db;
101820 sqlite3 *db = pParse->db;
101939 sqlite3 *db = pParse->db; /* Database handle */
102348 sqlite3 *db; /* The database structure */
102863 sqlite3 *db = pParse->db; /* Database connection */
102945 static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){
102957 static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
102976 static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
103016 SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
103092 extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
103290 ** sqlite3.pVtabCtx member variable is set to point to an instance of
103306 sqlite3 *db, /* Database in which module is registered */
103350 sqlite3 *db, /* Database in which module is registered */
103362 sqlite3 *db, /* Database in which module is registered */
103389 SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){
103401 sqlite3 *db = pVTab->db;
103419 ** p->pVTable list to the sqlite3.pDisconnect lists of their associated
103424 static VTable *vtabDisconnectAll(sqlite3 *db, Table *p){
103432 ** this makes it safe to access the sqlite3.pDisconnect list of any
103438 sqlite3 *db2 = pVTable->db;
103464 SQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p){
103483 ** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
103487 ** caller. This is done to protect the sqlite3.pDisconnect list. The
103488 ** sqlite3.pDisconnect list is accessed only as follows:
103494 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex
103499 ** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously
103502 SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
103526 ** structure is associated with a single sqlite3* user of the schema.
103530 ** in the list are moved to the sqlite3.pDisconnect list of the associated
103533 SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){
103550 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
103584 sqlite3 *db; /* Database connection */
103624 sqlite3 *db = pParse->db;
103635 sqlite3 *db = pParse->db; /* The database connection */
103742 sqlite3 *db,
103745 int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
103855 sqlite3 *db = pParse->db;
103888 static int growVTrans(sqlite3 *db){
103891 /* Grow the sqlite3.aVTrans array if required */
103907 ** Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
103910 static void addToVTrans(sqlite3 *db, VTable *pVTab){
103911 /* Add pVtab to the end of sqlite3.aVTrans */
103924 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){
103965 SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
104028 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
104053 ** of each of the virtual tables in the sqlite3.aVTrans array. The method
104059 static void callFinaliser(sqlite3 *db, int offset){
104080 ** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
104087 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){
104109 ** sqlite3.aVTrans array. Then clear the array itself.
104111 SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db){
104118 ** sqlite3.aVTrans array. Then clear the array itself.
104120 SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db){
104131 ** in the sqlite3.aVTrans array.
104133 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
104161 ** sqlite3.aVTrans[] array. */
104188 SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){
104235 sqlite3 *db, /* Database connection for reporting malloc problems */
104326 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
104341 SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
104702 static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
104710 static void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){
104722 sqlite3 *db = pWC->pParse->db;
104763 sqlite3 *db = pWC->pParse->db;
105152 sqlite3 *db = pParse->db; /* Database connection */
105351 sqlite3 *db = pParse->db; /* Database connection */
105612 sqlite3 *db = pParse->db; /* Database connection */
106901 sqlite3 *db = pParse->db;
107299 sqlite3 *db = pParse->db; /* Database connection */
108405 static char *explainIndexRange(sqlite3 *db, WhereLevel *pLevel, Table *pTab){
108455 sqlite3 *db = pParse->db; /* Database handle */
109311 static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
109445 sqlite3 *db; /* Database connection */
110000 sqlite3 *db = pParse->db;
110242 sqlite3 *db = pParse->db;
114274 sqlite3 *db = pParse->db; /* The database connection */
114735 SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);
114767 SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);
114799 SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);
115273 typedef void(*SQLLOGFUNC_t)(void*, sqlite3*, const char*, int);
115313 static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
115369 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
115377 SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
115396 SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
115411 u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
115508 SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
115515 SQLITE_API int sqlite3_changes(sqlite3 *db){
115522 SQLITE_API int sqlite3_total_changes(sqlite3 *db){
115531 SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){
115548 static void functionDestroy(sqlite3 *db, FuncDef *p){
115563 static void disconnectAllVtab(sqlite3 *db){
115587 static int connectionIsBusy(sqlite3 *db){
115601 static int sqlite3Close(sqlite3 *db, int forceZombie){
115655 SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
115656 SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
115667 SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
115787 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
116000 sqlite3 *db = (sqlite3 *)ptr;
116019 sqlite3 *db = (sqlite3 *)ptr;
116020 int timeout = ((sqlite3 *)ptr)->busyTimeout;
116053 sqlite3 *db,
116073 sqlite3 *db,
116097 SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
116110 SQLITE_API void sqlite3_interrupt(sqlite3 *db){
116122 sqlite3 *db,
116216 sqlite3 *db,
116230 sqlite3 *db,
116267 sqlite3 *db,
116303 sqlite3 *db,
116328 SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
116346 sqlite3 *db,
116366 sqlite3 *db, /* Attach the hook to this database */
116384 sqlite3 *db, /* Attach the hook to this database */
116402 sqlite3 *db, /* Attach the hook to this database */
116419 ** is greater than sqlite3.pWalArg cast to an integer (the value configured by
116424 sqlite3 *db, /* Connection */
116448 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
116467 sqlite3 *db, /* Attach the hook to this db handle */
116468 int(*xCallback)(void *, sqlite3*, const char*, int),
116488 sqlite3 *db, /* Database handle */
116498 int iDb = SQLITE_MAX_ATTACHED; /* sqlite3.aDb[] index of db to checkpoint */
116534 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
116558 SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog, int *pnCkpt){
116602 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
116621 SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
116648 SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
116694 SQLITE_API int sqlite3_errcode(sqlite3 *db){
116703 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
116727 sqlite3* db,
116802 ** #defines in sqlite3.h.
116863 SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
117140 sqlite3 **ppDb, /* OUT: Returned database handle */
117144 sqlite3 *db; /* Store allocated handle here */
117213 db = sqlite3MallocZero( sizeof(sqlite3) );
117329 extern int sqlite3Fts1Init(sqlite3*);
117336 extern int sqlite3Fts2Init(sqlite3*);
117407 sqlite3 **ppDb
117414 sqlite3 **ppDb, /* OUT: SQLite db handle */
117427 sqlite3 **ppDb
117463 sqlite3* db,
117482 sqlite3* db,
117503 sqlite3* db,
117529 sqlite3 *db,
117531 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
117547 sqlite3 *db,
117549 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
117578 SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
117630 ** See comment in sqlite3.h (sqlite.h.in) for details.
117634 sqlite3 *db, /* Connection handle */
117760 SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
117770 SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
117942 /* sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
117948 sqlite3 *db = va_arg(ap, sqlite3*);
117956 /* sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
117966 sqlite3 *db = va_arg(ap, sqlite3*);
118089 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){
118105 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
118114 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
118153 ** Head of a linked list of all sqlite3 objects created by this process
118154 ** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection
118158 static sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;
118175 static void checkListProperties(sqlite3 *db){
118176 sqlite3 *p;
118179 sqlite3 *p2;
118201 static void removeFromBlockedList(sqlite3 *db){
118202 sqlite3 **pp;
118216 static void addToBlockedList(sqlite3 *db){
118217 sqlite3 **pp;
118267 sqlite3 *db,
118289 sqlite3 *p;
118316 SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
118333 ** 1) If the sqlite3.pBlockingConnection member of a list entry is
118336 ** 2) If the sqlite3.pUnlockConnection member of a list entry is
118344 SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db){
118347 sqlite3 **pp; /* Iterator variable */
118357 sqlite3 *p = *pp;
118443 SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){
119215 sqlite3 *db; /* The database connection */
119535 SQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, Fts3Hash *, const char *);
119554 SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
119555 SQLITE_PRIVATE int sqlite3Fts3InitTerm(sqlite3 *db);
119563 SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db);
119576 SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3*, Fts3Hash *);
119782 sqlite3 *db, /* Database in which to run SQL */
119807 sqlite3 *db = p->db; /* Database handle */
119893 sqlite3 *db = p->db; /* The database connection */
120275 sqlite3 *db, /* Database handle */
120347 sqlite3 *db, /* The SQLite database connection */
120683 sqlite3 *db, /* Database connection */
120693 sqlite3 *db, /* Database connection */
122713 sqlite3 *db = p->db; /* Database connection */
122864 SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
124639 sqlite3 *db,
124706 sqlite3 *db, /* Database connection */
125105 SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db){
126223 sqlite3 *db,
126329 sqlite3 *db = sqlite3_context_db_handle(context);
126404 SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
127777 sqlite3 *db,
127799 sqlite3 *db,
127851 sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);
127896 sqlite3 *db,
128334 sqlite3 *db, /* Database connection */
128597 SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3 *db, Fts3Hash *pHash){
135594 ** from the sqlite3 source file utf.c. If this file is compiled as part
136472 sqlite3 *db; /* Host database connection */
137053 sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int
137060 sqlite3 *db,
137073 sqlite3 *db,
139269 sqlite3 *db,
139346 static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
139377 sqlite3 *db, /* Database handle */
139421 sqlite3 *db, /* Database connection */
139587 SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db){
139659 sqlite3 *db,
139681 sqlite3 *db,
140108 sqlite3 *db = (sqlite3 *)sqlite3_user_data(p);
140142 SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){
140183 sqlite3 *db,