diff options
author | 2014-03-24 01:37:28 +0000 | |
---|---|---|
committer | 2014-03-24 01:37:28 +0000 | |
commit | 29ebcee2452a131560f5220abaf585648f84ce40 (patch) | |
tree | 844ef4fe135beff619b9e7b632f3b6722d6367e4 /lib/libsqlite3/src/backup.c | |
parent | annotate some packed structures with the alignment the hardware (diff) | |
download | wireguard-openbsd-29ebcee2452a131560f5220abaf585648f84ce40.tar.xz wireguard-openbsd-29ebcee2452a131560f5220abaf585648f84ce40.zip |
Update sqlite to 3.8.4. A list of changes are available here:
http://sqlite.org/changes.html.
Tested in a bulk and ok landry@
Diffstat (limited to 'lib/libsqlite3/src/backup.c')
-rw-r--r-- | lib/libsqlite3/src/backup.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libsqlite3/src/backup.c b/lib/libsqlite3/src/backup.c index afbaeeb1097..4a6bc7493c4 100644 --- a/lib/libsqlite3/src/backup.c +++ b/lib/libsqlite3/src/backup.c @@ -96,6 +96,7 @@ static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){ rc = SQLITE_ERROR; } sqlite3DbFree(pErrorDb, pParse->zErrMsg); + sqlite3ParserReset(pParse); sqlite3StackFree(pErrorDb, pParse); } if( rc ){ @@ -525,7 +526,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){ /* Sync the database file to disk. */ if( rc==SQLITE_OK ){ - rc = sqlite3PagerSync(pDestPager); + rc = sqlite3PagerSync(pDestPager, 0); } }else{ sqlite3PagerTruncateImage(pDestPager, nDestTruncate); @@ -600,10 +601,10 @@ int sqlite3_backup_finish(sqlite3_backup *p){ /* Set the error code of the destination database handle. */ rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc; - sqlite3Error(p->pDestDb, rc, 0); - - /* Exit the mutexes and free the backup context structure. */ if( p->pDestDb ){ + sqlite3Error(p->pDestDb, rc, 0); + + /* Exit the mutexes and free the backup context structure. */ sqlite3LeaveMutexAndCloseZombie(p->pDestDb); } sqlite3BtreeLeave(p->pSrc); |