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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/savepoint3.test ('k') | third_party/sqlite/src/test/savepointfault.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/savepoint7.test
diff --git a/third_party/sqlite/src/test/savepoint7.test b/third_party/sqlite/src/test/savepoint7.test
index d8a02f1f801c0159b83cad75309835723ab4fbef..59c3cd6cdca08d45b1aa2f8ef97437a4406c45c8 100644
--- a/third_party/sqlite/src/test/savepoint7.test
+++ b/third_party/sqlite/src/test/savepoint7.test
@@ -95,4 +95,38 @@ do_test savepoint7-2.2 {
list $rc $msg [db eval {SELECT * FROM t2}]
} {1 {abort due to ROLLBACK} {}}
+# Ticket: https://www.sqlite.org/src/tktview/7f7f8026eda387d544b
+# Segfault in the in-memory journal logic triggered by a tricky
+# combination of SAVEPOINT operations.
+#
+unset -nocomplain i
+for {set i 248} {$i<=253} {incr i} {
+ do_test savepoint7-3.$i {
+ db close
+ forcedelete test.db
+ sqlite3 db test.db
+ db eval {
+ PRAGMA page_size=1024;
+ PRAGMA temp_store=MEMORY;
+ BEGIN;
+ CREATE TABLE t1(x INTEGER PRIMARY KEY, y TEXT);
+ WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<$::i)
+ INSERT INTO t1(x,y) SELECT x*10, printf('%04d%.800c',x,'*') FROM c;
+ SAVEPOINT one;
+ SELECT count(*) FROM t1;
+ WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<$::i)
+ INSERT INTO t1(x,y) SELECT x*10+1, printf('%04d%.800c',x,'*') FROM c;
+ ROLLBACK TO one;
+ SELECT count(*) FROM t1;
+ SAVEPOINT twoB;
+ WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<10)
+ INSERT INTO t1(x,y) SELECT x*10+2, printf('%04d%.800c',x,'*') FROM c;
+ ROLLBACK TO twoB;
+ RELEASE one;
+ COMMIT;
+ }
+ } [list $i $i]
+}
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/savepoint3.test ('k') | third_party/sqlite/src/test/savepointfault.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698