Bug 737807 - Upgrade SQLite to version 3.7.11 (SQLite changes). r=mak

This commit is contained in:
Ryan VanderMeulen 2012-03-23 21:49:46 -04:00
Родитель 61c2ca4966
Коммит 3d645bdc42
2 изменённых файлов: 2406 добавлений и 1806 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -107,9 +107,9 @@ extern "C" {
** [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.7.10" #define SQLITE_VERSION "3.7.11"
#define SQLITE_VERSION_NUMBER 3007010 #define SQLITE_VERSION_NUMBER 3007011
#define SQLITE_SOURCE_ID "2012-01-16 13:28:40 ebd01a8deffb5024a5d7494eef800d2366d97204" #define SQLITE_SOURCE_ID "2012-03-20 11:35:50 00bb9c9ce4f465e6ac321ced2a9d0062dc364669"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -461,6 +461,7 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) #define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) #define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8)) #define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8))
/* /*
** CAPI3REF: Flags For File Open Operations ** CAPI3REF: Flags For File Open Operations
@ -716,7 +717,8 @@ struct sqlite3_io_methods {
** into an integer that the pArg argument points to. This capability ** into an integer that the pArg argument points to. This capability
** is used during testing and only needs to be supported when SQLITE_TEST ** is used during testing and only needs to be supported when SQLITE_TEST
** is defined. ** is defined.
** ** <ul>
** <li>[[SQLITE_FCNTL_SIZE_HINT]]
** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS ** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS
** layer a hint of how large the database file will grow to be during the ** layer a hint of how large the database file will grow to be during the
** current transaction. This hint is not guaranteed to be accurate but it ** current transaction. This hint is not guaranteed to be accurate but it
@ -724,6 +726,7 @@ struct sqlite3_io_methods {
** file space based on this hint in order to help writes to the database ** file space based on this hint in order to help writes to the database
** file run faster. ** file run faster.
** **
** <li>[[SQLITE_FCNTL_CHUNK_SIZE]]
** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS ** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS
** extends and truncates the database file in chunks of a size specified ** extends and truncates the database file in chunks of a size specified
** by the user. The fourth argument to [sqlite3_file_control()] should ** by the user. The fourth argument to [sqlite3_file_control()] should
@ -732,11 +735,13 @@ struct sqlite3_io_methods {
** chunks (say 1MB at a time), may reduce file-system fragmentation and ** chunks (say 1MB at a time), may reduce file-system fragmentation and
** improve performance on some systems. ** improve performance on some systems.
** **
** <li>[[SQLITE_FCNTL_FILE_POINTER]]
** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer ** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer
** to the [sqlite3_file] object associated with a particular database ** to the [sqlite3_file] object associated with a particular database
** connection. See the [sqlite3_file_control()] documentation for ** connection. See the [sqlite3_file_control()] documentation for
** additional information. ** additional information.
** **
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]
** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by ** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by
** SQLite and sent to all VFSes in place of a call to the xSync method ** SQLite and sent to all VFSes in place of a call to the xSync method
** when the database connection has [PRAGMA synchronous] set to OFF.)^ ** when the database connection has [PRAGMA synchronous] set to OFF.)^
@ -747,6 +752,7 @@ struct sqlite3_io_methods {
** opcode as doing so may disrupt the operation of the specialized VFSes ** opcode as doing so may disrupt the operation of the specialized VFSes
** that do require it. ** that do require it.
** **
** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]]
** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic
** retry counts and intervals for certain disk I/O operations for the ** retry counts and intervals for certain disk I/O operations for the
** windows [VFS] in order to provide robustness in the presence of ** windows [VFS] in order to provide robustness in the presence of
@ -763,6 +769,7 @@ struct sqlite3_io_methods {
** into the array entry, allowing the current retry settings to be ** into the array entry, allowing the current retry settings to be
** interrogated. The zDbName parameter is ignored. ** interrogated. The zDbName parameter is ignored.
** **
** <li>[[SQLITE_FCNTL_PERSIST_WAL]]
** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the ** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the
** persistent [WAL | Write AHead Log] setting. By default, the auxiliary ** persistent [WAL | Write AHead Log] setting. By default, the auxiliary
** write ahead log and shared memory files used for transaction control ** write ahead log and shared memory files used for transaction control
@ -777,6 +784,7 @@ struct sqlite3_io_methods {
** WAL mode. If the integer is -1, then it is overwritten with the current ** WAL mode. If the integer is -1, then it is overwritten with the current
** WAL persistence setting. ** WAL persistence setting.
** **
** <li>[[SQLITE_FCNTL_POWERSAFE_OVERWRITE]]
** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the ** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the
** persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting ** persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting
** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the ** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the
@ -786,11 +794,13 @@ struct sqlite3_io_methods {
** mode. If the integer is -1, then it is overwritten with the current ** mode. If the integer is -1, then it is overwritten with the current
** zero-damage mode setting. ** zero-damage mode setting.
** **
** <li>[[SQLITE_FCNTL_OVERWRITE]]
** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening ** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening
** a write transaction to indicate that, unless it is rolled back for some ** a write transaction to indicate that, unless it is rolled back for some
** reason, the entire database file will be overwritten by the current ** reason, the entire database file will be overwritten by the current
** transaction. This is used by VACUUM operations. ** transaction. This is used by VACUUM operations.
** **
** <li>[[SQLITE_FCNTL_VFSNAME]]
** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of
** all [VFSes] in the VFS stack. The names are of all VFS shims and the ** all [VFSes] in the VFS stack. The names are of all VFS shims and the
** final bottom-level VFS are written into memory obtained from ** final bottom-level VFS are written into memory obtained from
@ -801,6 +811,30 @@ struct sqlite3_io_methods {
** do anything. Callers should initialize the char* variable to a NULL ** do anything. Callers should initialize the char* variable to a NULL
** pointer in case this file-control is not implemented. This file-control ** pointer in case this file-control is not implemented. This file-control
** is intended for diagnostic use only. ** is intended for diagnostic use only.
**
** <li>[[SQLITE_FCNTL_PRAGMA]]
** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA]
** file control is sent to the open [sqlite3_file] object corresponding
** to the database file to which the pragma statement refers. ^The argument
** to the [SQLITE_FCNTL_PRAGMA] file control is an array of
** pointers to strings (char**) in which the second element of the array
** is the name of the pragma and the third element is the argument to the
** pragma or NULL if the pragma has no argument. ^The handler for an
** [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element
** of the char** argument point to a string obtained from [sqlite3_mprintf()]
** or the equivalent and that string will become the result of the pragma or
** the error message if the pragma fails. ^If the
** [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal
** [PRAGMA] processing continues. ^If the [SQLITE_FCNTL_PRAGMA]
** file control returns [SQLITE_OK], then the parser assumes that the
** VFS has handled the PRAGMA itself and the parser generates a no-op
** prepared statement. ^If the [SQLITE_FCNTL_PRAGMA] file control returns
** any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means
** that the VFS encountered an error while handling the [PRAGMA] and the
** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA]
** file control occurs at the beginning of pragma statement analysis and so
** it is able to override built-in [PRAGMA] statements.
** </ul>
*/ */
#define SQLITE_FCNTL_LOCKSTATE 1 #define SQLITE_FCNTL_LOCKSTATE 1
#define SQLITE_GET_LOCKPROXYFILE 2 #define SQLITE_GET_LOCKPROXYFILE 2
@ -815,6 +849,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_OVERWRITE 11 #define SQLITE_FCNTL_OVERWRITE 11
#define SQLITE_FCNTL_VFSNAME 12 #define SQLITE_FCNTL_VFSNAME 12
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13 #define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
#define SQLITE_FCNTL_PRAGMA 14
/* /*
** CAPI3REF: Mutex Handle ** CAPI3REF: Mutex Handle
@ -2644,9 +2679,14 @@ SQLITE_API int sqlite3_open_v2(
** **
** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean ** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean
** parameter and returns true (1) or false (0) according to the value ** parameter and returns true (1) or false (0) according to the value
** of P. The value of P is true if it is "yes" or "true" or "on" or ** of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the
** a non-zero number and is false otherwise. If P is not a query parameter ** value of query parameter P is one of "yes", "true", or "on" in any
** on F then sqlite3_uri_boolean(F,P,B) returns (B!=0). ** case or if the value begins with a non-zero number. The
** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of
** query parameter P is one of "no", "false", or "off" in any case or
** if the value begins with a numeric zero. If P is not a query
** parameter on F or if the value of P is does not match any of the
** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0).
** **
** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a ** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a
** 64-bit signed integer and returns that integer, or D if P does not ** 64-bit signed integer and returns that integer, or D if P does not
@ -4459,6 +4499,15 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
*/ */
SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
/*
** CAPI3REF: Determine if a database is read-only
**
** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
** of connection D is read-only, 0 if it is read/write, or -1 if N is not
** the name of a database on connection D.
*/
SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
/* /*
** CAPI3REF: Find the next prepared statement ** CAPI3REF: Find the next prepared statement
** **
@ -6584,11 +6633,12 @@ SQLITE_API int sqlite3_unlock_notify(
/* /*
** CAPI3REF: String Comparison ** CAPI3REF: String Comparison
** **
** ^The [sqlite3_strnicmp()] API allows applications and extensions to ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
** compare the contents of two buffers containing UTF-8 strings in a ** and extensions to compare the contents of two buffers containing UTF-8
** case-independent fashion, using the same definition of case independence ** strings in a case-independent fashion, using the same definition of "case
** that SQLite uses internally when comparing identifiers. ** independence" that SQLite uses internally when comparing identifiers.
*/ */
SQLITE_API int sqlite3_stricmp(const char *, const char *);
SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
/* /*