]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix backcompat.test so that it works with windows mandatory locking.
authordan <dan@noemail.net>
Thu, 19 Aug 2010 17:16:11 +0000 (17:16 +0000)
committerdan <dan@noemail.net>
Thu, 19 Aug 2010 17:16:11 +0000 (17:16 +0000)
FossilOrigin-Name: 8d05f66db7d6e8b8916fcf22fa92159d863d2610

manifest
manifest.uuid
test/backcompat.test

index a265e5437e16e5aad87e561b9ac4446bb4f1e613..a8862e88bdecf5f11df5a344c2128cac832a2805 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\stests\sfor\sWAL\smode\sto\stest/backcompat.test.
-D 2010-08-19T15:48:47
+C Fix\sbackcompat.test\sso\sthat\sit\sworks\swith\swindows\smandatory\slocking.
+D 2010-08-19T17:16:11
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -259,7 +259,7 @@ F test/autoindex1.test 7df441bf0e7a88644eb80993339dbf1db3a12c68
 F test/autovacuum.test bb7c0885e6f8f1d633045de48f2b66082162766d
 F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6
 F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
-F test/backcompat.test f09684c48e5e467b4fd9e733e5867e23f957ecf2
+F test/backcompat.test bf0f2468f9c9aba447a0625060b09d9663795074
 F test/backup.test 200e64bd91244b73ca8094bc1e03dfc83cc94c2e
 F test/backup2.test b7c69f937c912e85ac8a5dbd1e1cf290302b2d49
 F test/backup_ioerr.test 1f012e692f42c0442ae652443258f70e9f20fa38
@@ -845,7 +845,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P b03091fc3592896fcf1ec563ae9682a8e0a05baa
-R 52a8e7fbae7866867598a61fe83f6054
+P 7999910e85b1f24c5860425ba47e7ab10c22e887
+R 2312b59b9cab0b977ed7b7f3e201421e
 U dan
-Z b9ee7c10dc1f3cce4f3c954e7b1d3a07
+Z e72bc2907346bae2124df9a31e8a0e8b
index d221a9c940a87a54005c2e79f3fd954275db420e..c1a13022118b6d1347fe4f05145dee4643f8ee98 100644 (file)
@@ -1 +1 @@
-7999910e85b1f24c5860425ba47e7ab10c22e887
\ No newline at end of file
+8d05f66db7d6e8b8916fcf22fa92159d863d2610
\ No newline at end of file
index 469aeb6c7bb241f393e3d189285552cffdae98ba..1aa5179add413a033abd1af58ed95fa56b16e0be 100644 (file)
@@ -114,10 +114,19 @@ proc do_allbackcompat_test {script} {
 
 proc read_file {zFile} {
   set zData {}
-  catch {
+  if {[file exists $zFile]} {
     set fd [open $zFile]
     fconfigure $fd -translation binary -encoding binary
-    set zData [read $fd]
+
+    if {[file size $zFile]<=$::sqlite_pending_byte || $zFile != "test.db"} {
+      set zData [read $fd]
+    } else {
+      set zData [read $fd $::sqlite_pending_byte]
+      append zData [string repeat x 512]
+      seek $fd [expr $::sqlite_pending_byte+512] start
+      append zData [read $fd]
+    }
+
     close $fd
   }
   return $zData