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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # 2008 Feb 19 1 # 2008 Feb 19
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 29 matching lines...) Expand all
40 # rtree3-4b: OOM while deleting rows from a big table. 40 # rtree3-4b: OOM while deleting rows from a big table.
41 # 41 #
42 # rtree3-5: Test OOM while inserting rows into a big table. 42 # rtree3-5: Test OOM while inserting rows into a big table.
43 # 43 #
44 # rtree3-6: Test OOM while deleting all rows of a table, one at a time. 44 # rtree3-6: Test OOM while deleting all rows of a table, one at a time.
45 # 45 #
46 # rtree3-7: OOM during an ALTER TABLE RENAME TABLE command. 46 # rtree3-7: OOM during an ALTER TABLE RENAME TABLE command.
47 # 47 #
48 # rtree3-8: Test OOM while registering the r-tree module with sqlite. 48 # rtree3-8: Test OOM while registering the r-tree module with sqlite.
49 # 49 #
50 50 # rtree3-11: OOM following a constraint failure
51 #
51 do_faultsim_test rtree3-1 -faults oom* -prep { 52 do_faultsim_test rtree3-1 -faults oom* -prep {
52 faultsim_delete_and_reopen 53 faultsim_delete_and_reopen
53 } -body { 54 } -body {
54 execsql { 55 execsql {
55 BEGIN TRANSACTION; 56 BEGIN TRANSACTION;
56 CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2); 57 CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2);
57 INSERT INTO rt VALUES(NULL, 3, 5, 7, 9); 58 INSERT INTO rt VALUES(NULL, 3, 5, 7, 9);
58 INSERT INTO rt VALUES(NULL, 13, 15, 17, 19); 59 INSERT INTO rt VALUES(NULL, 13, 15, 17, 19);
59 DELETE FROM rt WHERE ii = 1; 60 DELETE FROM rt WHERE ii = 1;
60 SELECT * FROM rt; 61 SELECT * FROM rt;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 do_faultsim_test rtree3-10 -faults oom-* -prep { 228 do_faultsim_test rtree3-10 -faults oom-* -prep {
228 faultsim_restore_and_reopen 229 faultsim_restore_and_reopen
229 register_cube_geom db 230 register_cube_geom db
230 execsql { SELECT * FROM rt } 231 execsql { SELECT * FROM rt }
231 } -body { 232 } -body {
232 execsql { SELECT ii FROM rt WHERE ii MATCH cube(4.5, 5.5, 6.5, 1, 1, 1) } 233 execsql { SELECT ii FROM rt WHERE ii MATCH cube(4.5, 5.5, 6.5, 1, 1, 1) }
233 } -test { 234 } -test {
234 faultsim_test_result {0 2} 235 faultsim_test_result {0 2}
235 } 236 }
236 237
238
239 do_test rtree3-11.prep {
240 faultsim_delete_and_reopen
241 execsql {
242 CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2);
243 INSERT INTO rt VALUES(1, 2, 3, 4, 5);
244 }
245 faultsim_save_and_close
246 } {}
247 do_faultsim_test rtree3-10.1 -faults oom-* -prep {
248 faultsim_restore_and_reopen
249 execsql { SELECT * FROM rt }
250 } -body {
251 execsql { INSERT INTO rt VALUES(1, 2, 3, 4, 5) }
252 } -test {
253 faultsim_test_result {1 {UNIQUE constraint failed: rt.ii}} \
254 {1 {constraint failed}}
255 }
256 do_faultsim_test rtree3-10.2 -faults oom-* -prep {
257 faultsim_restore_and_reopen
258 execsql { SELECT * FROM rt }
259 } -body {
260 execsql { INSERT INTO rt VALUES(2, 2, 3, 5, 4) }
261 } -test {
262 faultsim_test_result {1 {rtree constraint failed: rt.(y1<=y2)}} \
263 {1 {constraint failed}}
264 }
265
237 finish_test 266 finish_test
OLDNEW
« 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