Lines Matching refs:set
20 set testdir [file dirname $argv0]
40 set ::b [btree_open test2.bt]
54 set ::c2 [btree_cursor $::b 2 1]
98 for {set i 2} {$i<=6} {incr i} {
99 catch {btree_close_cursor [set ::c$i]}
101 set ::c$i [btree_cursor $::b $i 1]
105 set format %0${L}d
106 for {set i 1} {$i<=$N} {incr i} {
107 set key [format $format $i]
108 set data $key
117 set key [format %0${L}d $keynum]
118 set r $key
119 set i 1
131 set ck [btree_integrity_check $::b 2 3 4 5 6]
140 set N [btree_data $::c2]
142 set L [btree_data $::c2]
143 set LM1 [expr {$L-1}]
144 for {set i 1} {$i<=$N} {incr i} {
145 set key [btree_key $::c3]
146 if {[scan $key %d k]<1} {set k 0}
148 set key [btree_key $::c4]
149 if {[scan $key %d k]<1} {set k 0}
157 set data [btree_data $::c4]
160 set data [btree_data $::c3]
163 set skey [string range $key 0 $LM1]
165 set keylen [btree_data $::c5]
167 set keylen $L
177 set datalen [btree_data $::c6]
179 set datalen $L
198 set chngcnt 0
201 set N [btree_data $::c2]
203 set L [btree_data $::c2]
204 set LM1 [expr {$L-1}]
205 set total [expr {int($N*$n)}]
206 set format %0${L}d
207 for {set i 0} {$i<$total} {incr i} {
208 set k [expr {int(rand()*$N)+1}]
209 set insert [expr {rand()<=$I}]
210 set longkey [expr {rand()<=$K}]
211 set longdata [expr {rand()<=$D}]
216 set x [expr {rand()}]
217 set keylen [expr {int($x*$x*$x*$x*3000)+10}]
219 set keylen $L
221 set key [make_payload $k $L $keylen]
223 set x [expr {rand()}]
224 set datalen [expr {int($x*$x*$x*$x*3000)+10}]
226 set datalen $L
228 set data [make_payload $k $L $datalen]
229 set basekey [format $format $k]
230 if {[set c [btree_move_to $::c3 $basekey]]==0} {
238 if {[set c [btree_move_to $::c4 $basekey]]==0} {
246 if {[scan [btree_key $::c4] %d kx]<1} {set kx -1}
265 # set ck [btree_integrity_check $::b 2 3 4 5 6]
277 set testno 2
285 set hash [md5file test2.bt]
287 set ::c2 [btree_cursor $::b 2 1]
288 set ::c3 [btree_cursor $::b 3 1]
289 set ::c4 [btree_cursor $::b 4 1]
290 set ::c5 [btree_cursor $::b 5 1]
291 set ::c6 [btree_cursor $::b 6 1]
307 set ::c2 [btree_cursor $::b 2 1]
308 set ::c3 [btree_cursor $::b 3 1]
309 set ::c4 [btree_cursor $::b 4 1]
310 set ::c5 [btree_cursor $::b 5 1]
311 set ::c6 [btree_cursor $::b 6 1]
336 set num2 1
346 set testid btree2-$testno.8.$num2
347 set hash [md5file test2.bt]
349 set ::b [btree_open test2.bt]
350 set ::c2 [btree_cursor $::b 2 1]
351 set ::c3 [btree_cursor $::b 3 1]
352 set ::c4 [btree_cursor $::b 4 1]
353 set ::c5 [btree_cursor $::b 5 1]
354 set ::c6 [btree_cursor $::b 6 1]
357 set cnt 6
358 for {set i 2} {$i<=6} {incr i} {
359 if {[lindex [btree_cursor_dump [set ::c$i]] 0]!=$i} {incr cnt}
383 set ::c2 [btree_cursor $::b 2 1]
384 set ::c3 [btree_cursor $::b 3 1]
385 set ::c4 [btree_cursor $::b 4 1]
386 set ::c5 [btree_cursor $::b 5 1]
387 set ::c6 [btree_cursor $::b 6 1]
398 set hash [md5file test2.bt]
409 set ::b [btree_open test2.bt]
410 set ::c2 [btree_cursor $::b 2 1]
411 set ::c3 [btree_cursor $::b 3 1]
412 set ::c4 [btree_cursor $::b 4 1]
413 set ::c5 [btree_cursor $::b 5 1]
414 set ::c6 [btree_cursor $::b 6 1]
431 set ::b [btree_open test2.bt]