SQLite

Check-in [e07a33ea0f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem with the previous change to malloc_common.tcl.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e07a33ea0fd50d56f2d00965c754e652c48f32fb
User & Date: dan 2010-09-16 15:58:12.000
Context
2010-09-16
16:16
Further tweaks related to deleting files from malloc_common.tcl. (check-in: 3e649f80e2 user: dan tags: trunk)
15:58
Fix a problem with the previous change to malloc_common.tcl. (check-in: e07a33ea0f user: dan tags: trunk)
15:23
Change code in malloc_common.tcl (test code) to retry a "file delete -force" if it fails. (check-in: ebfb04f00c user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/tester.tcl.
607
608
609
610
611
612
613
614
615
616


617
618
619
620
621
622
623
  # extensions that keep a file open a little longer than we expect, causing
  # the delete to fail.
  #
  # The solution is to wait a short amount of time before retrying the delete.
  #
  set nRetry  50                  ;# Maximum number of retries.
  set nDelay 100                  ;# Delay in ms before retrying.
  set rc 1
  for {set i 0} {$i<$nRetry && $rc} {incr i} {
    set rc [catch {file delete -force $filename} msg]


  }
  if {$rc} { error $msg }
}

# Do an integrity check of the entire database
#
proc integrity_check {name {db db}} {







<
|

>
>







607
608
609
610
611
612
613

614
615
616
617
618
619
620
621
622
623
624
  # extensions that keep a file open a little longer than we expect, causing
  # the delete to fail.
  #
  # The solution is to wait a short amount of time before retrying the delete.
  #
  set nRetry  50                  ;# Maximum number of retries.
  set nDelay 100                  ;# Delay in ms before retrying.

  for {set i 0} {$i<$nRetry} {incr i} {
    set rc [catch {file delete -force $filename} msg]
    if {$rc==0} continue
    after $nDelay
  }
  if {$rc} { error $msg }
}

# Do an integrity check of the entire database
#
proc integrity_check {name {db db}} {