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

Unified Diff: third_party/sqlite/src/test/trigger9.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/trigger4.test ('k') | third_party/sqlite/src/test/triggerA.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/trigger9.test
diff --git a/third_party/sqlite/src/test/trigger9.test b/third_party/sqlite/src/test/trigger9.test
index f56c8acbc58edf08a1b49f5c8f9259a8354907c2..326fa63d4c6b0b557f88ef3b322a20d7f2a5bf85 100644
--- a/third_party/sqlite/src/test/trigger9.test
+++ b/third_party/sqlite/src/test/trigger9.test
@@ -32,6 +32,7 @@ ifcapable {!trigger} {
finish_test
return
}
+set ::testprefix trigger9
proc has_rowdata {sql} {
expr {[lsearch [execsql "explain $sql"] RowData]>=0}
@@ -220,4 +221,36 @@ ifcapable compound {
} {2}
}
+reset_db
+do_execsql_test 4.1 {
+ CREATE TABLE t1(a, b);
+ CREATE TABLE log(x);
+ INSERT INTO t1 VALUES(1, 2);
+ INSERT INTO t1 VALUES(3, 4);
+ CREATE VIEW v1 AS SELECT a, b FROM t1;
+
+ CREATE TRIGGER tr1 INSTEAD OF DELETE ON v1 BEGIN
+ INSERT INTO log VALUES('delete');
+ END;
+
+ CREATE TRIGGER tr2 INSTEAD OF UPDATE ON v1 BEGIN
+ INSERT INTO log VALUES('update');
+ END;
+
+ CREATE TRIGGER tr3 INSTEAD OF INSERT ON v1 BEGIN
+ INSERT INTO log VALUES('insert');
+ END;
+}
+
+do_execsql_test 4.2 {
+ DELETE FROM v1 WHERE rowid=1;
+} {}
+
+do_execsql_test 4.3 {
+ UPDATE v1 SET a=b WHERE rowid=2;
+} {}
+
+
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/trigger4.test ('k') | third_party/sqlite/src/test/triggerA.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698