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

Side by Side Diff: third_party/sqlite/src/test/interrupt.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 # 2004 Feb 8 1 # 2004 Feb 8
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 set sqlite_interrupt_count 1000000 159 set sqlite_interrupt_count 1000000
160 execsql $sql 160 execsql $sql
161 set max_count [expr {1000000-$sqlite_interrupt_count}] 161 set max_count [expr {1000000-$sqlite_interrupt_count}]
162 for {set i 1} {$i<$max_count-5} {incr i 1} { 162 for {set i 1} {$i<$max_count-5} {incr i 1} {
163 do_test interrupt-4.$i.1 { 163 do_test interrupt-4.$i.1 {
164 set ::sqlite_interrupt_count $::i 164 set ::sqlite_interrupt_count $::i
165 catchsql $sql 165 catchsql $sql
166 } {1 interrupted} 166 } {1 interrupted}
167 } 167 }
168 168
169 if {0} { # This doesn't work anymore since the collation factor is
170 # no longer called during schema parsing.
169 # Interrupt during parsing 171 # Interrupt during parsing
170 # 172 #
171 do_test interrupt-5.1 { 173 do_test interrupt-5.1 {
172 proc fake_interrupt {args} { 174 proc fake_interrupt {args} {
173 db collate fake_collation no-op 175 db collate fake_collation no-op
174 sqlite3_interrupt db 176 sqlite3_interrupt db
175 return SQLITE_OK 177 return SQLITE_OK
176 } 178 }
177 db collation_needed fake_interrupt 179 db collation_needed fake_interrupt
178 catchsql { 180 catchsql {
179 CREATE INDEX fake ON fake1(a COLLATE fake_collation, b, c DESC); 181 CREATE INDEX fake ON fake1(a COLLATE fake_collation, b, c DESC);
180 } 182 }
181 } {1 interrupt} 183 } {1 interrupt}
182 184 }
183 finish_test 185 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698