sync up our in tree sqlite with the 3.3.13 official release. Commit to follow to finish this process on the windows build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4351 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-02-22 22:09:42 +00:00
parent 64133ab31a
commit 5791353cec
118 changed files with 15152 additions and 1229 deletions
+30 -1
View File
@@ -12,7 +12,7 @@
# focus of this file is testing the use of indices in WHERE clauses
# based on recent changes to the optimizer.
#
# $Id: where2.test,v 1.9 2006/05/11 13:26:26 drh Exp $
# $Id: where2.test,v 1.10 2006/11/06 15:10:06 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -451,4 +451,33 @@ ifcapable subquery {
}
} {}
}
# Make sure WHERE clauses of the form A=1 AND (B=2 OR B=3) are optimized
# when we have an index on A and B.
#
ifcapable or_opt {
do_test where2-9.1 {
execsql {
BEGIN;
CREATE TABLE t10(a,b,c);
INSERT INTO t10 VALUES(1,1,1);
INSERT INTO t10 VALUES(1,2,2);
INSERT INTO t10 VALUES(1,3,3);
}
for {set i 4} {$i<=1000} {incr i} {
execsql {INSERT INTO t10 VALUES(1,$i,$i)}
}
execsql {
CREATE INDEX i10 ON t10(a,b);
COMMIT;
SELECT count(*) FROM t10;
}
} 1000
do_test where2-9.2 {
count {
SELECT * FROM t10 WHERE a=1 AND (b=2 OR b=3)
}
} {1 2 2 1 3 3 7}
}
finish_test