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

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/test/whereE.test

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. 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
(Empty)
1 # 2012 November 9
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing the query planner to make sure it
13 # is making good planning decisions.
14 #
15
16
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
19 set ::testprefix whereE
20
21 do_execsql_test 1.1 {
22 CREATE TABLE t1(a,b);
23 INSERT INTO t1 VALUES(1,10), (2,20), (3,30), (2,22), (3, 33);
24 INSERT INTO t1 SELECT * FROM t1;
25 INSERT INTO t1 SELECT * FROM t1;
26 INSERT INTO t1 SELECT * FROM t1;
27 INSERT INTO t1 SELECT * FROM t1;
28 INSERT INTO t1 SELECT * FROM t1;
29 INSERT INTO t1 SELECT * FROM t1;
30 INSERT INTO t1 SELECT * FROM t1;
31 INSERT INTO t1 SELECT * FROM t1;
32 INSERT INTO t1 SELECT * FROM t1;
33 INSERT INTO t1 SELECT * FROM t1;
34 ALTER TABLE t1 ADD COLUMN c;
35 UPDATE t1 SET c=a*rowid+10000;
36 CREATE INDEX t1ab ON t1(a,b);
37
38 CREATE TABLE t2(x,y);
39 INSERT INTO t2 VALUES(4,44),(5,55),(6,66),(7,77);
40 INSERT INTO t2 SELECT x+4, (x+4)*11 FROM t2;
41 INSERT INTO t2 SELECT x+8, (x+8)*11 FROM t2;
42 INSERT INTO t2 SELECT x+16, (x+16)*11 FROM t2;
43 INSERT INTO t2 SELECT x+32, (x+32)*11 FROM t2;
44 INSERT INTO t2 SELECT x+64, (x+32)*11 FROM t2;
45 ALTER TABLE t2 ADD COLUMN z;
46 UPDATE t2 SET z=2;
47 CREATE UNIQUE INDEX t2zx ON t2(z,x);
48
49 EXPLAIN QUERY PLAN SELECT x FROM t1, t2 WHERE a=z AND c=x;
50 } {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
51 do_execsql_test 1.2 {
52 EXPLAIN QUERY PLAN SELECT x FROM t2, t1 WHERE a=z AND c=x;
53 } {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
54 do_execsql_test 1.3 {
55 ANALYZE;
56 EXPLAIN QUERY PLAN SELECT x FROM t1, t2 WHERE a=z AND c=x;
57 } {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
58 do_execsql_test 1.4 {
59 EXPLAIN QUERY PLAN SELECT x FROM t2, t1 WHERE a=z AND c=x;
60 } {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
61
62 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/whereD.test ('k') | third_party/sqlite/sqlite-src-3080704/test/whereF.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698