Lines Matching defs: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
114 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
115 /************** Begin file sqlite3.h *****************************************/
145 ** the version number) and changes its name to "sqlite3.h" as
201 ** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header
204 ** SQLite3) and Y is the minor version number and Z is the release number.)^
334 ** the opaque structure named "sqlite3". It is useful to think of an sqlite3
341 ** sqlite3 object.
343 typedef struct sqlite3 sqlite3;
386 ** for the [sqlite3] object.
388 ** the [sqlite3] object is successfully destroyed and all associated
405 ** with the [sqlite3] object prior to attempting to close the object. ^If
412 ** ^If an [sqlite3] object is destroyed while a transaction is open,
417 ** pointer or an [sqlite3] object pointer obtained
423 SQLITE_API int sqlite3_close(sqlite3*);
424 SQLITE_API int sqlite3_close_v2(sqlite3*);
495 sqlite3*, /* An open database */
1487 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
1807 ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
1936 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
1987 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2041 SQLITE_API int sqlite3_changes(sqlite3*);
2067 SQLITE_API int sqlite3_total_changes(sqlite3*);
2106 SQLITE_API void sqlite3_interrupt(sqlite3*);
2201 SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
2223 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2298 sqlite3 *db, /* An open database */
2609 sqlite3*,
2712 SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
2713 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
2747 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2757 ** if SQLite is unable to allocate memory to hold the [sqlite3] object,
2758 ** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
2978 sqlite3 **ppDb /* OUT: SQLite db handle */
2982 sqlite3 **ppDb /* OUT: SQLite db handle */
2986 sqlite3 **ppDb, /* OUT: SQLite db handle */
3073 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3074 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3075 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3076 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3144 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3292 sqlite3 *db, /* Database handle */
3299 sqlite3 *db, /* Database handle */
3306 sqlite3 *db, /* Database handle */
3313 sqlite3 *db, /* Database handle */
4188 sqlite3 *db,
4198 sqlite3 *db,
4208 sqlite3 *db,
4387 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4668 sqlite3*,
4675 sqlite3*,
4683 sqlite3*,
4717 sqlite3*,
4719 void(*)(void*,sqlite3*,int eTextRep,const char*)
4722 sqlite3*,
4724 void(*)(void*,sqlite3*,int eTextRep,const void*)
4736 sqlite3 *db, /* Database to be rekeyed */
4740 sqlite3 *db, /* Database to be rekeyed */
4754 sqlite3 *db, /* Database to be rekeyed */
4758 sqlite3 *db, /* Database to be rekeyed */
4917 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
4929 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
4945 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
4954 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
4969 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5017 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5018 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5069 sqlite3*,
5132 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
5261 sqlite3 *db, /* Connection handle */
5307 sqlite3 *db, /* Load the extension into this database connection */
5326 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5343 ** sqlite3 *db,
5421 int (*xCreate)(sqlite3*, void *pAux,
5424 int (*xConnect)(sqlite3*, void *pAux,
5588 sqlite3 *db, /* SQLite connection to register module with */
5594 sqlite3 *db, /* SQLite connection to register module with */
5656 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
5674 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
5760 sqlite3*,
6197 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6231 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6432 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7027 sqlite3 *pDest, /* Destination database handle */
7029 sqlite3 *pSource, /* Source database handle */
7152 sqlite3 *pBlocked, /* Waiting connection */
7243 sqlite3*,
7244 int(*)(void *,sqlite3*,const char*,int),
7276 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7298 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7374 sqlite3 *db, /* Database handle */
7407 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
7460 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
7535 sqlite3 *db,
7561 sqlite3 *db,
7611 /************** End of sqlite3.h *********************************************/
8878 sqlite3 *db, /* Associated database connection */
9054 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*);
9065 SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*);
9069 SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3*);
9070 SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
9478 SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3*,Vdbe*);
9492 SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
9540 ** numbers in the sqlite3.c source file. VDBE branch coverage testing
10330 ** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing.
10340 ** holding a mutex on the sqlite3 connection pointer that owns the Btree.
10434 struct sqlite3 {
10484 int (*xWalCallback)(void *, sqlite3 *, const char *, int);
10487 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
10488 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
10527 ** mutex, not by sqlite3.mutex. They are used by code in notify.c.
10536 sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */
10537 sqlite3 *pUnlockConnection; /* Connection to watch for unlock */
10540 sqlite3 *pNextBlocked; /* Next in list of all blocked connections */
10550 ** Possible values for the sqlite3.flags.
10585 ** Bits of the sqlite3.dbOptFlags field that are used by the
10738 ** sqlite3.pSavepoint. The first element in the list is the most recently
10760 ** instance of the following structure, stored in the sqlite3.aModule
10861 ** structure for each database connection (sqlite3*) that uses the shared
10886 ** another linked list headed by the sqlite3.pDisconnect member of the
10887 ** corresponding sqlite3 structure. They are then deleted/xDisconnected
10888 ** next time a statement is prepared using said sqlite3*. This is done
10889 ** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.
10891 ** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect
10892 ** list without holding the corresponding sqlite3.mutex mutex.
10899 sqlite3 *db; /* Database connection associated with this table */
11098 sqlite3 *db; /* The database connection */
11835 int iDb; /* Index in sqlite3.aDb[] of database holding pTab */
11908 sqlite3 *db; /* The main database structure */
12047 * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
12152 sqlite3 *db; /* Optional database for lookaside. Can be NULL */
12169 sqlite3 *db; /* The database being initialized */
12218 void(*xSqllog)(void*,sqlite3*,const char*, int);
12376 sqlite3*, int);
12377 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, int);
12378 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
12379 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, int);
12381 SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
12382 SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, int);
12383 SQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);
12385 SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, void*);
12452 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
12453 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
12454 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
12484 SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
12495 SQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);
12496 SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
12497 SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);
12499 SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);
12502 SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
12506 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);
12507 SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
12510 SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3*);
12511 SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3*,int);
12512 SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3*);
12514 SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
12530 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);
12547 SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);
12566 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3*, Table*);
12575 SQLITE_PRIVATE void *sqlite3ArrayAllocate(sqlite3*,void*,int,int*,int*);
12576 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3*, IdList*, Token*);
12578 SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(sqlite3*, SrcList*, int, int);
12579 SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*);
12586 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);
12587 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);
12588 SQLITE_PRIVATE Index *sqlite3AllocateIndexObject(sqlite3*,i16,int,char**);
12595 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
12633 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
12636 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
12637 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
12638 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
12640 SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
12641 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
12651 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*,int);
12658 SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);
12659 SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*);
12681 SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
12682 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
12683 SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
12684 SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3*,IdList*);
12685 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3*,Select*,int);
12687 SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,u8);
12688 SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*);
12691 SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);
12692 SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);
12711 SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);
12712 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);
12713 SQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,
12715 SQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, u8);
12716 SQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);
12717 SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3*, Trigger*);
12718 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
12815 SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
12816 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
12826 SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
12834 SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, int);
12852 SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);
12853 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
12854 SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
12867 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3*, int, int, int);
12873 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
12888 SQLITE_PRIVATE int sqlite3FindDb(sqlite3*, Token*);
12889 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);
12890 SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3*,int iDB);
12891 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3*,Index*);
12893 SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);
12894 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
12897 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
12898 SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
12899 SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoAlloc(sqlite3*,int,int);
12906 SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,
12911 SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);
12921 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);
12931 SQLITE_PRIVATE int sqlite3Stat4Column(sqlite3*, const void*, int, int, sqlite3_value**);
12944 SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3*);
12946 SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3*);
12973 SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table*);
12974 SQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p);
12975 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, Vdbe*);
12976 SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db);
12977 SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db);
12980 SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3*);
12981 SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *, int, int);
12983 SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
12991 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);
12993 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);
12994 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *);
12995 SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);
13004 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3*);
13007 SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3*, int, int, int*, int*);
13008 SQLITE_PRIVATE int sqlite3WalDefaultHook(void*,sqlite3*,const char*,int);
13012 SQLITE_PRIVATE void sqlite3WithDelete(sqlite3*,With*);
13041 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
13112 SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);
13113 SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db);
13114 SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db);
13998 i64 lastRowid; /* Last insert rowid (sqlite3.lastRowid) */
14022 sqlite3 *db; /* The associated database connection */
14171 sqlite3 *db; /* The database connection that owns this statement */
14258 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor *, i64 *);
14301 SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *, VdbeCursor *);
14302 SQLITE_PRIVATE void sqlite3VdbeSorterReset(sqlite3 *, VdbeSorter *);
14303 SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *, VdbeCursor *);
14305 SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *, const VdbeCursor *, int *);
14306 SQLITE_PRIVATE int sqlite3VdbeSorterRewind(sqlite3 *, const VdbeCursor *, int *);
14307 SQLITE_PRIVATE int sqlite3VdbeSorterWrite(sqlite3
14431 sqlite3 *db, /* The database connection whose status is desired */
15491 sqlite3 *db;
15675 sqlite3 *db;
20178 static int isLookaside(sqlite3 *db, void *p){
20194 SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
20229 SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
20334 SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, int n){
20360 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, int n){
20404 SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, int n){
20441 SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, int n){
20457 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
20471 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
20490 SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
20515 SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
21405 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
21425 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
21442 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
22142 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
22372 SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
22407 sqlite3 *db = pParse->db;
23346 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
23388 SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
23405 SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
25009 ** useful to the clients of the sqlite3 functions. Specifically, it is
39725 sqlite3 *db; /* The database connection */
39753 SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
50954 ** All fields in this structure are accessed under sqlite3.mutex.
50958 ** they often do so without holding sqlite3.mutex.
50961 sqlite3 *db; /* The database connection holding this btree */
51023 sqlite3 *db; /* Database connection currently using this Btree */
51457 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
51466 SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
51491 SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){
51520 SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){
51547 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
53309 sqlite3 *db, /* Associated database handle */
54240 sqlite3 *pBlock = 0;
54859 sqlite3 *db = p->db;
60112 sqlite3* pDestDb; /* Destination database handle */
60118 sqlite3* pSrcDb; /* Source database handle */
60172 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
60224 sqlite3* pDestDb, /* Database to write to */
60226 sqlite3* pSrcDb, /* Database connection to read from */
60665 sqlite3 *pSrcDb; /* Source database connection */
61412 sqlite3 *db = pMem->db;
61734 SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){
61765 static sqlite3_value *valueNew(sqlite3 *db, struct ValueNewStat4Ctx *p){
61817 sqlite3 *db, /* The database connection */
61929 sqlite3 *db, /* The database connection */
61957 sqlite3 *db;
62021 sqlite3 *db = pParse->db;
62138 sqlite3 *db, /* Database handle */
62187 sqlite3 *db = aMem[0].db;
62258 sqlite3 *db = pParse->db;
62896 static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){
62902 static void vdbeFreeOpArray(sqlite3 *, Op *, int);
62907 static void freeP4(sqlite3 *db, int p4type, void *p4){
62953 static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
62982 sqlite3 *db = p->db;
63021 sqlite3 *db;
63395 sqlite3 *db;
63416 sqlite3 *db;
63464 sqlite3 *db = p->db;
63543 sqlite3 *db = p->db; /* The database connection */
63862 sqlite3 *db; /* The database connection */
64062 sqlite3 *db = p->db;
64088 sqlite3 *db = p->db;
64141 static int vdbeCommit(sqlite3 *db, Vdbe *p){
64379 ** This routine checks that the sqlite3.nVdbeActive count variable
64380 ** matches the number of vdbe's in the list sqlite3.pVdbe that are
64388 static void checkActiveVdbeCnt(sqlite3 *db){
64421 sqlite3 *const db = p->db;
64487 sqlite3 *db = p->db;
64515 sqlite3 *db = p->db;
64723 sqlite3 *db = p->db;
64772 sqlite3 *db;
64904 SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){
64930 sqlite3 *db;
66062 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
66175 SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, int nChange){
66199 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db){
66209 SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe *v){
66258 sqlite3 *db = p->db;
66338 sqlite3 *db = v->db;
66612 static int doWalCallbacks(sqlite3 *db){
66639 sqlite3 *db;
66772 sqlite3 *db; /* The database connection */
66832 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
67166 sqlite3 *db = p->db;
67569 ** Return the sqlite3* database handle to which the prepared statement given
67574 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
67600 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
67671 ** obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the
67673 ** their current bindings. Or, if sqlite3.nVdbeExec is greater than 1,
67697 sqlite3 *db; /* The database connection */
67975 ** field of the sqlite3 structure is set in order to simulate an interrupt.
68488 ** checks that the sqlite3.nTransaction variable is correctly set to
68490 ** linked list starting at sqlite3.pSavepoint.
68496 static int checkSavepointCount(sqlite3 *db){
68517 sqlite3 *db = p->db; /* The database */
69265 /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then
72140 ** (sqlite3.xUpdateCallback) is invoked following a successful insert.
73953 ** P1 is the index of the database in sqlite3.aDb[] of the database
74584 sqlite3 *db; /* The associated database */
74660 sqlite3* db, /* The database connection */
74889 sqlite3 *db;
74916 sqlite3 *db;
74991 sqlite3 *db;
75182 static void vdbeSorterIterZero(sqlite3 *db, VdbeSorterIter *pIter){
75198 sqlite3 *db, /* Database handle (for malloc) */
75283 static int vdbeSorterIterVarint(sqlite3 *db, VdbeSorterIter *p, u64 *pnOut){
75309 sqlite3 *db, /* Database handle (for sqlite3DbMalloc() ) */
75337 sqlite3 *db, /* Database handle */
75485 SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *db, VdbeCursor *pCsr){
75515 static void vdbeSorterRecordFree(sqlite3 *db, SorterRecord *pRecord){
75527 SQLITE_PRIVATE void sqlite3VdbeSorterReset(sqlite3 *db, VdbeSorter *pSorter){
75554 SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *db, VdbeCursor *pCsr){
75569 static int vdbeSorterOpenTempFile(sqlite3 *db, sqlite3_file **ppFile){
75654 sqlite3 *db, /* Database (for malloc) */
75710 static int fileWriterFinish(sqlite3 *db, FileWriter *p, i64 *piEof){
75749 static int vdbeSorterListToPMA(sqlite3 *db, const VdbeCursor *pCsr){
75795 sqlite3 *db, /* Database handle */
75847 sqlite3 *db, /* Database handle */
75878 SQLITE_PRIVATE int sqlite3VdbeSorterRewind(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){
75987 SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){
76884 sqlite3 *db; /* The database connection */
77011 sqlite3 *db = pParse->db; /* The database connection */
77312 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
77641 sqlite3 *db; /* Database connection */
77713 sqlite3 *db;
77809 sqlite3 *db = pParse->db;
77920 sqlite3 *db; /* Database connection */
78367 sqlite3 *db = pParse->db;
78661 sqlite3 *db, /* Handle for sqlite3DbMallocZero() (may be null) */
78710 sqlite3 *db, /* Handle for sqlite3DbMallocZero() (may be null) */
78727 sqlite3 *db,
78812 SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
78834 sqlite3 *db = pParse->db;
78864 sqlite3 *db = pParse->db;
78934 SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3 *db, Expr *p){
79067 static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){
79156 static With *withDup(sqlite3 *db, With *p){
79194 SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3 *db, Expr *p, int flags){
79197 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
79233 SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
79271 SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, IdList *p){
79294 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
79321 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
79341 sqlite3 *db = pParse->db;
79411 sqlite3 *db = pParse->db;
79443 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
79848 sqlite3 *db = pParse->db; /* Database connection */
80739 sqlite3 *db = pParse->db; /* The database connection */
82336 static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
82352 static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
82651 sqlite3 *db = sqlite3_context_db_handle(context);
82707 sqlite3 *db = sqlite3_context_db_handle(context);
82772 sqlite3 *db = sqlite3_context_db_handle(context);
82865 static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
82910 sqlite3 *db = pParse->db;
83003 sqlite3 *db = pParse->db; /* Database connection */
83234 sqlite3 *db; /* The database connection; */
83356 sqlite3 *db = pParse->db;
83626 sqlite3 *db = pParse->db;
83725 sqlite3 *db; /* Database connection, for malloc() */
83731 static void sampleClear(sqlite3 *db, Stat4Sample *p){
83743 static void sampleSetRowid(sqlite3 *db, Stat4Sample *p, int n, const u8 *pData){
83759 static void sampleSetRowidInt64(sqlite3 *db, Stat4Sample *p, i64 iRowid){
83833 sqlite3 *db; /* Database connection */
84389 sqlite3 *db = pParse->db; /* Database handle */
84717 sqlite3 *db = pParse->db;
84775 sqlite3 *db = pParse->db;
84840 sqlite3 *db;
84963 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){
85034 sqlite3 *db,
85060 sqlite3 *db, /* Database handle */
85183 static int loadStat4(sqlite3 *db, const char *zDb){
85227 SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
85350 sqlite3 *db = sqlite3_context_db_handle(context);
85454 extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
85455 extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
85539 sqlite3 *db = sqlite3_context_db_handle(context);
85597 sqlite3* db = pParse->db;
85708 sqlite3 *db;
85931 sqlite3 *db,
85955 ** callback has been registered (i.e. that sqlite3.xAuth is not NULL).
85967 sqlite3 *db = pParse->db; /* Database handle */
86000 sqlite3 *db = pParse->db;
86058 sqlite3 *db = pParse->db;
86251 sqlite3 *db;
86363 sqlite3 *db = pParse->db;
86397 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
86489 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
86510 static void freeIndex(sqlite3 *db, Index *p){
86527 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
86562 SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3 *db){
86589 SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3 *db, int iDb){
86615 SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
86633 SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){
86641 static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
86672 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
86728 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
86757 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
86787 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
86808 SQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){
86840 sqlite3 *db = pParse->db;
86928 sqlite3 *db = pParse->db;
87145 sqlite3 *db = pParse->db;
87318 sqlite3 *db = pParse->db;
87434 sqlite3 *db = pParse->db;
87457 sqlite3 *db;
87506 sqlite3 *db = pParse->db;
87538 sqlite3 *db = pParse->db;
87603 static char *createTableStmt(sqlite3 *db, Table *p){
87671 static int resizeIndexObject(sqlite3 *db, Index *pIdx, int N){
87756 sqlite3 *db = pParse->db;
87880 sqlite3 *db = pParse->db; /* The database connection */
88106 sqlite3 *db = pParse->db;
88172 sqlite3 *db = pParse->db; /* Database connection for malloc errors */
88262 static void sqliteViewResetAll(sqlite3 *db, int idx){
88298 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3 *db, int iDb, int iFrom, int iTo){
88439 sqlite3 *db = pParse->db;
88511 sqlite3 *db = pParse->db;
88629 sqlite3 *db = pParse->db;
88776 sqlite3 *db = pParse->db; /* The database connection */
88851 sqlite3 *db, /* Database connection */
88914 sqlite3 *db = pParse->db;
89421 sqlite3 *db = pParse->db;
89500 sqlite3 *db, /* Connection to notify of malloc failures */
89530 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
89554 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
89597 sqlite3 *db, /* Database connection to notify of OOM errors */
89679 sqlite3 *db, /* Connection to notify of malloc failures */
89731 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
89775 sqlite3 *db = pParse->db;
89853 sqlite3 *db;
89934 sqlite3 *db = pParse->db;
89970 sqlite3 *db = pToplevel->db;
89990 sqlite3 *db = pParse->db;
90173 sqlite3 *db = pParse->db; /* The database connection */
90209 sqlite3 *db = pParse->db; /* The database connection */
90315 sqlite3 *db = pParse->db;
90359 SQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){
90396 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
90425 static int synthCollSeq(sqlite3 *db, CollSeq *pColl){
90462 sqlite3 *db = pParse->db;
90499 sqlite3 *db = pParse->db;
90516 ** Each pointer stored in the sqlite3.aCollSeq hash table contains an
90525 sqlite3 *db, /* Database connection */
90578 sqlite3 *db,
90719 sqlite3 *db, /* An open database */
90833 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
90950 sqlite3 *db = pParse->db;
91084 sqlite3 *db; /* Main database structure */
92075 sqlite3 *db = sqlite3_context_db_handle(context);
92201 sqlite3 *db = sqlite3_context_db_handle(context);
92221 sqlite3 *db = sqlite3_context_db_handle(context);
92235 sqlite3 *db = sqlite3_context_db_handle(context);
92446 sqlite3 *db = sqlite3_context_db_handle(context);
92775 sqlite3 *db = sqlite3_context_db_handle(context);
92845 sqlite3 *db = sqlite3_context_db_handle(context);
93026 sqlite3 *db = sqlite3_context_db_handle(context);
93172 ** returns (void *)db, where db is the sqlite3* database pointer.
93215 sqlite3 *db = sqlite3_context_db_handle(context);
93254 SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
93265 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
93279 SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
93302 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
93907 sqlite3 *db = pParse->db;
93931 sqlite3 *db, /* The database connection */
93983 sqlite3 *db = pParse->db; /* Database handle */
94114 static void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){
94143 sqlite3 *db = pParse->db;
94282 sqlite3 *db = pParse->db; /* Database handle */
94555 sqlite3 *db = pParse->db; /* Database handle */
94767 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
94834 int iDb, /* The database index in sqlite3.aDb[] */
94889 sqlite3 *db = sqlite3VdbeDb(v);
94929 sqlite3 *db = sqlite3VdbeDb(v);
95049 sqlite3 *db = pParse->db; /* The database connection */
95106 sqlite3 *db = pParse->db;
95248 sqlite3 *db; /* The main database structure */
95946 sqlite3 *db; /* Database connection */
96856 sqlite3 *db, /* The database on which the SQL executes */
97008 ** sqlite3.h.
97039 int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
97040 int (*busy_timeout)(sqlite3*,int ms);
97041 int (*changes)(sqlite3*);
97042 int (*close)(sqlite3*);
97043 int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
97045 int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
97068 void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
97071 int (*create_collation)(sqlite3*,const char*,int,void*,
97073 int (*create_collation16)(sqlite3*,const void*,int,void*,
97075 int (*create_function)(sqlite3*,const char*,int,int,void*,
97079 int (*create_function16)(sqlite3*,const void*,int,int,void*,
97083 int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
97085 sqlite3 * (*db_handle)(sqlite3_stmt*);
97086 int (*declare_vtab)(sqlite3*,const char*);
97088 int (*errcode)(sqlite3*db);
97089 const char * (*errmsg)(sqlite3*);
97090 const void * (*errmsg16)(sqlite3*);
97091 int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
97096 int (*get_autocommit)(sqlite3*);
97098 int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
97100 void (*interruptx)(sqlite3*);
97101 sqlite_int64 (*last_insert_rowid)(sqlite3*);
97106 int (*open)(const char*,sqlite3**);
97107 int (*open16)(const void*,sqlite3**);
97108 int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
97109 int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
97110 void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
97111 void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
97126 void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
97127 int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
97132 int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
97135 int (*total_changes)(sqlite3*);
97136 void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
97138 void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
97155 int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
97157 int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
97158 int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
97161 int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
97167 int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
97171 int (*create_collation_v2)(sqlite3*,const char*,int,void*,
97174 int (*file_control)(sqlite3*,const char*,int,void*);
97182 int (*open_v2)(const char*,sqlite3**,int,const char*);
97196 sqlite3 *(*context_db_handle)(sqlite3_context*);
97197 int (*extended_result_codes)(sqlite3*,int);
97198 int (*limit)(sqlite3*,int,int);
97199 sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
97203 sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
97209 int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
97214 int (*db_config)(sqlite3*,int,...);
97215 sqlite3_mutex *(*db_mutex)(sqlite3*);
97216 int (*db_status)(sqlite3*,int,int*,int*,int);
97217 int (*extended_errcode)(sqlite3*);
97223 int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
97224 int (*wal_autocheckpoint)(sqlite3*,int);
97225 int (*wal_checkpoint)(sqlite3*,const char*);
97226 void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
97228 int (*vtab_config)(sqlite3*,int op,...);
97229 int (*vtab_on_conflict)(sqlite3*);
97231 int (*close_v2)(sqlite3*);
97232 const char *(*db_filename)(sqlite3*,const char*);
97233 int (*db_readonly)(sqlite3*,const char*);
97234 int (*db_release_memory)(sqlite3*);
97243 int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
97870 sqlite3 *db, /* Load the extension into this database connection */
97877 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
97934 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
97967 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
98009 sqlite3 *db, /* Load the extension into this database connection */
98026 SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
98039 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
98186 SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
98190 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
98207 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
98789 sqlite3 *db = pParse->db;
98812 sqlite3 *db = pParse->db;
98844 static void setAllPagerFlags(sqlite3 *db){
98941 sqlite3 *db = pParse->db; /* The database connection */
99191 ** Also, the sqlite3.dfltLockMode variable is set so that
100609 sqlite3 *db = pData->db;
100636 sqlite3 *db = pData->db;
100716 static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
100838 ** main database, set sqlite3.enc to the encoding of the main database.
100840 ** as sqlite3.enc.
100974 SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
101017 sqlite3 *db = pParse->db;
101036 sqlite3 *db = pParse->db;
101084 SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
101114 sqlite3 *db = pParse->db;
101124 sqlite3 *db, /* Database handle. */
101284 sqlite3 *db, /* Database handle. */
101323 sqlite3 *db;
101357 sqlite3 *db, /* Database handle. */
101369 sqlite3 *db, /* Database handle. */
101387 sqlite3 *db, /* Database handle. */
101443 sqlite3 *db, /* Database handle. */
101455 sqlite3 *db, /* Database handle. */
101519 static void clearSelect(sqlite3 *db, Select *p){
101562 sqlite3 *db = pParse->db;
101601 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){
101756 sqlite3 *db = pParse->db;
102401 SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N, int X){
102472 sqlite3 *db = pParse->db;
102923 sqlite3 *db = pParse->db;
102999 sqlite3 *db = pParse->db; /* Database connection */
103101 sqlite3 *db = pParse->db;
103137 sqlite3 *db = pParse->db;
103296 sqlite3 *db = pParse->db;
103535 sqlite3 *db; /* Database connection */
104156 sqlite3 *db; /* Database connection */
104433 static void substExprList(sqlite3*, ExprList*, int, ExprList*);
104434 static void substSelect(sqlite3*, Select *, int, ExprList *);
104450 sqlite3 *db, /* Report malloc errors to this connection */
104479 sqlite3 *db, /* Report malloc errors here */
104491 sqlite3 *db, /* Report malloc errors here */
104664 sqlite3 *db = pParse->db;
105151 sqlite3 *db;
105265 sqlite3 *db = pParse->db;
105416 sqlite3 *db = pParse->db;
105801 sqlite3 *db;
106013 sqlite3 *db; /* The database connection */
106998 sqlite3 *db, /* The database on which the SQL executes */
107097 SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){
107173 sqlite3 *db = pParse->db; /* The database connection */
107356 sqlite3 *db = pParse->db; /* The database */
107431 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
107450 sqlite3 *db, /* Database connection */
107475 sqlite3 *db, /* The database connection */
107504 sqlite3 *db, /* The database connection */
107529 sqlite3 *db, /* Database connection */
107547 SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){
107571 sqlite3 *db = pParse->db;
107621 sqlite3 *db = pParse->db;
107677 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
107769 sqlite3 *db = pParse->db;
107788 sqlite3 *db = pParse->db;
107898 sqlite3 *db = pParse->db; /* Database handle */
108311 sqlite3 *db; /* The database structure */
108922 sqlite3 *db = pParse->db; /* Database connection */
109004 static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){
109016 static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
109035 static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
109095 SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
109171 extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
109369 ** sqlite3.pVtabCtx member variable is set to point to an instance of
109385 sqlite3 *db, /* Database in which module is registered */
109429 sqlite3 *db, /* Database in which module is registered */
109441 sqlite3 *db, /* Database in which module is registered */
109468 SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){
109480 sqlite3 *db = pVTab->db;
109498 ** p->pVTable list to the sqlite3.pDisconnect lists of their associated
109503 static VTable *vtabDisconnectAll(sqlite3 *db, Table *p){
109511 ** this makes it safe to access the sqlite3.pDisconnect list of any
109517 sqlite3 *db2 = pVTable->db;
109543 SQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p){
109562 ** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
109566 ** caller. This is done to protect the sqlite3.pDisconnect list. The
109567 ** sqlite3.pDisconnect list is accessed only as follows:
109573 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex
109578 ** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously
109581 SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
109605 ** structure is associated with a single sqlite3* user of the schema.
109609 ** in the list are moved to the sqlite3.pDisconnect list of the associated
109612 SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){
109629 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
109663 sqlite3 *db; /* Database connection */
109703 sqlite3 *db = pParse->db;
109714 sqlite3 *db = pParse->db; /* The database connection */
109821 sqlite3 *db,
109824 int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
109934 sqlite3 *db = pParse->db;
109967 static int growVTrans(sqlite3 *db){
109970 /* Grow the sqlite3.aVTrans array if required */
109986 ** Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
109989 static void addToVTrans(sqlite3 *db, VTable *pVTab){
109990 /* Add pVtab to the end of sqlite3.aVTrans */
110003 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){
110044 SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
110108 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
110133 ** of each of the virtual tables in the sqlite3.aVTrans array. The method
110139 static void callFinaliser(sqlite3 *db, int offset){
110160 ** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
110166 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, Vdbe *p){
110186 ** sqlite3.aVTrans array. Then clear the array itself.
110188 SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db){
110195 ** sqlite3.aVTrans array. Then clear the array itself.
110197 SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db){
110208 ** in the sqlite3.aVTrans array.
110210 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
110238 ** sqlite3.aVTrans[] array. */
110265 SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){
110312 sqlite3 *db, /* Database connection for reporting malloc problems */
110403 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
110418 SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
110631 static int whereLoopResize(sqlite3*, WhereLoop*, int);
111064 static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
111072 static void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){
111084 sqlite3 *db = pWC->pWInfo->pParse->db;
111125 sqlite3 *db = pWC->pWInfo->pParse->db;
111563 sqlite3 *db = pParse->db; /* Database connection */
111762 sqlite3 *db = pParse->db; /* Database connection */
112021 sqlite3 *db = pParse->db; /* Database connection */
112960 sqlite3 *db = pParse->db;
113660 static char *explainIndexRange(sqlite3 *db, WhereLoop *pLoop, Table *pTab){
113720 sqlite3 *db = pParse->db; /* Database handle */
113810 sqlite3 *db; /* Database connection */
114760 static void whereLoopClearUnion(sqlite3 *db, WhereLoop *p){
114778 static void whereLoopClear(sqlite3 *db, WhereLoop *p){
114787 static int whereLoopResize(sqlite3 *db, WhereLoop *p, int n){
114803 static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){
114822 sqlite3 *db, WhereLoop *p){
114830 static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
115024 sqlite3 *db = pWInfo->pParse->db;
115178 sqlite3 *db = pParse->db; /* Database connection malloc context */
115714 sqlite3 *db;
115988 sqlite3 *db = pWInfo->pParse->db;
116063 sqlite3 *db = pWInfo->pParse->db; /* Database connection */
116372 sqlite3 *db; /* The database connection */
116891 sqlite3 *db; /* Database connection */
117297 sqlite3 *db = pParse->db;
117581 sqlite3 *db = pParse->db;
121675 sqlite3 *db = pParse->db; /* The database connection */
122136 SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);
122168 SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);
122200 SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);
122673 typedef void(*SQLLOGFUNC_t)(void*, sqlite3*, const char*, int);
122720 static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
122777 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
122785 SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
122804 SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
122819 u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
122916 SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
122923 SQLITE_API int sqlite3_changes(sqlite3 *db){
122930 SQLITE_API int sqlite3_total_changes(sqlite3 *db){
122939 SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){
122956 static void functionDestroy(sqlite3 *db, FuncDef *p){
122971 static void disconnectAllVtab(sqlite3 *db){
122996 static int connectionIsBusy(sqlite3 *db){
123010 static int sqlite3Close(sqlite3 *db, int forceZombie){
123066 SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
123067 SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
123078 SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
123196 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
123415 sqlite3 *db = (sqlite3 *)ptr;
123434 sqlite3 *db = (sqlite3 *)ptr;
123435 int timeout = ((sqlite3 *)ptr)->busyTimeout;
123468 sqlite3 *db,
123488 sqlite3 *db,
123512 SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
123525 SQLITE_API void sqlite3_interrupt(sqlite3 *db){
123537 sqlite3 *db,
123637 sqlite3 *db,
123651 sqlite3 *db,
123688 sqlite3 *db,
123724 sqlite3 *db,
123749 SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
123767 sqlite3 *db,
123787 sqlite3 *db, /* Attach the hook to this database */
123805 sqlite3 *db, /* Attach the hook to this database */
123823 sqlite3 *db, /* Attach the hook to this database */
123840 ** is greater than sqlite3.pWalArg cast to an integer (the value configured by
123845 sqlite3 *db, /* Connection */
123869 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
123888 sqlite3 *db, /* Attach the hook to this db handle */
123889 int(*xCallback)(void *, sqlite3*, const char*, int),
123909 sqlite3 *db, /* Database handle */
123919 int iDb = SQLITE_MAX_ATTACHED; /* sqlite3.aDb[] index of db to checkpoint */
123955 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
123979 SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog, int *pnCkpt){
124023 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
124042 SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
124070 SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
124115 SQLITE_API int sqlite3_errcode(sqlite3 *db){
124124 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
124146 static void invalidateCachedKeyInfo(sqlite3 *db){
124174 sqlite3* db,
124250 ** #defines in sqlite3.h.
124311 SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
124588 sqlite3 **ppDb, /* OUT: Returned database handle */
124592 sqlite3 *db; /* Store allocated handle here */
124661 db = sqlite3MallocZero( sizeof(sqlite3) );
124780 extern int sqlite3Fts1Init(sqlite3*);
124787 extern int sqlite3Fts2Init(sqlite3*);
124858 sqlite3 **ppDb
124865 sqlite3 **ppDb, /* OUT: SQLite db handle */
124878 sqlite3 **ppDb
124914 sqlite3* db,
124933 sqlite3* db,
124954 sqlite3* db,
124980 sqlite3 *db,
124982 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
124998 sqlite3 *db,
125000 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
125027 SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
125079 ** See comment in sqlite3.h (sqlite.h.in) for details.
125083 sqlite3 *db, /* Connection handle */
125209 SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
125219 SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
125429 /* sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
125435 sqlite3 *db = va_arg(ap, sqlite3*);
125443 /* sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
125453 sqlite3 *db = va_arg(ap, sqlite3*);
125614 SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){
125630 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
125639 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
125678 ** Head of a linked list of all sqlite3 objects created by this process
125679 ** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection
125683 static sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;
125700 static void checkListProperties(sqlite3 *db){
125701 sqlite3 *p;
125704 sqlite3 *p2;
125726 static void removeFromBlockedList(sqlite3 *db){
125727 sqlite3 **pp;
125741 static void addToBlockedList(sqlite3 *db){
125742 sqlite3 **pp;
125792 sqlite3 *db,
125814 sqlite3 *p;
125841 SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
125858 ** 1) If the sqlite3.pBlockingConnection member of a list entry is
125861 ** 2) If the sqlite3.pUnlockConnection member of a list entry is
125869 SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db){
125872 sqlite3 **pp; /* Iterator variable */
125882 sqlite3 *p = *pp;
125968 SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){
126752 sqlite3 *db; /* The database connection */
127092 SQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, Fts3Hash *, const char *);
127111 SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
127112 SQLITE_PRIVATE int sqlite3Fts3InitTerm(sqlite3 *db);
127120 SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db);
127133 SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3*, Fts3Hash *);
127366 sqlite3 *db, /* Database in which to run SQL */
127391 sqlite3 *db = p->db; /* Database handle */
127477 sqlite3 *db = p->db; /* The database connection */
127859 sqlite3 *db, /* Database handle */
127931 sqlite3 *db, /* The SQLite database connection */
128307 sqlite3 *db, /* Database connection */
128317 sqlite3 *db, /* Database connection */
130462 sqlite3 *db = p->db; /* Database connection */
130619 SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
132655 sqlite3 *db,
132724 sqlite3 *db, /* Database connection */
133184 SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db){
134307 sqlite3 *db,
134413 sqlite3 *db = sqlite3_context_db_handle(context);
134488 SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
135877 sqlite3 *db,
135899 sqlite3 *db,
135951 sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);
135996 sqlite3 *db,
136434 sqlite3 *db, /* Database connection */
136697 SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3 *db, Fts3Hash *pHash){
143945 ** from the sqlite3 source file utf.c. If this file is compiled as part
144793 sqlite3 *db; /* Host database connection */
145431 sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int
145438 sqlite3 *db,
145451 sqlite3 *db,
147616 static int rtreeQueryStat1(sqlite3 *db, Rtree *pRtree){
147676 sqlite3 *db,
147755 static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
147786 sqlite3 *db, /* Database handle */
147830 sqlite3 *db, /* Database connection */
148007 SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db){
148087 sqlite3 *db, /* Register SQL function on this connection */
148111 sqlite3 *db, /* Register SQL function on this connection */
148136 sqlite3 *db,
148563 sqlite3 *db = (sqlite3 *)sqlite3_user_data(p);
148597 SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){
148641 sqlite3 *db,