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 |