Upgraded bundled Sqlite3 to version 3.7.4.

This commit is contained in:
Ilia Alshanetsky 2010-12-11 14:57:34 +00:00
parent ff77814d03
commit 9e48381b28
5 changed files with 3533 additions and 1181 deletions

2
NEWS
View file

@ -1,6 +1,8 @@
PHP NEWS PHP NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 20??, PHP 5.3.5 ?? ??? 20??, PHP 5.3.5
- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia)
- Zend Engine: - Zend Engine:
. Indirect reference to $this fails to resolve if direct $this is never used . Indirect reference to $this fails to resolve if direct $this is never used
in method. (Scott) in method. (Scott)

View file

@ -1,2 +1,2 @@
SQLite3 SQLite3
Scott MacVicar Scott MacVicar, Ilia Alshanetsky

File diff suppressed because it is too large Load diff

View file

@ -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.3" #define SQLITE_VERSION "3.7.4"
#define SQLITE_VERSION_NUMBER 3007003 #define SQLITE_VERSION_NUMBER 3007004
#define SQLITE_SOURCE_ID "2010-10-08 02:34:02 2677848087c9c090efb17c1893e77d6136a9111d" #define SQLITE_SOURCE_ID "2010-12-07 20:14:09 a586a4deeb25330037a49df295b36aaf624d0f45"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -542,6 +542,18 @@ SQLITE_API int sqlite3_exec(
** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. ** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
** If the lower four bits equal SQLITE_SYNC_FULL, that means ** If the lower four bits equal SQLITE_SYNC_FULL, that means
** to use Mac OS X style fullsync instead of fsync(). ** to use Mac OS X style fullsync instead of fsync().
**
** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
** settings. The [synchronous pragma] determines when calls to the
** xSync VFS method occur and applies uniformly across all platforms.
** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
** energetic or rigorous or forceful the sync operations are and
** only make a difference on Mac OSX for the default SQLite code.
** (Third-party VFS implementations might also make the distinction
** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
** operating systems natively supported by SQLite, only Mac OSX
** cares about the difference.)
*/ */
#define SQLITE_SYNC_NORMAL 0x00002 #define SQLITE_SYNC_NORMAL 0x00002
#define SQLITE_SYNC_FULL 0x00003 #define SQLITE_SYNC_FULL 0x00003
@ -710,6 +722,8 @@ struct sqlite3_io_methods {
#define SQLITE_LAST_ERRNO 4 #define SQLITE_LAST_ERRNO 4
#define SQLITE_FCNTL_SIZE_HINT 5 #define SQLITE_FCNTL_SIZE_HINT 5
#define SQLITE_FCNTL_CHUNK_SIZE 6 #define SQLITE_FCNTL_CHUNK_SIZE 6
#define SQLITE_FCNTL_FILE_POINTER 7
/* /*
** CAPI3REF: Mutex Handle ** CAPI3REF: Mutex Handle
@ -2633,6 +2647,20 @@ SQLITE_API int sqlite3_prepare16_v2(
*/ */
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Determine If An SQL Statement Writes The Database
**
** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
** the [prepared statement] X is [SELECT] statement and false (zero) if
** X is an [INSERT], [UPDATE], [DELETE], CREATE, DROP, [ANALYZE],
** [ALTER], or [REINDEX] statement.
** If X is a NULL pointer or any other kind of statement, including but
** not limited to [ATTACH], [DETACH], [COMMIT], [ROLLBACK], [RELEASE],
** [SAVEPOINT], [PRAGMA], or [VACUUM] the result of sqlite3_stmt_readonly(X) is
** undefined.
*/
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
/* /*
** CAPI3REF: Dynamically Typed Value Object ** CAPI3REF: Dynamically Typed Value Object
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
@ -2732,7 +2760,10 @@ typedef struct sqlite3_context sqlite3_context;
** **
** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and ** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or ** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
** string after SQLite has finished with it. ^If the fifth argument is ** string after SQLite has finished with it. ^The destructor is called
** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(),
** sqlite3_bind_text(), or sqlite3_bind_text16() fails.
** ^If the fifth argument is
** the special value [SQLITE_STATIC], then SQLite assumes that the ** the special value [SQLITE_STATIC], then SQLite assumes that the
** information is in static, unmanaged space and does not need to be freed. ** information is in static, unmanaged space and does not need to be freed.
** ^If the fifth argument has the value [SQLITE_TRANSIENT], then ** ^If the fifth argument has the value [SQLITE_TRANSIENT], then
@ -3372,12 +3403,15 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
** SQL function or aggregate, pass NULL poiners for all three function ** SQL function or aggregate, pass NULL poiners for all three function
** callbacks. ** callbacks.
** **
** ^If the tenth parameter to sqlite3_create_function_v2() is not NULL, ** ^(If the tenth parameter to sqlite3_create_function_v2() is not NULL,
** then it is invoked when the function is deleted, either by being ** then it is destructor for the application data pointer.
** overloaded or when the database connection closes. ** The destructor is invoked when the function is deleted, either by being
** ^When the destructure callback of the tenth parameter is invoked, it ** overloaded or when the database connection closes.)^
** is passed a single argument which is a copy of the pointer which was ** ^The destructor is also invoked if the call to
** the fifth parameter to sqlite3_create_function_v2(). ** sqlite3_create_function_v2() fails.
** ^When the destructor callback of the tenth parameter is invoked, it
** is passed a single argument which is a copy of the application data
** pointer which was the fifth parameter to sqlite3_create_function_v2().
** **
** ^It is permitted to register multiple implementations of the same ** ^It is permitted to register multiple implementations of the same
** functions with the same name but with either differing numbers of ** functions with the same name but with either differing numbers of
@ -3841,6 +3875,15 @@ SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
** calls to the collation creation functions or when the ** calls to the collation creation functions or when the
** [database connection] is closed using [sqlite3_close()]. ** [database connection] is closed using [sqlite3_close()].
** **
** ^The xDestroy callback is <u>not</u> called if the
** sqlite3_create_collation_v2() function fails. Applications that invoke
** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should
** check the return code and dispose of the application data pointer
** themselves rather than expecting SQLite to deal with it for them.
** This is different from every other SQLite interface. The inconsistency
** is unfortunate but cannot be changed without breaking backwards
** compatibility.
**
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
*/ */
SQLITE_API int sqlite3_create_collation( SQLITE_API int sqlite3_create_collation(
@ -4595,7 +4638,9 @@ struct sqlite3_index_info {
** ^The sqlite3_create_module_v2() interface has a fifth parameter which ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
** is a pointer to a destructor for the pClientData. ^SQLite will ** is a pointer to a destructor for the pClientData. ^SQLite will
** invoke the destructor function (if it is not NULL) when SQLite ** invoke the destructor function (if it is not NULL) when SQLite
** no longer needs the pClientData pointer. ^The sqlite3_create_module() ** no longer needs the pClientData pointer. ^The destructor will also
** be invoked if the call to sqlite3_create_module_v2() fails.
** ^The sqlite3_create_module()
** interface is equivalent to sqlite3_create_module_v2() with a NULL ** interface is equivalent to sqlite3_create_module_v2() with a NULL
** destructor. ** destructor.
*/ */
@ -4778,6 +4823,30 @@ SQLITE_API int sqlite3_blob_open(
sqlite3_blob **ppBlob sqlite3_blob **ppBlob
); );
/*
** CAPI3REF: Move a BLOB Handle to a New Row
**
** ^This function is used to move an existing blob handle so that it points
** to a different row of the same database table. ^The new row is identified
** by the rowid value passed as the second argument. Only the row can be
** changed. ^The database, table and column on which the blob handle is open
** remain the same. Moving an existing blob handle to a new row can be
** faster than closing the existing handle and opening a new one.
**
** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
** it must exist and there must be either a blob or text value stored in
** the nominated column.)^ ^If the new row is not present in the table, or if
** it does not contain a blob or text value, or if another error occurs, an
** SQLite error code is returned and the blob handle is considered aborted.
** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
** always returns zero.
**
** ^This function sets the database handle error code and message.
*/
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
/* /*
** CAPI3REF: Close A BLOB Handle ** CAPI3REF: Close A BLOB Handle
** **
@ -5185,7 +5254,7 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
** ^The [sqlite3_file_control()] interface makes a direct call to the ** ^The [sqlite3_file_control()] interface makes a direct call to the
** xFileControl method for the [sqlite3_io_methods] object associated ** xFileControl method for the [sqlite3_io_methods] object associated
** with a particular database identified by the second argument. ^The ** with a particular database identified by the second argument. ^The
** name of the database "main" for the main database or "temp" for the ** name of the database is "main" for the main database or "temp" for the
** TEMP database, or the name that appears after the AS keyword for ** TEMP database, or the name that appears after the AS keyword for
** databases that are added using the [ATTACH] SQL command. ** databases that are added using the [ATTACH] SQL command.
** ^A NULL pointer can be used in place of "main" to refer to the ** ^A NULL pointer can be used in place of "main" to refer to the
@ -5195,6 +5264,12 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
** the xFileControl method. ^The return value of the xFileControl ** the xFileControl method. ^The return value of the xFileControl
** method becomes the return value of this routine. ** method becomes the return value of this routine.
** **
** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes
** a pointer to the underlying [sqlite3_file] object to be written into
** the space pointed to by the 4th parameter. ^The SQLITE_FCNTL_FILE_POINTER
** case is a short-circuit path which does not actually invoke the
** underlying sqlite3_io_methods.xFileControl method.
**
** ^If the second parameter (zDbName) does not match the name of any ** ^If the second parameter (zDbName) does not match the name of any
** open database file, then SQLITE_ERROR is returned. ^This error ** open database file, then SQLITE_ERROR is returned. ^This error
** code is not remembered and will not be recalled by [sqlite3_errcode()] ** code is not remembered and will not be recalled by [sqlite3_errcode()]

View file

@ -191,6 +191,27 @@ struct sqlite3_api_routines {
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*); sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
const char *(*sql)(sqlite3_stmt*); const char *(*sql)(sqlite3_stmt*);
int (*status)(int,int*,int*,int); int (*status)(int,int*,int*,int);
int (*backup_finish)(sqlite3_backup*);
sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
int (*backup_pagecount)(sqlite3_backup*);
int (*backup_remaining)(sqlite3_backup*);
int (*backup_step)(sqlite3_backup*,int);
const char *(*compileoption_get)(int);
int (*compileoption_used)(const char*);
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*));
int (*db_config)(sqlite3*,int,...);
sqlite3_mutex *(*db_mutex)(sqlite3*);
int (*db_status)(sqlite3*,int,int*,int*,int);
int (*extended_errcode)(sqlite3*);
void (*log)(int,const char*,...);
sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
const char *(*sourceid)(void);
int (*stmt_status)(sqlite3_stmt*,int,int);
int (*strnicmp)(const char*,const char*,int);
int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
int (*wal_autocheckpoint)(sqlite3*,int);
int (*wal_checkpoint)(sqlite3*,const char*);
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
}; };
/* /*
@ -370,6 +391,27 @@ struct sqlite3_api_routines {
#define sqlite3_next_stmt sqlite3_api->next_stmt #define sqlite3_next_stmt sqlite3_api->next_stmt
#define sqlite3_sql sqlite3_api->sql #define sqlite3_sql sqlite3_api->sql
#define sqlite3_status sqlite3_api->status #define sqlite3_status sqlite3_api->status
#define sqlite3_backup_finish sqlite3_api->backup_finish
#define sqlite3_backup_init sqlite3_api->backup_init
#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
#define sqlite3_backup_remaining sqlite3_api->backup_remaining
#define sqlite3_backup_step sqlite3_api->backup_step
#define sqlite3_compileoption_get sqlite3_api->compileoption_get
#define sqlite3_compileoption_used sqlite3_api->compileoption_used
#define sqlite3_create_function_v2 sqlite3_api->create_function_v2
#define sqlite3_db_config sqlite3_api->db_config
#define sqlite3_db_mutex sqlite3_api->db_mutex
#define sqlite3_db_status sqlite3_api->db_status
#define sqlite3_extended_errcode sqlite3_api->extended_errcode
#define sqlite3_log sqlite3_api->log
#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
#define sqlite3_sourceid sqlite3_api->sourceid
#define sqlite3_stmt_status sqlite3_api->stmt_status
#define sqlite3_strnicmp sqlite3_api->strnicmp
#define sqlite3_unlock_notify sqlite3_api->unlock_notify
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
#define sqlite3_wal_hook sqlite3_api->wal_hook
#endif /* SQLITE_CORE */ #endif /* SQLITE_CORE */
#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0; #define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;