diff options
Diffstat (limited to 'lang/sql/sqlite/ext/async')
-rw-r--r-- | lang/sql/sqlite/ext/async/README.txt | 8 | ||||
-rw-r--r-- | lang/sql/sqlite/ext/async/sqlite3async.c | 12 | ||||
-rw-r--r-- | lang/sql/sqlite/ext/async/sqlite3async.h | 4 |
3 files changed, 17 insertions, 7 deletions
diff --git a/lang/sql/sqlite/ext/async/README.txt b/lang/sql/sqlite/ext/async/README.txt index 05acffe0..f62fa2fc 100644 --- a/lang/sql/sqlite/ext/async/README.txt +++ b/lang/sql/sqlite/ext/async/README.txt @@ -1,3 +1,10 @@ +NOTE (2012-11-29): + +The functionality implemented by this extension has been superseded +by WAL-mode. This module is no longer supported or maintained. The +code is retained for historical reference only. + +------------------------------------------------------------------------------ Normally, when SQLite writes to a database file, it waits until the write operation is finished before returning control to the calling application. @@ -161,4 +168,3 @@ the database, eliminating the bottleneck. The functionality required of each of the above functions is described in comments in sqlite3async.c. - diff --git a/lang/sql/sqlite/ext/async/sqlite3async.c b/lang/sql/sqlite/ext/async/sqlite3async.c index a351eaa9..4ab39cac 100644 --- a/lang/sql/sqlite/ext/async/sqlite3async.c +++ b/lang/sql/sqlite/ext/async/sqlite3async.c @@ -944,7 +944,7 @@ static int asyncFileControl(sqlite3_file *id, int op, void *pArg){ return SQLITE_OK; } } - return SQLITE_ERROR; + return SQLITE_NOTFOUND; } /* @@ -1044,15 +1044,18 @@ static int asyncOpen( char *z; int isAsyncOpen = doAsynchronousOpen(flags); - /* If zName is NULL, then the upper layer is requesting an anonymous file */ + /* If zName is NULL, then the upper layer is requesting an anonymous file. + ** Otherwise, allocate enough space to make a copy of the file name (along + ** with the second nul-terminator byte required by xOpen). + */ if( zName ){ - nName = (int)strlen(zName)+1; + nName = (int)strlen(zName); } nByte = ( sizeof(AsyncFileData) + /* AsyncFileData structure */ 2 * pVfs->szOsFile + /* AsyncFileData.pBaseRead and pBaseWrite */ - nName /* AsyncFileData.zName */ + nName + 2 /* AsyncFileData.zName */ ); z = sqlite3_malloc(nByte); if( !z ){ @@ -1507,6 +1510,7 @@ static void asyncWriterThread(void){ case ASYNC_DELETE: ASYNC_TRACE(("DELETE %s\n", p->zBuf)); rc = pVfs->xDelete(pVfs, p->zBuf, (int)p->iOffset); + if( rc==SQLITE_IOERR_DELETE_NOENT ) rc = SQLITE_OK; break; case ASYNC_OPENEXCLUSIVE: { diff --git a/lang/sql/sqlite/ext/async/sqlite3async.h b/lang/sql/sqlite/ext/async/sqlite3async.h index 143cdc77..5b20d718 100644 --- a/lang/sql/sqlite/ext/async/sqlite3async.h +++ b/lang/sql/sqlite/ext/async/sqlite3async.h @@ -75,7 +75,7 @@ int sqlite3async_initialize(const char *zParent, int isDefault); ** On win32 platforms, this function also releases the small number of ** critical section and event objects created by sqlite3async_initialize(). */ -void sqlite3async_shutdown(); +void sqlite3async_shutdown(void); /* ** This function may only be called when the asynchronous IO VFS is @@ -94,7 +94,7 @@ void sqlite3async_shutdown(); ** If multiple simultaneous calls are made to sqlite3async_run() from two ** or more threads, then the calls are serialized internally. */ -void sqlite3async_run(); +void sqlite3async_run(void); /* ** This function may only be called when the asynchronous IO VFS is |