1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

updated SQLite to 3.18.0

This commit is contained in:
Kenichi Ishigaki 2017-04-01 01:12:17 +09:00
parent 0b86a0451f
commit 9e4a7f3f77
4 changed files with 1896 additions and 1160 deletions

View file

@ -977,7 +977,7 @@ are limited by the typeless nature of the SQLite database.
=head1 SQLITE VERSION =head1 SQLITE VERSION
DBD::SQLite is usually compiled with a bundled SQLite library DBD::SQLite is usually compiled with a bundled SQLite library
(SQLite version S<3.17.0> as of this release) for consistency. (SQLite version S<3.18.0> as of this release) for consistency.
However, a different version of SQLite may sometimes be used for However, a different version of SQLite may sometimes be used for
some reasons like security, or some new experimental features. some reasons like security, or some new experimental features.

2901
sqlite3.c

File diff suppressed because it is too large Load diff

View file

@ -114,16 +114,16 @@ extern "C" {
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
** a string which identifies a particular check-in of SQLite ** a string which identifies a particular check-in of SQLite
** within its configuration management system. ^The SQLITE_SOURCE_ID ** within its configuration management system. ^The SQLITE_SOURCE_ID
** string contains the date and time of the check-in (UTC) and an SHA1 ** string contains the date and time of the check-in (UTC) and a SHA1
** hash of the entire source tree. ** or SHA3-256 hash of the entire source tree.
** **
** See also: [sqlite3_libversion()], ** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.17.0" #define SQLITE_VERSION "3.18.0"
#define SQLITE_VERSION_NUMBER 3017000 #define SQLITE_VERSION_NUMBER 3018000
#define SQLITE_SOURCE_ID "2017-02-13 16:02:40 ada05cfa86ad7f5645450ac7a2a21c9aa6e57d2c" #define SQLITE_SOURCE_ID "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -2040,20 +2040,30 @@ SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
** the table has a column of type [INTEGER PRIMARY KEY] then that column ** the table has a column of type [INTEGER PRIMARY KEY] then that column
** is another alias for the rowid. ** is another alias for the rowid.
** **
** ^The sqlite3_last_insert_rowid(D) interface returns the [rowid] of the ** ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of
** most recent successful [INSERT] into a rowid table or [virtual table] ** the most recent successful [INSERT] into a rowid table or [virtual table]
** on database connection D. ** on database connection D. ^Inserts into [WITHOUT ROWID] tables are not
** ^Inserts into [WITHOUT ROWID] tables are not recorded. ** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred
** ^If no successful [INSERT]s into rowid tables ** on the database connection D, then sqlite3_last_insert_rowid(D) returns
** have ever occurred on the database connection D, ** zero.
** then sqlite3_last_insert_rowid(D) returns zero.
** **
** ^(If an [INSERT] occurs within a trigger or within a [virtual table] ** As well as being set automatically as rows are inserted into database
** method, then this routine will return the [rowid] of the inserted ** tables, the value returned by this function may be set explicitly by
** row as long as the trigger or virtual table method is running. ** [sqlite3_set_last_insert_rowid()]
** But once the trigger or virtual table method ends, the value returned **
** by this routine reverts to what it was before the trigger or virtual ** Some virtual table implementations may INSERT rows into rowid tables as
** table method began.)^ ** part of committing a transaction (e.g. to flush data accumulated in memory
** to disk). In this case subsequent calls to this function return the rowid
** associated with these internal INSERT operations, which leads to
** unintuitive results. Virtual table implementations that do write to rowid
** tables in this way can avoid this problem by restoring the original
** rowid value using [sqlite3_set_last_insert_rowid()] before returning
** control to the user.
**
** ^(If an [INSERT] occurs within a trigger then this routine will
** return the [rowid] of the inserted row as long as the trigger is
** running. Once the trigger program ends, the value returned
** by this routine reverts to what it was before the trigger was fired.)^
** **
** ^An [INSERT] that fails due to a constraint violation is not a ** ^An [INSERT] that fails due to a constraint violation is not a
** successful [INSERT] and does not change the value returned by this ** successful [INSERT] and does not change the value returned by this
@ -2080,6 +2090,16 @@ SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
*/ */
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
/*
** CAPI3REF: Set the Last Insert Rowid value.
** METHOD: sqlite3
**
** The sqlite3_set_last_insert_rowid(D, R) method allows the application to
** set the value returned by calling sqlite3_last_insert_rowid(D) to R
** without inserting a row into the database.
*/
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
/* /*
** CAPI3REF: Count The Number Of Rows Modified ** CAPI3REF: Count The Number Of Rows Modified
** METHOD: sqlite3 ** METHOD: sqlite3
@ -3404,9 +3424,9 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
** **
** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt> ** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>
** <dd>The maximum number of instructions in a virtual machine program ** <dd>The maximum number of instructions in a virtual machine program
** used to implement an SQL statement. This limit is not currently ** used to implement an SQL statement. If [sqlite3_prepare_v2()] or
** enforced, though that might be added in some future release of ** the equivalent tries to allocate space for more than this many opcodes
** SQLite.</dd>)^ ** in a single prepared statement, an SQLITE_NOMEM error is returned.</dd>)^
** **
** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt> ** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>
** <dd>The maximum number of arguments on a function.</dd>)^ ** <dd>The maximum number of arguments on a function.</dd>)^
@ -3444,6 +3464,7 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
#define SQLITE_LIMIT_TRIGGER_DEPTH 10 #define SQLITE_LIMIT_TRIGGER_DEPTH 10
#define SQLITE_LIMIT_WORKER_THREADS 11 #define SQLITE_LIMIT_WORKER_THREADS 11
/* /*
** CAPI3REF: Compiling An SQL Statement ** CAPI3REF: Compiling An SQL Statement
** KEYWORDS: {SQL statement compiler} ** KEYWORDS: {SQL statement compiler}

View file

@ -282,6 +282,8 @@ struct sqlite3_api_routines {
/* Version 3.14.0 and later */ /* Version 3.14.0 and later */
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*); int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
char *(*expanded_sql)(sqlite3_stmt*); char *(*expanded_sql)(sqlite3_stmt*);
/* Version 3.18.0 and later */
void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
}; };
/* /*
@ -540,6 +542,8 @@ typedef int (*sqlite3_loadext_entry)(
/* Version 3.14.0 and later */ /* Version 3.14.0 and later */
#define sqlite3_trace_v2 sqlite3_api->trace_v2 #define sqlite3_trace_v2 sqlite3_api->trace_v2
#define sqlite3_expanded_sql sqlite3_api->expanded_sql #define sqlite3_expanded_sql sqlite3_api->expanded_sql
/* Version 3.18.0 and later */
#define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)