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

Side by Side Diff: third_party/sqlite/src/test/conflict.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
« no previous file with comments | « third_party/sqlite/src/test/collateB.test ('k') | third_party/sqlite/src/test/conflict2.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2002 January 29 1 # 2002 January 29
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 # 278 #
279 # i The reference number of the test 279 # i The reference number of the test
280 # conf1 The conflict resolution algorithm on the UNIQUE constraint 280 # conf1 The conflict resolution algorithm on the UNIQUE constraint
281 # cmd An UPDATE command to execute against table t1 281 # cmd An UPDATE command to execute against table t1
282 # t0 True if there is an error from $cmd 282 # t0 True if there is an error from $cmd
283 # t1 Content of "b" column of t1 assuming no error in $cmd 283 # t1 Content of "b" column of t1 assuming no error in $cmd
284 # t2 Content of "x" column of t3 284 # t2 Content of "x" column of t3
285 # t3 Number of temporary files for tables 285 # t3 Number of temporary files for tables
286 # t4 Number of temporary files for statement journals 286 # t4 Number of temporary files for statement journals
287 # 287 #
288 # Update: Since temporary table files are now opened lazily, and none 288 # Update (2007-08-21): Since temporary table files are now opened lazily,
289 # of the following tests use large quantities of data, t3 is always 0. 289 # and none of the following tests use large quantities of data, t3 is always 0.
290 #
291 # Update (2016-03-04): Subjournals now also open lazily, so t4 is also always 0.
290 # 292 #
291 foreach {i conf1 cmd t0 t1 t2 t3 t4} { 293 foreach {i conf1 cmd t0 t1 t2 t3 t4} {
292 1 {} UPDATE 1 {6 7 8 9} 1 0 1 294 1 {} UPDATE 1 {6 7 8 9} 1 0 0
293 2 REPLACE UPDATE 0 {7 6 9} 1 0 0 295 2 REPLACE UPDATE 0 {7 6 9} 1 0 0
294 3 IGNORE UPDATE 0 {6 7 3 9} 1 0 0 296 3 IGNORE UPDATE 0 {6 7 3 9} 1 0 0
295 4 FAIL UPDATE 1 {6 7 3 4} 1 0 0 297 4 FAIL UPDATE 1 {6 7 3 4} 1 0 0
296 5 ABORT UPDATE 1 {1 2 3 4} 1 0 1 298 5 ABORT UPDATE 1 {1 2 3 4} 1 0 0
297 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 0 299 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 0
298 7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 300 7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
299 8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0 301 8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0
300 9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 302 9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
301 10 ABORT {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0 303 10 ABORT {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0
302 11 ROLLBACK {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 304 11 ROLLBACK {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
303 12 {} {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 305 12 {} {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0
304 13 {} {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0 306 13 {} {UPDATE OR REPLACE} 0 {7 6 9} 1 0 0
305 14 {} {UPDATE OR FAIL} 1 {6 7 3 4} 1 0 0 307 14 {} {UPDATE OR FAIL} 1 {6 7 3 4} 1 0 0
306 15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1 308 15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 0
307 16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0 309 16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
308 } { 310 } {
309 if {$t0} {set t1 {UNIQUE constraint failed: t1.a}} 311 if {$t0} {set t1 {UNIQUE constraint failed: t1.a}}
310 if {[info exists TEMP_STORE] && $TEMP_STORE==3} { 312 if {[info exists TEMP_STORE] && $TEMP_STORE==3} {
311 set t3 0 313 set t3 0
312 } else { 314 } else {
313 set t3 [expr {$t3+$t4}] 315 set t3 [expr {$t3+$t4}]
314 } 316 }
315 do_test conflict-6.$i { 317 do_test conflict-6.$i {
316 db close 318 db close
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 do_test conflict-13.2 { 819 do_test conflict-13.2 {
818 execsql { 820 execsql {
819 REPLACE INTO t13 VALUES(3); 821 REPLACE INTO t13 VALUES(3);
820 COMMIT; 822 COMMIT;
821 SELECT * FROM t13; 823 SELECT * FROM t13;
822 } 824 }
823 } {1 3} 825 } {1 3}
824 826
825 827
826 finish_test 828 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/collateB.test ('k') | third_party/sqlite/src/test/conflict2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698