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/sqlite-src-3100200/ext/rbu/rbufault2.test

Issue 1610543003: [sql] Import reference version of SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
(Empty)
1 # 2014 October 22
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 #
12
13 if {![info exists testdir]} {
14 set testdir [file join [file dirname [info script]] .. .. test]
15 }
16 source $testdir/tester.tcl
17 source $testdir/malloc_common.tcl
18 set ::testprefix rbufault2
19
20 forcedelete rbu.db
21 do_execsql_test 1.0 {
22 CREATE TABLE target(x UNIQUE, y, z, PRIMARY KEY(y));
23 INSERT INTO target VALUES(1, 2, 3);
24 INSERT INTO target VALUES(4, 5, 6);
25
26 ATTACH 'rbu.db' AS rbu;
27 CREATE TABLE rbu.data_target(x, y, z, rbu_control);
28 INSERT INTO data_target VALUES(7, 8, 9, 0);
29 INSERT INTO data_target VALUES(1, 11, 12, 0);
30 DETACH rbu;
31 }
32 db close
33
34 forcecopy test.db test.db-bak
35 forcecopy rbu.db rbu.db-bak
36
37 do_faultsim_test 1 -faults oom* -prep {
38 forcecopy test.db-bak test.db
39 forcecopy rbu.db-bak rbu.db
40 forcedelete test.db-oal test.db-wal rbu.db-journal
41 sqlite3rbu rbu test.db rbu.db
42 } -body {
43 while {[rbu step]=="SQLITE_OK"} { }
44 rbu close
45 } -test {
46 faultsim_test_result \
47 {1 {SQLITE_CONSTRAINT - UNIQUE constraint failed: target.x}} \
48 {1 SQLITE_CONSTRAINT} \
49 {1 SQLITE_NOMEM} \
50 {1 {SQLITE_NOMEM - unable to open a temporary database file for storing te mporary tables}} \
51 {1 {SQLITE_NOMEM - out of memory}}
52 }
53
54
55
56
57 finish_test
58
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3100200/ext/rbu/rbufault.test ('k') | third_party/sqlite/sqlite-src-3100200/ext/rbu/rbufts.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698