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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/fts3atoken.test ('k') | third_party/sqlite/src/test/fts3d.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/fts3conf.test
diff --git a/third_party/sqlite/src/test/fts3conf.test b/third_party/sqlite/src/test/fts3conf.test
index e91efbefbef9d5646b18c2b897646b386dd74112..e157c239efa0887b0bc0280057e7f93f464d556e 100644
--- a/third_party/sqlite/src/test/fts3conf.test
+++ b/third_party/sqlite/src/test/fts3conf.test
@@ -86,11 +86,11 @@ foreach {tn sql uses constraint data} [subst {
9 "INSERT OR IGNORE $T2" 1 0 {{a b c d} {e f g h} {i j k l} z}
10 "INSERT OR REPLACE $T2" 1 0 {{a b c d} y {i j k l} z}
- 11 "UPDATE OR ROLLBACK $T3" 1 1 {{a b c d} {e f g h}}
- 12 "UPDATE OR ABORT $T3" 1 1 {{a b c d} {e f g h} {i j k l}}
- 13 "UPDATE OR FAIL $T3" 1 1 {{a b c d} {e f g h} {i j k l}}
- 14 "UPDATE OR IGNORE $T3" 1 0 {{a b c d} {e f g h} {i j k l}}
- 15 "UPDATE OR REPLACE $T3" 1 0 {{a b c d} {i j k l}}
+ 11 "UPDATE OR ROLLBACK $T3" 0 1 {{a b c d} {e f g h}}
+ 12 "UPDATE OR ABORT $T3" 0 1 {{a b c d} {e f g h} {i j k l}}
+ 13 "UPDATE OR FAIL $T3" 0 1 {{a b c d} {e f g h} {i j k l}}
+ 14 "UPDATE OR IGNORE $T3" 0 0 {{a b c d} {e f g h} {i j k l}}
+ 15 "UPDATE OR REPLACE $T3" 0 0 {{a b c d} {i j k l}}
16 "UPDATE OR ROLLBACK $T4" 1 1 {{a b c d} {e f g h}}
17 "UPDATE OR ABORT $T4" 1 1 {{a b c d} {e f g h} {i j k l}}
@@ -178,4 +178,38 @@ do_execsql_test 3.8 {
SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
} {X'0200000002000000'}
+#-------------------------------------------------------------------------
+# Test that the xSavepoint is invoked correctly if the first write
+# operation within a transaction is to a virtual table.
+#
+do_catchsql_test 4.1.1 {
+ CREATE VIRTUAL TABLE t0 USING fts4;
+ BEGIN;
+ INSERT INTO t0(rowid, content) SELECT
+ 1, 'abc' UNION ALL SELECT
+ 2, 'def' UNION ALL SELECT
+ 1, 'ghi';
+} {1 {constraint failed}}
+do_execsql_test 4.1.2 {
+ COMMIT;
+}
+do_execsql_test 4.1.3 {
+ SELECT * FROM t0 WHERE t0 MATCH 'abc';
+ INSERT INTO t0(t0) VALUES('integrity-check');
+} {}
+
+do_execsql_test 4.2.1 {
+ CREATE VIRTUAL TABLE t01 USING fts4;
+ BEGIN;
+ SAVEPOINT abc;
+ INSERT INTO t01 VALUES('a b c');
+ ROLLBACK TO abc;
+ COMMIT;
+}
+do_execsql_test 4.2.2 {
+ SELECT * FROM t01 WHERE t01 MATCH 'b';
+ INSERT INTO t01(t01) VALUES('integrity-check');
+} {}
+
finish_test
+
« no previous file with comments | « third_party/sqlite/src/test/fts3atoken.test ('k') | third_party/sqlite/src/test/fts3d.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698