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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/trigger7.test ('k') | third_party/sqlite/src/test/triggerC.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2008 February 12 1 # 2008 February 12
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 db eval { 70 db eval {
71 CREATE VIEW v4 AS 71 CREATE VIEW v4 AS
72 SELECT CAST(x AS TEXT) AS c1 FROM t1 72 SELECT CAST(x AS TEXT) AS c1 FROM t1
73 UNION SELECT y FROM t1 WHERE x BETWEEN 3 and 5; 73 UNION SELECT y FROM t1 WHERE x BETWEEN 3 and 5;
74 SELECT * FROM v4 ORDER BY 1; 74 SELECT * FROM v4 ORDER BY 1;
75 } 75 }
76 } {1 10 2 3 4 5 6 7 8 9 five four three} 76 } {1 10 2 3 4 5 6 7 8 9 five four three}
77 do_test triggerA-1.6 { 77 do_test triggerA-1.6 {
78 db eval { 78 db eval {
79 CREATE VIEW v5 AS SELECT x, b FROM t1, t2 WHERE y=c; 79 CREATE VIEW v5 AS SELECT x, b FROM t1, t2 WHERE y=c;
80 SELECT * FROM v5; 80 SELECT * FROM v5 ORDER BY x DESC;
81 } 81 }
82 } {10 1003 9 904 8 805 7 705 6 603 5 504 4 404 3 305 2 203 1 103} 82 } {10 1003 9 904 8 805 7 705 6 603 5 504 4 404 3 305 2 203 1 103}
83 83
84 # Create INSTEAD OF triggers on the views. Run UPDATE and DELETE statements 84 # Create INSTEAD OF triggers on the views. Run UPDATE and DELETE statements
85 # using those triggers. Verify correct operation. 85 # using those triggers. Verify correct operation.
86 # 86 #
87 do_test triggerA-2.1 { 87 do_test triggerA-2.1 {
88 db eval { 88 db eval {
89 CREATE TABLE result2(a,b); 89 CREATE TABLE result2(a,b);
90 CREATE TRIGGER r1d INSTEAD OF DELETE ON v1 BEGIN 90 CREATE TRIGGER r1d INSTEAD OF DELETE ON v1 BEGIN
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } -sqlbody { 221 } -sqlbody {
222 DELETE FROM v5 WHERE x=5; 222 DELETE FROM v5 WHERE x=5;
223 UPDATE v5 SET b=b+9900000 WHERE x BETWEEN 3 AND 5; 223 UPDATE v5 SET b=b+9900000 WHERE x BETWEEN 3 AND 5;
224 } 224 }
225 225
226 # Clean up the saved database copy. 226 # Clean up the saved database copy.
227 # 227 #
228 file delete -force test.db-triggerA 228 file delete -force test.db-triggerA
229 229
230 finish_test 230 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/trigger7.test ('k') | third_party/sqlite/src/test/triggerC.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698