OLD | NEW |
1 # 2008 August 01 | 1 # 2008 August 01 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 do_faultsim_test 6 -faults oom* -body { | 130 do_faultsim_test 6 -faults oom* -body { |
131 db cache flush | 131 db cache flush |
132 db eval { SELECT DISTINCT c FROM t3 WHERE b BETWEEN '.xx..' AND '.xxxx' } | 132 db eval { SELECT DISTINCT c FROM t3 WHERE b BETWEEN '.xx..' AND '.xxxx' } |
133 } -test { | 133 } -test { |
134 faultsim_test_result {0 {12 13 14 15}} | 134 faultsim_test_result {0 {12 13 14 15}} |
135 } | 135 } |
136 | 136 |
| 137 do_execsql_test 7.1 { |
| 138 CREATE TABLE x1(a INTEGER PRIMARY KEY, b); |
| 139 } |
| 140 do_faultsim_test 7.2 -faults oom* -body { |
| 141 execsql { SELECT * FROM x1 WHERE a = (SELECT 1) } |
| 142 } -test { |
| 143 faultsim_test_result [list 0 {}] |
| 144 } |
| 145 |
| 146 reset_db |
| 147 |
| 148 proc isqrt {i} { expr { int(sqrt($i)) } } |
| 149 db func isqrt isqrt |
| 150 |
| 151 do_execsql_test 8.0 { |
| 152 PRAGMA encoding = 'utf-16'; |
| 153 CREATE TABLE x2(x TEXT, y TEXT); |
| 154 WITH data(i) AS ( |
| 155 SELECT 1 UNION ALL SELECT i+1 FROM data |
| 156 ) |
| 157 INSERT INTO x2 SELECT isqrt(i), isqrt(i) FROM data LIMIT 400; |
| 158 CREATE INDEX x2x ON x2(x); |
| 159 CREATE INDEX x2y ON x2(y); |
| 160 ANALYZE; |
| 161 DELETE FROM x2; |
| 162 } |
| 163 |
| 164 proc str {a} { return $a } |
| 165 db func str -deterministic str |
| 166 |
| 167 do_faultsim_test 8 -faults oom* -body { |
| 168 execsql { SELECT * FROM x2 WHERE x = str('19') AND y = str('4') } |
| 169 } -test { |
| 170 faultsim_test_result [list 0 {}] |
| 171 } |
| 172 |
| 173 |
137 finish_test | 174 finish_test |
138 | 175 |
OLD | NEW |