]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Have the pager call xReiniter() instead of xDestructor() to restore btree level state...
authordanielk1977 <danielk1977@noemail.net>
Mon, 9 Apr 2007 11:20:54 +0000 (11:20 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Mon, 9 Apr 2007 11:20:54 +0000 (11:20 +0000)
FossilOrigin-Name: 4e8941333ef053442877a2a696a2c68d403c7f4d

manifest
manifest.uuid
src/pager.c
test/ioerr2.test
test/lock2.test

index a39831ea91ccc8dbca58491434d3cf27524d62b1..a9bec1813e469d5ee55da7aa7c3f9bd10e59626c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Work\saround\sbuggy\sTCL\simplementations\sin\sthe\sexclusive2\stest\sfile.\s\sTicket\s#2287\s(CVS\s3827)
-D 2007-04-08T16:52:22
+C Have\sthe\spager\scall\sxReiniter()\sinstead\sof\sxDestructor()\sto\srestore\sbtree\slevel\sstate\safter\srolling\sback\sa\spage.\s(CVS\s3828)
+D 2007-04-09T11:20:54
 F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -86,7 +86,7 @@ F src/os_unix.c 426b4c03c304ad78746d65d9ba101e0b72e18e23
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
 F src/os_win.c c9a99524d6b2bdec636264cad1b67553925e3309
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
-F src/pager.c d0bd990ade9062ec1884a4c4e138f464e18e9250
+F src/pager.c 655073dd7b32eade2f10f69e1d51fece380d45e1
 F src/pager.h e79a24cf200b8771366217f5bca414f5b7823f42
 F src/parse.y b6cfbadb6d5b21b5087d30698ee5af0ebb098767
 F src/pragma.c 3b992b5b2640d6ae25cef05aa6a42cd1d6c43234
@@ -245,7 +245,7 @@ F test/insert4.test 0bb119fea2868afdcf78e4e3e3bfed27bbdb2430
 F test/interrupt.test c38b7f7c17914f0cd6a119beed5d03bc3f47f9eb
 F test/intpkey.test af4fd826c4784ec5c93b444de07adea0254d0d30
 F test/ioerr.test 491d42c49bbec598966d26b01ed7901f55e5ee2d
-F test/ioerr2.test 5f672f7f37a424bb1e02bee4fdedfa319a95da29
+F test/ioerr2.test d37de99aa6e96ad55c3503b6365346e019c5ed6e
 F test/join.test af0443185378b64878750aa1cf4b83c216f246b4
 F test/join2.test f2171c265e57ee298a27e57e7051d22962f9f324
 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
@@ -259,7 +259,7 @@ F test/limit.test 2a87b9cb2165abb49ca0ddcf5cb43cf24074581f
 F test/loadext.test 9ab2cb0226329c1a62dd45d204be95158a872201
 F test/loadext2.test 95ca7e2cb03fd3e068de97c3a2fe58dbdfd769e1
 F test/lock.test 6825aea0b5885578b1b63a3b178803842c4ee9f1
-F test/lock2.test d83ba79d3c4fffdb5b926c7d8ca7a36c34288a55
+F test/lock2.test b95915eb4b6f8420acb30c68170d8f0ed9364efe
 F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9
 F test/lock4.test 49e22396b9be6e047b3d35469f233be79153c9d5
 F test/main.test e7212ce1023957c7209778cc87fa932bd79ba89a
@@ -455,7 +455,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 105a7efb090a5619e82a7e2931d4d3e080e6465a
-R 08904a3aa0378c7ab8cc818bba8998f1
-U drh
-Z 677eb1d566591904a5e664d515483f3c
+P 5424fcc5f82e864e0a85a71e0ae39209200386c6
+R 27ca5f36da384c7469144b8aa517ce6b
+U danielk1977
+Z dce029906fcde6f3be2aa17f46e3fa64
index 2081b630f6e01c012c41218f6c6e1b3394d02e9d..e32f489504616af72a989d926caeeb5d15e4866e 100644 (file)
@@ -1 +1 @@
-5424fcc5f82e864e0a85a71e0ae39209200386c6
\ No newline at end of file
+4e8941333ef053442877a2a696a2c68d403c7f4d
\ No newline at end of file
index 725c032581ae419b68f306823e15e50319a75b27..6f3d02957076be38332e920000591d9fb525f83d 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.325 2007/04/07 15:03:17 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.326 2007/04/09 11:20:54 danielk1977 Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -1115,8 +1115,8 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){
     /* assert( pPg->nRef==0 || pPg->pgno==1 ); */
     pData = PGHDR_TO_DATA(pPg);
     memcpy(pData, aData, pPager->pageSize);
-    if( pPager->xDestructor ){  /*** FIX ME:  Should this be xReinit? ***/
-      pPager->xDestructor(pPg, pPager->pageSize);
+    if( pPager->xReiniter ){
+      pPager->xReiniter(pPg, pPager->pageSize);
     }
 #ifdef SQLITE_CHECK_PAGES
     pPg->pageHash = pager_pagehash(pPg);
index dd4e5db3ce21e8d151e1abae44b84a4c82047fcf..258b805e3f35a5c8cea6b6c46d16e779cdbd2803 100644 (file)
@@ -15,7 +15,7 @@
 # The tests in this file use special facilities that are only
 # available in the SQLite test fixture.
 #
-# $Id: ioerr2.test,v 1.1 2007/04/02 16:46:23 danielk1977 Exp $
+# $Id: ioerr2.test,v 1.2 2007/04/09 11:20:54 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -51,7 +51,9 @@ proc check_db {testname} {
     db close
     sqlite3 db test.db
   } else {
-    if {$rc} {error $msg}
+    if {$rc || $msg ne "ok"} {
+      error $msg
+    }
     catch {execsql ROLLBACK}
   }
 
@@ -76,6 +78,7 @@ set sql {
   ROLLBACK;
 }
 
+breakpoint
 foreach bPersist [list 0 1] {
   set ::go 1
   for {set ::N 1} {$::go} {incr ::N} {
index ef7020e2dab7aed29b42710a42542252ce51df1a..db43d0abaa5734c93e02c74503b58126a9a43aa3 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script is database locks between competing processes.
 #
-# $Id: lock2.test,v 1.6 2005/09/17 16:48:19 drh Exp $
+# $Id: lock2.test,v 1.7 2007/04/09 11:20:54 danielk1977 Exp $
 
 
 set testdir [file dirname $argv0]
@@ -22,7 +22,11 @@ source $testdir/tester.tcl
 # 'testfixture' to execute a command. The child testfixture process is shut
 # down by closing the channel.
 proc launch_testfixture {} {
-  set chan [open "|[file join . testfixture] tf_main.tcl" r+]
+  set prg [info nameofexec]
+  if {$prg eq ""} {
+    set prg [file join . testfixture]
+  }
+  set chan [open "|$prg tf_main.tcl" r+]
   fconfigure $chan -buffering line
   return $chan
 }