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

Side by Side Diff: third_party/sqlite/src/test/trans3.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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 November 3 1 # 2008 November 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 do_test trans3-1.3 { 45 do_test trans3-1.3 {
46 set ::ecode 46 set ::ecode
47 } {} 47 } {}
48 do_test trans3-1.3.1 { 48 do_test trans3-1.3.1 {
49 sqlite3_get_autocommit db 49 sqlite3_get_autocommit db
50 } 1 50 } 1
51 do_test trans3-1.4 { 51 do_test trans3-1.4 {
52 db eval {SELECT * FROM t1} 52 db eval {SELECT * FROM t1}
53 } {1 2 3 4} 53 } {1 2 3 4}
54 do_test trans3-1.5 { 54 do_test trans3-1.5 {
55 db eval BEGIN 55 db eval {BEGIN; CREATE TABLE xyzzy(abc);}
56 db eval {INSERT INTO t1 VALUES(5);} 56 db eval {INSERT INTO t1 VALUES(5);}
57 set ::ecode {} 57 set ::ecode {}
58 set x [catch { 58 set x [catch {
59 db eval {SELECT * FROM t1} { 59 db eval {SELECT * FROM t1} {
60 if {[catch {db eval ROLLBACK} errmsg]} { 60 if {[catch {db eval ROLLBACK} errmsg]} {
61 set ::ecode [sqlite3_extended_errcode db] 61 set ::ecode [sqlite3_extended_errcode db]
62 error $errmsg 62 error $errmsg
63 } 63 }
64 } 64 }
65 } errmsg] 65 } errmsg]
66 lappend x $errmsg 66 lappend x $errmsg
67 } {1 {cannot rollback transaction - SQL statements in progress}} 67 } {1 {abort due to ROLLBACK}}
68 do_test trans3-1.6 { 68 do_test trans3-1.6 {
69 set ::ecode 69 set ::ecode
70 } {SQLITE_BUSY} 70 } {}
71 do_test trans3-1.7 { 71 do_test trans3-1.7 {
72 db eval COMMIT
73 db eval {SELECT * FROM t1} 72 db eval {SELECT * FROM t1}
74 } {1 2 3 4 5} 73 } {1 2 3 4}
75 unset -nocomplain ecode 74 unset -nocomplain ecode
76 75
77 finish_test 76 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698