diff options
author | drh <drh@noemail.net> | 2006-01-10 15:18:27 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-01-10 15:18:27 +0000 |
commit | d2d4a6b00dea9fa9cb36478377b886bc729e591e (patch) | |
tree | 8bacd6e2211e30756867fc6df3cb9c9d4c0f942e /src | |
parent | 7c1817e255134631a72f3cf98dc42f750d5976b2 (diff) | |
download | sqlite-d2d4a6b00dea9fa9cb36478377b886bc729e591e.tar.gz sqlite-d2d4a6b00dea9fa9cb36478377b886bc729e591e.zip |
Updates to the C-API documentation. Change the parameter type of
sqlite3_soft_heap_limit to integer. (CVS 2903)
FossilOrigin-Name: bdd35e9fbb651fe7a1ed5042923c9529c3c5ab7c
Diffstat (limited to 'src')
-rw-r--r-- | src/sqlite.h.in | 4 | ||||
-rw-r--r-- | src/sqliteInt.h | 17 | ||||
-rw-r--r-- | src/util.c | 6 |
3 files changed, 14 insertions, 13 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 5395ef719..c43b7cd0d 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -12,7 +12,7 @@ ** This header file defines the interface that the SQLite library ** presents to client programs. ** -** @(#) $Id: sqlite.h.in,v 1.153 2006/01/09 09:59:49 danielk1977 Exp $ +** @(#) $Id: sqlite.h.in,v 1.154 2006/01/10 15:18:28 drh Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ @@ -1361,7 +1361,7 @@ int sqlite3_release_memory(int); ** SQLITE_OMIT_MEMORY_MANAGEMENT option set. It is a no-op unless ** memory-management has been enabled. */ -void sqlite3_soft_heap_limit(sqlite_int64); +void sqlite3_soft_heap_limit(int); /* ** Undo the hack that converts floating point types to integer for diff --git a/src/sqliteInt.h b/src/sqliteInt.h index b9e2ac854..f3a9227f7 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.458 2006/01/10 12:31:40 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.459 2006/01/10 15:18:28 drh Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -294,8 +294,8 @@ struct ThreadData { #ifndef SQLITE_OMIT_MEMORY_MANAGEMENT u8 useMemoryManagement; /* True if memory-management is enabled */ - i64 nSoftHeapLimit; /* Suggested max mem allocation. No limit if <0 */ - i64 nAlloc; /* Number of bytes currently allocated */ + int nSoftHeapLimit; /* Suggested max mem allocation. No limit if <0 */ + int nAlloc; /* Number of bytes currently allocated */ Pager *pPager; /* Linked list of all pagers in this thread */ #endif @@ -305,7 +305,7 @@ struct ThreadData { #endif #ifdef SQLITE_MEMDEBUG - i64 nMaxAlloc; /* High water mark of ThreadData.nAlloc */ + int nMaxAlloc; /* High water mark of ThreadData.nAlloc */ int mallocAllowed; /* assert() in sqlite3Malloc() if not set */ int isFail; /* True if all malloc() calls should fail */ const char *zFile; /* Filename to associate debugging info with */ @@ -674,8 +674,6 @@ struct CollSeq { ** is generated for each row of the table. Table.hasPrimKey is true if ** the table has any PRIMARY KEY, INTEGER or otherwise. ** -** TODO: This comment is out of date. Table.iDb no longer exists. -** ** Table.tnum is the page number for the root BTree page of the table in the ** database file. If Table.iDb is the index of the database table backend ** in sqlite.aDb[]. 0 is for the main database and 1 is for the file that @@ -696,6 +694,7 @@ struct Table { int tnum; /* Root BTree node for this table (see note above) */ Select *pSelect; /* NULL for tables. Points to definition if a view. */ u8 readOnly; /* True if this table should not be written by the user */ +// u8 iDb; /* Index into sqlite.aDb[] of the backend for this table */ u8 isTransient; /* True if automatically deleted when VDBE finishes */ u8 hasPrimKey; /* True if there exists a primary key */ u8 keyConf; /* What to do in case of uniqueness conflict on iPKey */ @@ -807,7 +806,7 @@ struct KeyInfo { u8 enc; /* Text encoding - one of the TEXT_Utf* values */ u8 incrKey; /* Increase 2nd key by epsilon before comparison */ int nField; /* Number of entries in aColl[] */ - u8 *aSortOrder; /* If defined and aSortOrder[i] is true, sort DESC */ + u8 *aSortOrder; /* If defined an aSortOrder[i] is true, sort DESC */ CollSeq *aColl[1]; /* Collating sequence for each term of the key */ }; @@ -846,9 +845,10 @@ struct Index { int tnum; /* Page containing root of this index in database file */ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */ + // u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */ char *zColAff; /* String defining the affinity of each column */ Index *pNext; /* The next index associated with the same table */ - Schema *pSchema; /* Schema containing this index */ + Schema *pSchema; KeyInfo keyInfo; /* Info on how to order keys. MUST BE LAST */ }; @@ -958,6 +958,7 @@ struct AggInfo { struct Expr { u8 op; /* Operation performed by this node */ char affinity; /* The affinity of the column or 0 if not a column */ +//u8 iDb; /* Database referenced by this expression */ u8 flags; /* Various flags. See below */ CollSeq *pColl; /* The collation type of the column or 0 */ Expr *pLeft, *pRight; /* Left and right subnodes */ diff --git a/src/util.c b/src/util.c index 3cfc37276..1a8287b07 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.165 2006/01/10 07:14:24 danielk1977 Exp $ +** $Id: util.c,v 1.166 2006/01/10 15:18:28 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -71,7 +71,7 @@ ** Set the soft heap-size limit for the current thread. Passing a negative ** value indicates no limit. */ -void sqlite3_soft_heap_limit(sqlite_int64 n){ +void sqlite3_soft_heap_limit(int n){ sqlite3ThreadData()->nSoftHeapLimit = n; } @@ -524,7 +524,7 @@ static void OSMALLOC_FAILED(){ #ifndef SQLITE_OMIT_MEMORY_MANAGEMENT static void handleSoftLimit(int n){ ThreadData *pTsd = sqlite3ThreadData(); - pTsd->nAlloc += (i64)n; + pTsd->nAlloc += n; if( n>0 && pTsd->nSoftHeapLimit>0 ){ while( pTsd->nAlloc>pTsd->nSoftHeapLimit && sqlite3_release_memory(n) ); } |