]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove an unnecessary branch from wal.c.
authordan <dan@noemail.net>
Fri, 4 Jun 2010 17:16:52 +0000 (17:16 +0000)
committerdan <dan@noemail.net>
Fri, 4 Jun 2010 17:16:52 +0000 (17:16 +0000)
FossilOrigin-Name: 8e54786c9a0c5c399f228f56c73271f84d75694b

manifest
manifest.uuid
src/wal.c
test/wal3.test

index 0bdced36782685ac33372b00cfe44413fe7a1de2..f00c8d6c4faf28fd730944422123ff109f0ccf4a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\san\sEnglish\slanguage\serror\smessage\sto\scorresponding\sto\sSQLITE_PROTOCOL.\s"locking\sprotocol".
-D 2010-06-04T15:59:59
+C Remove\san\sunnecessary\sbranch\sfrom\swal.c.
+D 2010-06-04T17:16:53
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -224,7 +224,7 @@ F src/vdbeblob.c 5327132a42a91e8b7acfb60b9d2c3b1c5c863e0e
 F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1
 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
 F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda
-F src/wal.c f34425da57038645102bae4ba1ee2b4a87a06557
+F src/wal.c ea912c55b33ae62ae375efb80ca7ae6ef919943c
 F src/wal.h 4ace25262452d17e7d3ec970c89ee17794004008
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356
@@ -763,7 +763,7 @@ F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
 F test/vtab_shared.test 0eff9ce4f19facbe0a3e693f6c14b80711a4222d
 F test/wal.test bfec61450b47cdf09f7d2269f9e9967683b8b0fc
 F test/wal2.test c90d20363f17373cbf5bdfcee3571b43e8fa597b
-F test/wal3.test 5436fdc7fc835d78a7e39ca863dee99b02965e8e
+F test/wal3.test 08626ca06bc87f34179258515c2d674b56b7e150
 F test/wal_common.tcl 3e953ae60919281688ea73e4d0aa0e1bc94becd9
 F test/walbak.test e7650a26eb4b8abeca9b145b1af1e63026dde432
 F test/walcksum.test 4efa8fb88c32bed8288ea4385a9cc113a5c8f0bf
@@ -817,7 +817,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 157feba10f7ac01eecf79715c44bb16c98958280
-R 4b9fd9c8da46e38cbcd3302995ecbb78
+P ca327e32cfe1633f2c9d3f058e411f108aaa2b3c
+R 02edcf55cffb3be8e9337fa14f5f9042
 U dan
-Z 8c3b48407d3b3e089791e93b7d98c5de
+Z 3024f5e351971331772efea8971b5efc
index b1cb9ac3370bd4c0f67d51fd436ccc77c30715cc..2642c19a099f537092fead0683863de50741278a 100644 (file)
@@ -1 +1 @@
-ca327e32cfe1633f2c9d3f058e411f108aaa2b3c
\ No newline at end of file
+8e54786c9a0c5c399f228f56c73271f84d75694b
\ No newline at end of file
index 8c10270017862065a126e73ba5ac651eb0ac9230..69c57574127b07857ef8e2ee720bb72a09a9cd3c 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -1647,8 +1647,6 @@ static int walIndexReadHdr(Wal *pWal, int *pChanged){
       }
       walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
       pWal->writeLock = 0;
-    }else if( rc!=SQLITE_BUSY ){
-      return rc;
     }
   }
 
index ccd8f5b9112ad08aed2ca0c3ada2b9c8d07012cb..5b9fcd5cbfd43ab4c656cf5dcde0bfac25f61cf9 100644 (file)
@@ -262,7 +262,11 @@ foreach {tn syncmode synccount} {
 # When recovering the contents of a WAL file, a process obtains the WRITER
 # lock, then locks all other bytes before commencing recovery. If it fails
 # to lock all other bytes (because some other process is holding a read
-# lock) it should return SQLITE_BUSY to the caller. Test this.
+# lock) it should retry up to 100 times. Then return SQLITE_PROTOCOL to the 
+# caller. Test this (test case wal3-4.3).
+#
+# Also test the effect of hitting an SQLITE_BUSY while attempting to obtain
+# the WRITER lock (should be the same). Test case wal3-4.4.
 # 
 proc lock_callback {method filename handle lock} {
   lappend ::locks $lock
@@ -301,6 +305,18 @@ do_test wal3-4.3 {
   catchsql { SELECT * FROM x }
 } {1 {locking protocol}}
 
+puts "  Warning: Same again!"
+proc lock_callback {method filename handle lock} {
+  if {$lock == "0 1 lock exclusive"} { return SQLITE_BUSY }
+  return SQLITE_OK
+}
+do_test wal3-4.4 {
+  db close
+  set ::locks [list]
+  sqlite3 db test.db -vfs T
+  catchsql { SELECT * FROM x }
+} {1 {locking protocol}}
+
 db close
 T delete