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

Side by Side Diff: third_party/sqlite/src/test/view.test

Issue 2765553002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: Created 3 years, 9 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
1 # 2002 February 26 1 # 2002 February 26
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 } {2 3 5 6 8 9} 86 } {2 3 5 6 8 9}
87 do_test view-1.8 { 87 do_test view-1.8 {
88 db close 88 db close
89 sqlite3 db test.db 89 sqlite3 db test.db
90 execsql { 90 execsql {
91 SELECT * FROM v1 ORDER BY a; 91 SELECT * FROM v1 ORDER BY a;
92 } 92 }
93 } {2 3 5 6 8 9} 93 } {2 3 5 6 8 9}
94 94
95 do_execsql_test view-1.10 {
96 CREATE TABLE t9(x INTEGER);
97 CREATE VIEW v9a AS SELECT x FROM t9;
98 CREATE VIEW v9b AS SELECT * FROM t9;
99 CREATE VIEW v9c(x) AS SELECT x FROM t9;
100 CREATE VIEW v9d(x) AS SELECT * FROM t9;
101 } {}
102 do_execsql_test view-1.11 {
103 PRAGMA table_info(v9a);
104 } {0 x INTEGER 0 {} 0}
105 do_execsql_test view-1.12 {
106 PRAGMA table_info(v9b);
107 } {0 x INTEGER 0 {} 0}
108 do_execsql_test view-1.13 {
109 PRAGMA table_info(v9c);
110 } {0 x INTEGER 0 {} 0}
111 do_execsql_test view-1.14 {
112 PRAGMA table_info(v9d);
113 } {0 x INTEGER 0 {} 0}
114
95 do_test view-2.1 { 115 do_test view-2.1 {
96 execsql { 116 execsql {
97 CREATE VIEW v2 AS SELECT * FROM t1 WHERE a>5 117 CREATE VIEW v2 AS SELECT * FROM t1 WHERE a>5
98 }; # No semicolon 118 }; # No semicolon
99 execsql2 { 119 execsql2 {
100 SELECT * FROM v2; 120 SELECT * FROM v2;
101 } 121 }
102 } {x 7 a 8 b 9 c 10} 122 } {x 7 a 8 b 9 c 10}
103 do_test view-2.2 { 123 do_test view-2.2 {
104 catchsql { 124 catchsql {
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 SELECT * FROM x1; 669 SELECT * FROM x1;
650 } {123 234 345} 670 } {123 234 345}
651 do_test view-22.2 { 671 do_test view-22.2 {
652 unset -nocomplain x 672 unset -nocomplain x
653 db eval {SELECT * FROM x1} x break 673 db eval {SELECT * FROM x1} x break
654 lsort [array names x] 674 lsort [array names x]
655 } {{} * :1 :2} 675 } {{} * :1 :2}
656 676
657 677
658 finish_test 678 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698