Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: third_party/sqlite/src/test/manydb.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 2005 October 3 1 # 2005 October 3
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 26 matching lines...) Expand all
37 set filehandles {} 37 set filehandles {}
38 catch { 38 catch {
39 for {set i 0} {$i<($N * 3)} {incr i} { 39 for {set i 0} {$i<($N * 3)} {incr i} {
40 lappend filehandles [open testfile.1 w] 40 lappend filehandles [open testfile.1 w]
41 } 41 }
42 } 42 }
43 foreach fd $filehandles { 43 foreach fd $filehandles {
44 close $fd 44 close $fd
45 } 45 }
46 catch { 46 catch {
47 file delete -force testfile.1 47 forcedelete testfile.1
48 } 48 }
49 set N [expr $i / $num_fd_per_openwrite_db] 49 set N [expr $i / $num_fd_per_openwrite_db]
50 50
51 # Create a bunch of random database names 51 # Create a bunch of random database names
52 # 52 #
53 unset -nocomplain dbname 53 unset -nocomplain dbname
54 unset -nocomplain used 54 unset -nocomplain used
55 for {set i 0} {$i<$N} {incr i} { 55 for {set i 0} {$i<$N} {incr i} {
56 while 1 { 56 while 1 {
57 set name test-[format %08x [expr {int(rand()*0x7fffffff)}]].db 57 set name test-[format %08x [expr {int(rand()*0x7fffffff)}]].db
(...skipping 27 matching lines...) Expand all
85 } db$i 85 } db$i
86 } {1 2} 86 } {1 2}
87 } 87 }
88 88
89 89
90 # Close the databases and erase the files. 90 # Close the databases and erase the files.
91 # 91 #
92 for {set i 0} {$i<$N} {incr i} { 92 for {set i 0} {$i<$N} {incr i} {
93 do_test manydb-3.$i { 93 do_test manydb-3.$i {
94 db$i close 94 db$i close
95 file delete -force $dbname($i) 95 forcedelete $dbname($i)
96 } {} 96 } {}
97 } 97 }
98 98
99 99
100 100
101 101
102 finish_test 102 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698