OLD | NEW |
1 # 2015 September 3 | 1 # 2015 September 3 |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 # | 92 # |
93 reset_db | 93 reset_db |
94 do_execsql_test 2.0 { | 94 do_execsql_test 2.0 { |
95 CREATE VIRTUAL TABLE xy USING fts5(x); | 95 CREATE VIRTUAL TABLE xy USING fts5(x); |
96 INSERT INTO xy(rowid, x) VALUES(1, '1 2 3'); | 96 INSERT INTO xy(rowid, x) VALUES(1, '1 2 3'); |
97 INSERT INTO xy(rowid, x) VALUES(2, '2 3 4'); | 97 INSERT INTO xy(rowid, x) VALUES(2, '2 3 4'); |
98 INSERT INTO xy(rowid, x) VALUES(3, '3 4 5'); | 98 INSERT INTO xy(rowid, x) VALUES(3, '3 4 5'); |
99 } | 99 } |
100 faultsim_save_and_close | 100 faultsim_save_and_close |
101 | 101 |
102 do_faultsim_test 2 -faults oom-* -prep { | 102 do_faultsim_test 2.1 -faults oom-* -prep { |
103 faultsim_restore_and_reopen | 103 faultsim_restore_and_reopen |
104 } -body { | 104 } -body { |
105 db eval { UPDATE OR REPLACE xy SET rowid=3 WHERE rowid = 2 } | 105 db eval { UPDATE OR REPLACE xy SET rowid=3 WHERE rowid = 2 } |
106 } -test { | 106 } -test { |
107 faultsim_test_result {0 {}} | 107 faultsim_test_result {0 {}} |
108 } | 108 } |
109 | 109 |
| 110 # Test fault-injection when an empty expression is parsed. |
| 111 # |
| 112 do_faultsim_test 2.2 -faults oom-* -body { |
| 113 db eval { SELECT * FROM xy('""') } |
| 114 } -test { |
| 115 faultsim_test_result {0 {}} |
| 116 } |
110 | 117 |
111 finish_test | 118 finish_test |
112 | 119 |
OLD | NEW |