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

Unified Diff: third_party/sqlite/src/test/mallocK.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/malloc5.test ('k') | third_party/sqlite/src/test/malloc_common.tcl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/mallocK.test
diff --git a/third_party/sqlite/src/test/mallocK.test b/third_party/sqlite/src/test/mallocK.test
index dcf00da9aa1db9b200bd33c543a11234b7d60c9a..65791e79eae5cf0755bad91cc72d3289d1397c1a 100644
--- a/third_party/sqlite/src/test/mallocK.test
+++ b/third_party/sqlite/src/test/mallocK.test
@@ -134,5 +134,42 @@ do_faultsim_test 6 -faults oom* -body {
faultsim_test_result {0 {12 13 14 15}}
}
+do_execsql_test 7.1 {
+ CREATE TABLE x1(a INTEGER PRIMARY KEY, b);
+}
+do_faultsim_test 7.2 -faults oom* -body {
+ execsql { SELECT * FROM x1 WHERE a = (SELECT 1) }
+} -test {
+ faultsim_test_result [list 0 {}]
+}
+
+reset_db
+
+proc isqrt {i} { expr { int(sqrt($i)) } }
+db func isqrt isqrt
+
+do_execsql_test 8.0 {
+ PRAGMA encoding = 'utf-16';
+ CREATE TABLE x2(x TEXT, y TEXT);
+ WITH data(i) AS (
+ SELECT 1 UNION ALL SELECT i+1 FROM data
+ )
+ INSERT INTO x2 SELECT isqrt(i), isqrt(i) FROM data LIMIT 400;
+ CREATE INDEX x2x ON x2(x);
+ CREATE INDEX x2y ON x2(y);
+ ANALYZE;
+ DELETE FROM x2;
+}
+
+proc str {a} { return $a }
+db func str -deterministic str
+
+do_faultsim_test 8 -faults oom* -body {
+ execsql { SELECT * FROM x2 WHERE x = str('19') AND y = str('4') }
+} -test {
+ faultsim_test_result [list 0 {}]
+}
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/malloc5.test ('k') | third_party/sqlite/src/test/malloc_common.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698