From: dan Date: Mon, 19 Dec 2011 11:16:39 +0000 (+0000) Subject: Fix a couple of test cases to account for the master-journal name related change... X-Git-Tag: version-3.7.10~19^2~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f9026dd942d06903427fbfbece68a743e9a2c74;p=thirdparty%2Fsqlite.git Fix a couple of test cases to account for the master-journal name related change in [cf3bccc2]. FossilOrigin-Name: 21b76af6edd48f665cdd3af5f99d477f030c7668 --- diff --git a/manifest b/manifest index f48b9a0540..4c700358b7 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\sin\schanges\sthat\scause\sthe\sfirst\ssector\sof\sthe\sWAL\sfile\sto\sbe\ssynced\nwhen\sthe\sWAL\srestarts.\s\sThis\sis\sa\sfix\sfor\sthe\spower-loss\scorruption\nproblem\sdescribed\sin\sticket\s[ff5be73dee086] -D 2011-12-17T13:45:28.989 +C Fix\sa\scouple\sof\stest\scases\sto\saccount\sfor\sthe\smaster-journal\sname\srelated\schange\sin\s[cf3bccc2]. +D 2011-12-19T11:16:39.956 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -619,7 +619,7 @@ F test/notnull.test cc7c78340328e6112a13c3e311a9ab3127114347 F test/null.test a8b09b8ed87852742343b33441a9240022108993 F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394 F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3 -F test/pager1.test 1b630b3248c7d28862fe9e190cfe52234b502504 +F test/pager1.test b936e80553652002fc47d89bfde7018801d8257d F test/pager2.test 745b911dde3d1f24ae0870bd433dfa83d7c658c1 F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f F test/pagerfault.test 452f2cc23e3bfcfa935f4442aec1da4fe1dc0442 @@ -984,7 +984,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P d76880428013ae2c5be00d87bb3e1695af6f706f 9799241f7de952c4d1ea8bf6508b577d2b57a370 -R a66c21780a9737a3739ef721dbd80b71 -U drh -Z 8683a36598a7c916281a4627e543388f +P 44ca4d123385d759c11919865525c998c2e35bdb +R 84fa60a337903d6e9b8a452659d1b330 +U dan +Z ebf66ca7938806efd839391c15a281c8 diff --git a/manifest.uuid b/manifest.uuid index 9c694594ad..9aef15622c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -44ca4d123385d759c11919865525c998c2e35bdb \ No newline at end of file +21b76af6edd48f665cdd3af5f99d477f030c7668 \ No newline at end of file diff --git a/test/pager1.test b/test/pager1.test index 0226fe49b2..7bf8643d1a 100644 --- a/test/pager1.test +++ b/test/pager1.test @@ -990,8 +990,19 @@ do_test pager1-5.4.1 { INSERT INTO t2 VALUES(85, 'Gorbachev'); COMMIT; } - set ::max_journal -} [expr 2615+[string length [pwd]]] + + # The size of the journal file is now: + # + # 1) 512 byte header + + # 2) 2 * (1024+8) byte records + + # 3) 20+N bytes of master-journal pointer, where N is the size of + # the master-journal name encoded as utf-8 with no nul term. + # + set mj_pointer [expr { + 20 + [string length [pwd]] + [string length "/test.db-mjXXXXXX9XX"] + }] + expr {$::max_journal==(512+2*(1024+8)+$mj_pointer)} +} 1 do_test pager1-5.4.2 { set ::max_journal 0 execsql { @@ -1001,8 +1012,16 @@ do_test pager1-5.4.2 { DELETE FROM t2 WHERE b = 'Lenin'; COMMIT; } - set ::max_journal -} [expr 3111+[string length [pwd]]] + + # In synchronous=full mode, the master-journal pointer is not written + # directly after the last record in the journal file. Instead, it is + # written starting at the next (in this case 512 byte) sector boundary. + # + set mj_pointer [expr { + 20 + [string length [pwd]] + [string length "/test.db-mjXXXXXX9XX"] + }] + expr {$::max_journal==(((512+2*(1024+8)+511)/512)*512 + $mj_pointer)} +} 1 db close tv delete