Undo commit [f250166bb]. It is required to handle IO and other errors that occur within a VACUUM of a Zipvfs database.

FossilOrigin-Name: ae72513af37cd806a6d94aaa7c47a740e119d3b1
This commit is contained in:
dan 2016-08-05 16:16:26 +00:00
parent 5360b55c6c
commit 43c1ce390f
5 changed files with 26 additions and 13 deletions

View File

@ -1,5 +1,5 @@
C Remove\san\sincorrect\sALWAYS()\sstatement\sand\sadd\sa\stest\scase\sto\sshow\swhen\nthe\scondition\sis\ssometimes\sfalse.
D 2016-08-05T15:34:42.171
C Undo\scommit\s[f250166bb].\sIt\sis\srequired\sto\shandle\sIO\sand\sother\serrors\sthat\soccur\swithin\sa\sVACUUM\sof\sa\sZipvfs\sdatabase.
D 2016-08-05T16:16:26.624
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
@ -324,7 +324,7 @@ F src/alter.c cc28ab933ae615b22add0d609794ffb6596b42ea
F src/analyze.c 37fedc80ac966ce1745811746e68e4d8fa64c7fe
F src/attach.c 771153bd1f4ab0b97a44a13dde2c7e5e1efeba22
F src/auth.c 5c8e0f37f785f935f589496801edd19840485853
F src/backup.c 6df65fdd569c901a418887a1a76f82ec35044556
F src/backup.c 17cd25a36d49330df2bacd2cadf2a61f3b525976
F src/bitvec.c 3ee4c8b2c94ed3a7377256e18199e6ff5cf33f63
F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
F src/btree.c 2551bd3ecb8b8988fb8b23aabadfb214dbc38e46
@ -370,8 +370,8 @@ F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
F src/os_unix.c a9443cdab41d7f3cdf0df3a5aab62fd6e1c9b234
F src/os_win.c 520f23475f1de530c435d30b67b7b15fe90874b0
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c c368634b888b1c8740aea83b36bfd266f2443e60
F src/pager.h 031a87445e5e0afc85312d1c380e123ad6c7aeaf
F src/pager.c 40928c450320da78bb4bd3ae82818f4239e19b7e
F src/pager.h 966d2769e76ae347c8a32c4165faf6e6cb64546d
F src/parse.y 99b676e6fc2f4e331ab93e76b3987cffdbd28efa
F src/pcache.c 5583c8ade4b05075a60ba953ef471d1c1a9c05df
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
@ -1509,7 +1509,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 68eac74874d0646369bef3650c6cb271cca62ab4
R 8d5524e3947549ded2372df1ac699079
U drh
Z 5feee06a3e8967a54a24fbeb2c1f3aea
P 0f57effa3642e66a863f32cc7fba86d167084af3
R 7173910e7a14fcd3861af608a7447a5a
U dan
Z 5568e465afb61eecd4219a0cc50c6e2e

View File

@ -1 +1 @@
0f57effa3642e66a863f32cc7fba86d167084af3
ae72513af37cd806a6d94aaa7c47a740e119d3b1

View File

@ -777,13 +777,15 @@ int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
** sqlite3_backup_step(), we can guarantee that the copy finishes
** within a single call (unless an error occurs). The assert() statement
** checks this assumption - (p->rc) should be set to either SQLITE_DONE
** or an error code.
*/
** or an error code. */
sqlite3_backup_step(&b, 0x7FFFFFFF);
assert( b.rc!=SQLITE_OK );
rc = sqlite3_backup_finish(&b);
if( rc==SQLITE_OK ){
pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
}else{
sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));
}
assert( sqlite3BtreeIsInTrans(pTo)==0 );

View File

@ -7157,6 +7157,17 @@ sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
return &pPager->pBackup;
}
#ifndef SQLITE_OMIT_VACUUM
/*
** Unless this is an in-memory or temporary database, clear the pager cache.
*/
void sqlite3PagerClearCache(Pager *pPager){
assert( MEMDB==0 || pPager->tempFile );
if( pPager->tempFile==0 ) pager_reset(pPager);
}
#endif
#ifndef SQLITE_OMIT_WAL
/*
** This function is called when the user invokes "PRAGMA wal_checkpoint",
@ -7382,5 +7393,4 @@ int sqlite3PagerWalFramesize(Pager *pPager){
}
#endif
#endif /* SQLITE_OMIT_DISKIO */

View File

@ -203,6 +203,7 @@ const char *sqlite3PagerJournalname(Pager*);
void *sqlite3PagerTempSpace(Pager*);
int sqlite3PagerIsMemdb(Pager*);
void sqlite3PagerCacheStat(Pager *, int, int, int *);
void sqlite3PagerClearCache(Pager*);
int sqlite3SectorSize(sqlite3_file *);
/* Functions used to truncate the database file. */