]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
If a rollback is attempted in journal_mode=off mode, force SQLite to discard the...
authordan <dan@noemail.net>
Tue, 11 Jan 2011 16:09:55 +0000 (16:09 +0000)
committerdan <dan@noemail.net>
Tue, 11 Jan 2011 16:09:55 +0000 (16:09 +0000)
FossilOrigin-Name: ece7efce2733b4fdd71db385abebbde464ac8f30

install-sh [changed mode: 0755->0644]
manifest
manifest.uuid
src/pager.c
test/progress.test [changed mode: 0644->0755]
tool/mkopts.tcl [changed mode: 0644->0755]

old mode 100755 (executable)
new mode 100644 (file)
index 310c1dfb951ecdb53f43a4457c40e7772da6c52b..17ae3d5687de53c35ed38eec80ac129d47a8ac2c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,5 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-C Fix\sthe\ssqlite3.h\sgenerator\sscript\sso\sthat\sit\sgenerates\sthe\scorrect\nSQLITE_SOURCE_ID\sstring\swith\sthe\slatest\sversions\sof\sFossil\sthat\s\ninclude\sfractional\sseconds\son\sthe\sdate/time\sstamp.
-D 2011-01-11T12:46:05.980
+C If\sa\srollback\sis\sattempted\sin\sjournal_mode=off\smode,\sforce\sSQLite\sto\sdiscard\sthe\scontents\sof\sthe\spager\scache\sbefore\sprocessing\sany\ssubsequent\squeries.
+D 2011-01-11T16:09:55
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -100,7 +97,7 @@ F ext/rtree/rtree_util.tcl 06aab2ed5b826545bf215fff90ecb9255a8647ea
 F ext/rtree/sqlite3rtree.h 1af0899c63a688e272d69d8e746f24e76f10a3f0
 F ext/rtree/tkt3363.test 142ab96eded44a3615ec79fba98c7bde7d0f96de
 F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
-F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
+F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
 F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
 F main.mk 05d0f3475dd331896bd607cfb45c5e21b94589ad
 F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
@@ -165,7 +162,7 @@ F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
 F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e
 F src/os_unix.c aeaf65d261219ad96c021cfd0672509d83c005e4
 F src/os_win.c 2f90f7bdec714fad51cd31b4ecad3cc1b4bb5aad
-F src/pager.c c0aca5c733c15a16fe158c3215d857841a4e5381
+F src/pager.c a3d1b55d4572c229170ddb1589232ae7251f8d28
 F src/pager.h 0ea59db2a33bc6c2c02cae34de33367e1effdf76
 F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
 F src/pcache.c 09d38c44ab275db581f7a2f6ff8b9bc7f8c0faaa
@@ -592,7 +589,7 @@ F test/permutations.test c0ce0f3b741dd92a6d4c2671dbacba4b92dd81eb
 F test/pragma.test fdfc09067ea104a0c247a1a79d8093b56656f850
 F test/pragma2.test 5364893491b9231dd170e3459bfc2e2342658b47
 F test/printf.test 05970cde31b1a9f54bd75af60597be75a5c54fea
-F test/progress.test 5b075c3c790c7b2a61419bc199db87aaf48b8301
+F test/progress.test 5b075c3c790c7b2a61419bc199db87aaf48b8301 x
 F test/ptrchng.test ef1aa72d6cf35a2bbd0869a649b744e9d84977fc
 F test/quick.test 1681febc928d686362d50057c642f77a02c62e57
 F test/quota.test ddafe133653093eb9a99ccd6264884ae43f9c9b8
@@ -873,7 +870,7 @@ F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
 F tool/lemon.c dfd81a51b6e27e469ba21d01a75ddf092d429027
 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
 F tool/mkkeywordhash.c d2e6b4a5965e23afb80fbe74bb54648cd371f309
-F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
+F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
 F tool/mksqlite3c.tcl e0db70c2c52b0e3d0867ca931229e5b90ffe7837
 F tool/mksqlite3h.tcl d76c226a5e8e1f3b5f6593bcabe5e98b3b1ec9ff
@@ -898,14 +895,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P d94e59b514c16c5f7ea506e0af1c6e2ffecc13be
-R f02123c924a142fca1a394313d3028b5
-U drh
-Z 6f6ef4dbc6a35c4d5adf4fad0076b217
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
-
-iD8DBQFNLFERoxKgR168RlERAifbAJsFaxIQF3cfejQ8x4UPtTJT8QRE3ACfSRFj
-QVjUad79/TL7jK/KM05BlxQ=
-=ebHi
------END PGP SIGNATURE-----
+P 3513bf6ee090d9be97f60e12a4b39f4361ee17b7
+R dfc530d225d0c020fd7d8a2cd613ee21
+U dan
+Z 8c19b076e4fa90af7411920026738949
index 28ec38acbe21853013fbacf80a3af02cceb0fd0b..226828c844046e0c64374f06087a70a9c33f86ab 100644 (file)
@@ -1 +1 @@
-3513bf6ee090d9be97f60e12a4b39f4361ee17b7
\ No newline at end of file
+ece7efce2733b4fdd71db385abebbde464ac8f30
\ No newline at end of file
index 5fcee322bc2dcb6a49cb005d31b727c878c4ea0b..a4773e230f500eaab00e7e59bf2c2a54bbf89102 100644 (file)
@@ -5926,7 +5926,17 @@ int sqlite3PagerRollback(Pager *pPager){
     rc2 = pager_end_transaction(pPager, pPager->setMaster);
     if( rc==SQLITE_OK ) rc = rc2;
   }else if( !isOpen(pPager->jfd) || pPager->eState==PAGER_WRITER_LOCKED ){
+    int eState = pPager->eState;
     rc = pager_end_transaction(pPager, 0);
+    if( !MEMDB && eState>PAGER_WRITER_LOCKED ){
+      /* This can happen using journal_mode=off. Move the pager to the error 
+      ** state to indicate that the contents of the cache may not be trusted.
+      ** Any active readers will get SQLITE_ABORT.
+      */
+      pPager->errCode = SQLITE_ABORT;
+      pPager->eState = PAGER_ERROR;
+      return rc;
+    }
   }else{
     rc = pager_playback(pPager, 0);
   }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)