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

Side by Side Diff: third_party/sqlite/src/test/tkt2854.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 # 2007 December 20 1 # 2007 December 20
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 execsql { COMMIT } db 121 execsql { COMMIT } db
122 } {} 122 } {}
123 do_test tkt2854-1.18 { 123 do_test tkt2854-1.18 {
124 execsql { SELECT * FROM abc } db2 124 execsql { SELECT * FROM abc } db2
125 } {} 125 } {}
126 126
127 # Check that if an attempt to obtain an exclusive lock fails because an 127 # Check that if an attempt to obtain an exclusive lock fails because an
128 # attached db cannot be locked, the internal exclusive flag used by 128 # attached db cannot be locked, the internal exclusive flag used by
129 # shared-cache users is correctly cleared. 129 # shared-cache users is correctly cleared.
130 do_test tkt2854-1.19 { 130 do_test tkt2854-1.19 {
131 file delete -force test2.db test2.db-journal 131 forcedelete test2.db test2.db-journal
132 sqlite3 db4 test2.db 132 sqlite3 db4 test2.db
133 execsql { CREATE TABLE def(d, e, f) } db4 133 execsql { CREATE TABLE def(d, e, f) } db4
134 execsql { ATTACH 'test2.db' AS aux } db 134 execsql { ATTACH 'test2.db' AS aux } db
135 } {} 135 } {}
136 do_test tkt2854-1.20 { 136 do_test tkt2854-1.20 {
137 execsql {BEGIN IMMEDIATE} db4 137 execsql {BEGIN IMMEDIATE} db4
138 catchsql {BEGIN EXCLUSIVE} db 138 catchsql {BEGIN EXCLUSIVE} db
139 } {1 {database table is locked}} 139 } {1 {database table is locked}}
140 do_test tkt2854-1.21 { 140 do_test tkt2854-1.21 {
141 execsql {SELECT * FROM abc} db2 141 execsql {SELECT * FROM abc} db2
142 } {} 142 } {}
143 143
144 db close 144 db close
145 db2 close 145 db2 close
146 db3 close 146 db3 close
147 db4 close 147 db4 close
148 sqlite3_enable_shared_cache $::enable_shared_cache 148 sqlite3_enable_shared_cache $::enable_shared_cache
149 finish_test 149 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698