puts
expr srand(0)
# Generate interesting boundary numbers
#
foreach x
set x
for
# Scramble the $inlist into a random order.
#
# A simple selection sort. Not trying to be efficient.
#
# Reverse the order of a list
#
set nums1
set nums2
set tname boundary3
puts "do_test $tname-1.1 \173"
puts " db eval \173"
puts " CREATE TABLE t1(a,x);"
set a 0
foreach r $nums1
puts " CREATE INDEX t1i1 ON t1(a);"
puts " CREATE INDEX t1i2 ON t1(x);"
puts " \175"
puts "\175 {}"
puts "do_test $tname-1.2 \173"
puts " db eval \173"
puts " SELECT count(*) FROM t1"
puts " \175"
puts "\175 {64}"
puts "do_test $tname-1.3 \173"
puts " db eval \173"
puts " CREATE TABLE t2(r,a);"
puts " INSERT INTO t2 SELECT rowid, a FROM t1;"
puts " CREATE INDEX t2i1 ON t2(r);"
puts " CREATE INDEX t2i2 ON t2(a);"
puts " INSERT INTO t2 VALUES(9.22337303685477580800e+18,65);"
set t1ra(9.22337303685477580800e+18) 65
set t1ar(65) 9.22337303685477580800e+18)
puts " INSERT INTO t2 VALUES(-9.22337303685477580800e+18,66);"
set t1ra(-9.22337303685477580800e+18) 66
set t1ar(66) -9.22337303685477580800e+18)
puts " SELECT count(*) FROM t2;"
puts " \175"
puts "\175 {66}"
set nums3 $nums2
lappend nums3 9.22337303685477580800e+18
lappend nums3 -9.22337303685477580800e+18
set i 0
foreach r $nums3
puts