mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-02 05:54:29 +03:00
Remove default_synchronous and temp_store pragmas. Allow the safety-level
and cache-size to be set for attached databases. (CVS 1735) FossilOrigin-Name: 212de3ce66f746036cb2267a9f924fd55fa2f37a
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** Internal interface definitions for SQLite.
|
||||
**
|
||||
** @(#) $Id: sqliteInt.h,v 1.299 2004/06/22 12:13:55 drh Exp $
|
||||
** @(#) $Id: sqliteInt.h,v 1.300 2004/06/26 06:37:07 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef _SQLITEINT_H_
|
||||
#define _SQLITEINT_H_
|
||||
@@ -67,19 +67,6 @@
|
||||
*/
|
||||
#define MAX_ATTACHED 10
|
||||
|
||||
/*
|
||||
** The next macro is used to determine where TEMP tables and indices
|
||||
** are stored. Possible values:
|
||||
**
|
||||
** 0 Always use a temporary files
|
||||
** 1 Use a file unless overridden by "PRAGMA temp_store"
|
||||
** 2 Use memory unless overridden by "PRAGMA temp_store"
|
||||
** 3 Always use memory
|
||||
*/
|
||||
#ifndef TEMP_STORE
|
||||
# define TEMP_STORE 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
** When building SQLite for embedded systems where memory is scarce,
|
||||
** you can define one or more of the following macros to omit extra
|
||||
@@ -290,6 +277,8 @@ struct Db {
|
||||
Hash aFKey; /* Foreign keys indexed by to-table */
|
||||
u8 inTrans; /* 0: not writable. 1: Transaction. 2: Checkpoint */
|
||||
u16 flags; /* Flags associated with this database */
|
||||
u8 safety_level; /* How aggressive at synching data to disk */
|
||||
int cache_size; /* Number of pages to use in the cache */
|
||||
void *pAux; /* Auxiliary data. Usually NULL */
|
||||
void (*xFreeAux)(void*); /* Routine to free pAux */
|
||||
};
|
||||
@@ -335,11 +324,6 @@ struct BusyHandler {
|
||||
/*
|
||||
** Each database is an instance of the following structure.
|
||||
**
|
||||
** The sqlite.temp_store determines where temporary database files
|
||||
** are stored. If 1, then a file is created to hold those tables. If
|
||||
** 2, then they are held in memory. 0 means use the default value in
|
||||
** the TEMP_STORE macro.
|
||||
**
|
||||
** The sqlite.lastRowid records the last insert rowid generated by an
|
||||
** insert statement. Inserts on views do not affect its value. Each
|
||||
** trigger has its own context, so that lastRowid can be updated inside
|
||||
@@ -369,9 +353,6 @@ struct sqlite {
|
||||
Db aDbStatic[2]; /* Static space for the 2 default backends */
|
||||
int flags; /* Miscellanous flags. See below */
|
||||
u8 file_format; /* What file format version is this database? */
|
||||
u8 safety_level; /* How aggressive at synching data to disk */
|
||||
u8 temp_store; /* 1=file, 2=memory, 0=compile-time default */
|
||||
int cache_size; /* Number of pages to use in the cache */
|
||||
int nTable; /* Number of tables in the database */
|
||||
BusyHandler busyHandler; /* Busy callback */
|
||||
void *pCommitArg; /* Argument to xCommitCallback() */
|
||||
@@ -1225,7 +1206,7 @@ void sqlite3ExprDelete(Expr*);
|
||||
ExprList *sqlite3ExprListAppend(ExprList*,Expr*,Token*);
|
||||
void sqlite3ExprListDelete(ExprList*);
|
||||
int sqlite3Init(sqlite*, char**);
|
||||
void sqlite3Pragma(Parse*,Token*,Token*,int);
|
||||
void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);
|
||||
void sqlite3ResetInternalSchema(sqlite*, int);
|
||||
void sqlite3BeginParse(Parse*,int);
|
||||
void sqlite3RollbackInternalChanges(sqlite*);
|
||||
|
||||
Reference in New Issue
Block a user