|
|
| version 1.2, 2007/10/25 17:01:38 | version 1.3, 2007/11/26 07:56:43 |
|---|---|
| Line 89 extern "C" { | Line 89 extern "C" { |
| ** | ** |
| ** See also: [sqlite3_libversion()] and [sqlite3_libversion_number()]. | ** See also: [sqlite3_libversion()] and [sqlite3_libversion_number()]. |
| */ | */ |
| #define SQLITE_VERSION "3.5.1" | #define SQLITE_VERSION "3.5.2" |
| #define SQLITE_VERSION_NUMBER 3005001 | #define SQLITE_VERSION_NUMBER 3005002 |
| /* | /* |
| ** CAPI3REF: Run-Time Library Version Numbers | ** CAPI3REF: Run-Time Library Version Numbers |
| Line 748 int sqlite3_extended_result_codes(sqlite | Line 748 int sqlite3_extended_result_codes(sqlite |
| ** type INTEGER PRIMARY KEY then that column is another an alias for the | ** type INTEGER PRIMARY KEY then that column is another an alias for the |
| ** rowid. | ** rowid. |
| ** | ** |
| ** This routine returns the rowid of the most recent INSERT into | ** This routine returns the rowid of the most recent successful INSERT into |
| ** the database from the database connection given in the first | ** the database from the database connection given in the first |
| ** argument. If no inserts have ever occurred on this database | ** argument. If no successful inserts have ever occurred on this database |
| ** connection, zero is returned. | ** connection, zero is returned. |
| ** | ** |
| ** If an INSERT occurs within a trigger, then the rowid of the | ** If an INSERT occurs within a trigger, then the rowid of the |
| Line 759 int sqlite3_extended_result_codes(sqlite | Line 759 int sqlite3_extended_result_codes(sqlite |
| ** by this routine reverts to the last value inserted before the | ** by this routine reverts to the last value inserted before the |
| ** trigger fired. | ** trigger fired. |
| ** | ** |
| ** An INSERT that fails due to a constraint violation is not a | |
| ** successful insert and does not change the value returned by this | |
| ** routine. Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, | |
| ** and INSERT OR ABORT make no changes to the return value of this | |
| ** routine when their insertion fails. When INSERT OR REPLACE | |
| ** encounters a constraint violation, it does not fail. The | |
| ** INSERT continues to completion after deleting rows that caused | |
| ** the constraint problem so INSERT OR REPLACE will always change | |
| ** the return value of this interface. | |
| ** | |
| ** If another thread does a new insert on the same database connection | ** If another thread does a new insert on the same database connection |
| ** while this routine is running and thus changes the last insert rowid, | ** while this routine is running and thus changes the last insert rowid, |
| ** then the return value of this routine is undefined. | ** then the return value of this routine is undefined. |
| Line 1121 char *sqlite3_snprintf(int,char*,const c | Line 1131 char *sqlite3_snprintf(int,char*,const c |
| ** | ** |
| ** The SQLite core uses these three routines for all of its own | ** The SQLite core uses these three routines for all of its own |
| ** internal memory allocation needs. (See the exception below.) | ** internal memory allocation needs. (See the exception below.) |
| ** | |
| ** The default implementation | ** The default implementation |
| ** of the memory allocation subsystem uses the malloc(), realloc() | ** of the memory allocation subsystem uses the malloc(), realloc() |
| ** and free() provided by the standard C library. However, if | ** and free() provided by the standard C library. However, if |
| ** SQLite is compiled with the following C preprocessor macro | ** SQLite is compiled with the following C preprocessor macro |
| ** | ** |
| ** <blockquote> SQLITE_OMIT_MEMORY_ALLOCATION </blockquote> | ** <blockquote> SQLITE_MEMORY_SIZE=<i>NNN</i> </blockquote> |
| ** | ** |
| ** then no implementation is provided for these routines by | ** where <i>NNN</i> is an integer, then SQLite create a static |
| ** SQLite. The application that links against SQLite is | ** array of at least <i>NNN</i> bytes in size and use that array |
| ** expected to provide its own implementation. If the application | ** for all of its dynamic memory allocation needs. |
| ** does provide its own implementation for these routines, then | ** |
| ** it must also provide an implementations for | ** In SQLite version 3.5.0 and 3.5.1, it was possible to define |
| ** [sqlite3_memory_alarm()], [sqlite3_memory_used()], and | ** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in |
| ** [sqlite3_memory_highwater()]. The alternative implementations | ** implementation of these routines to be omitted. That capability |
| ** for these last three routines need not actually work, but | ** is no longer provided. Only built-in memory allocators can be |
| ** stub functions at least are needed to statisfy the linker. | ** used. |
| ** SQLite never calls [sqlite3_memory_highwater()] itself, but | |
| ** the symbol is included in a table as part of the | |
| ** [sqlite3_load_extension()] interface. The | |
| ** [sqlite3_memory_alarm()] and [sqlite3_memory_used()] interfaces | |
| ** are called by [sqlite3_soft_heap_limit()] and working implementations | |
| ** of both routines must be provided if [sqlite3_soft_heap_limit()] | |
| ** is to operate correctly. | |
| ** | ** |
| ** <b>Exception:</b> The windows OS interface layer calls | ** <b>Exception:</b> The windows OS interface layer calls |
| ** the system malloc() and free() directly when converting | ** the system malloc() and free() directly when converting |
| Line 1171 void sqlite3_free(void*); | Line 1175 void sqlite3_free(void*); |
| ** memory. The highwater mark is reset if the argument is | ** memory. The highwater mark is reset if the argument is |
| ** true. | ** true. |
| ** | ** |
| ** The implementation of these routines in the SQLite core | ** The value returned may or may not include allocation |
| ** is omitted if the application is compiled with the | ** overhead, depending on which built-in memory allocator |
| ** SQLITE_OMIT_MEMORY_ALLOCATION macro defined. In that case, | ** implementation is used. |
| ** the application that links SQLite must provide its own | |
| ** alternative implementation. See the documentation on | |
| ** [sqlite3_malloc()] for additional information. | |
| */ | */ |
| sqlite3_int64 sqlite3_memory_used(void); | sqlite3_int64 sqlite3_memory_used(void); |
| sqlite3_int64 sqlite3_memory_highwater(int resetFlag); | sqlite3_int64 sqlite3_memory_highwater(int resetFlag); |
| /* | /* |
| ** CAPI3REF: Memory Allocation Alarms | |
| ** | |
| ** The [sqlite3_memory_alarm] routine is used to register | |
| ** a callback on memory allocation events. | |
| ** | |
| ** This routine registers or clears a callbacks that fires when | |
| ** the amount of memory allocated exceeds iThreshold. Only | |
| ** a single callback can be registered at a time. Each call | |
| ** to [sqlite3_memory_alarm()] overwrites the previous callback. | |
| ** The callback is disabled by setting xCallback to a NULL | |
| ** pointer. | |
| ** | |
| ** The parameters to the callback are the pArg value, the | |
| ** amount of memory currently in use, and the size of the | |
| ** allocation that provoked the callback. The callback will | |
| ** presumably invoke [sqlite3_free()] to free up memory space. | |
| ** The callback may invoke [sqlite3_malloc()] or [sqlite3_realloc()] | |
| ** but if it does, no additional callbacks will be invoked by | |
| ** the recursive calls. | |
| ** | |
| ** The [sqlite3_soft_heap_limit()] interface works by registering | |
| ** a memory alarm at the soft heap limit and invoking | |
| ** [sqlite3_release_memory()] in the alarm callback. Application | |
| ** programs should not attempt to use the [sqlite3_memory_alarm()] | |
| ** interface because doing so will interfere with the | |
| ** [sqlite3_soft_heap_limit()] module. This interface is exposed | |
| ** only so that applications can provide their own | |
| ** alternative implementation when the SQLite core is | |
| ** compiled with SQLITE_OMIT_MEMORY_ALLOCATION. | |
| */ | |
| int sqlite3_memory_alarm( | |
| void(*xCallback)(void *pArg, sqlite3_int64 used, int N), | |
| void *pArg, | |
| sqlite3_int64 iThreshold | |
| ); | |
| /* | |
| ** CAPI3REF: Compile-Time Authorization Callbacks | ** CAPI3REF: Compile-Time Authorization Callbacks |
| *** | *** |
| ** This routine registers a authorizer callback with the SQLite library. | ** This routine registers a authorizer callback with the SQLite library. |
| Line 2314 int sqlite3_expired(sqlite3_stmt*); | Line 2277 int sqlite3_expired(sqlite3_stmt*); |
| int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); | int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| int sqlite3_global_recover(void); | int sqlite3_global_recover(void); |
| void sqlite3_thread_cleanup(void); | void sqlite3_thread_cleanup(void); |
| int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); | |
| /* | /* |
| ** CAPI3REF: Obtaining SQL Function Parameter Values | ** CAPI3REF: Obtaining SQL Function Parameter Values |
| Line 2518 void sqlite3_result_zeroblob(sqlite3_con | Line 2482 void sqlite3_result_zeroblob(sqlite3_con |
| ** and a UTF-16 string for sqlite3_create_collation16(). In all cases | ** and a UTF-16 string for sqlite3_create_collation16(). In all cases |
| ** the name is passed as the second function argument. | ** the name is passed as the second function argument. |
| ** | ** |
| ** The third argument must be one of the constants [SQLITE_UTF8], | ** The third argument may be one of the constants [SQLITE_UTF8], |
| ** [SQLITE_UTF16LE] or [SQLITE_UTF16BE], indicating that the user-supplied | ** [SQLITE_UTF16LE] or [SQLITE_UTF16BE], indicating that the user-supplied |
| ** routine expects to be passed pointers to strings encoded using UTF-8, | ** routine expects to be passed pointers to strings encoded using UTF-8, |
| ** UTF-16 little-endian or UTF-16 big-endian respectively. | ** UTF-16 little-endian or UTF-16 big-endian respectively. The |
| ** third argument might also be [SQLITE_UTF16_ALIGNED] to indicate that | |
| ** the routine expects pointers to 16-bit word aligned strings | |
| ** of UTF16 in the native byte order of the host computer. | |
| ** | ** |
| ** A pointer to the user supplied routine must be passed as the fifth | ** A pointer to the user supplied routine must be passed as the fifth |
| ** argument. If it is NULL, this is the same as deleting the collation | ** argument. If it is NULL, this is the same as deleting the collation |
| Line 2816 int sqlite3_release_memory(int); | Line 2783 int sqlite3_release_memory(int); |
| ** continue without error or notification. This is why the limit is | ** continue without error or notification. This is why the limit is |
| ** called a "soft" limit. It is advisory only. | ** called a "soft" limit. It is advisory only. |
| ** | ** |
| ** The soft heap limit is implemented using the [sqlite3_memory_alarm()] | |
| ** interface. Only a single memory alarm is available in the default | |
| ** implementation. This means that if the application also uses the | |
| ** memory alarm interface it will interfere with the operation of the | |
| ** soft heap limit and undefined behavior will result. | |
| ** | |
| ** Prior to SQLite version 3.5.0, this routine only constrained the memory | ** Prior to SQLite version 3.5.0, this routine only constrained the memory |
| ** allocated by a single thread - the same thread in which this routine | ** allocated by a single thread - the same thread in which this routine |
| ** runs. Beginning with SQLite version 3.5.0, the soft heap limit is | ** runs. Beginning with SQLite version 3.5.0, the soft heap limit is |