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

Unified Diff: third_party/sqlite/src/ext/rtree/rtree3.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/ext/rtree/rtree1.test ('k') | third_party/sqlite/src/ext/rtree/rtreeA.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/rtree/rtree3.test
diff --git a/third_party/sqlite/src/ext/rtree/rtree3.test b/third_party/sqlite/src/ext/rtree/rtree3.test
index fea5513069bb1fddcd10021e44da80d7be52e6c4..1d863c6cc2c477e75a130b0ac61fa2bf8423fb13 100644
--- a/third_party/sqlite/src/ext/rtree/rtree3.test
+++ b/third_party/sqlite/src/ext/rtree/rtree3.test
@@ -47,7 +47,8 @@ ifcapable !rtree {
#
# rtree3-8: Test OOM while registering the r-tree module with sqlite.
#
-
+# rtree3-11: OOM following a constraint failure
+#
do_faultsim_test rtree3-1 -faults oom* -prep {
faultsim_delete_and_reopen
} -body {
@@ -234,4 +235,32 @@ do_faultsim_test rtree3-10 -faults oom-* -prep {
faultsim_test_result {0 2}
}
+
+do_test rtree3-11.prep {
+ faultsim_delete_and_reopen
+ execsql {
+ CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2);
+ INSERT INTO rt VALUES(1, 2, 3, 4, 5);
+ }
+ faultsim_save_and_close
+} {}
+do_faultsim_test rtree3-10.1 -faults oom-* -prep {
+ faultsim_restore_and_reopen
+ execsql { SELECT * FROM rt }
+} -body {
+ execsql { INSERT INTO rt VALUES(1, 2, 3, 4, 5) }
+} -test {
+ faultsim_test_result {1 {UNIQUE constraint failed: rt.ii}} \
+ {1 {constraint failed}}
+}
+do_faultsim_test rtree3-10.2 -faults oom-* -prep {
+ faultsim_restore_and_reopen
+ execsql { SELECT * FROM rt }
+} -body {
+ execsql { INSERT INTO rt VALUES(2, 2, 3, 5, 4) }
+} -test {
+ faultsim_test_result {1 {rtree constraint failed: rt.(y1<=y2)}} \
+ {1 {constraint failed}}
+}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/ext/rtree/rtree1.test ('k') | third_party/sqlite/src/ext/rtree/rtreeA.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698