Added the "memory:" driver (CVS 158)

FossilOrigin-Name: 54d60c68dc83410e911b828a680772541c44e9df
This commit is contained in:
drh
2000-10-19 14:10:08 +00:00
parent e907bfc2ac
commit 767c2001c6
14 changed files with 684 additions and 446 deletions
+12 -2
View File
@@ -23,7 +23,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
# $Id: select2.test,v 1.8 2000/07/29 13:07:00 drh Exp $
# $Id: select2.test,v 1.9 2000/10/19 14:10:09 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -104,9 +104,16 @@ do_test select2-3.2c {
execsql {SELECT f1 FROM tbl2 WHERE f2=1000}
} {500}
do_test select2-3.2d {
execsql {SELECT fcnt() FROM tbl2 WHERE 1000=f2}
} {2}
do_test select2-3.2e {
execsql {SELECT fcnt() FROM tbl2 WHERE f2=1000}
} {2}
testif gdbm:
do_test select2-3.2f {
set t1 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE 1000=f2}} 1] 0]
set t2 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE f2=1000}} 1] 0]
expr {$t1*0.8<$t2 && $t2*0.8<$t1}
expr {$t1*0.7<$t2 && $t2*0.7<$t1}
} {1}
# Make sure queries run faster with an index than without
@@ -117,5 +124,8 @@ do_test select2-3.3 {
set t2 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE f2==2000}} 1] 0]
expr {$t1*10 < $t2}
} {1}
do_test select2-3.4 {
expr {[execsql {SELECT fcnt() FROM tbl2 WHERE f2==2000}]>10}
} {1}
finish_test