| OLD | NEW |
| 1 # 2003 December 18 | 1 # 2003 December 18 |
| 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 #*********************************************************************** |
| 11 # This file implements regression tests for SQLite library. The | 11 # This file implements regression tests for SQLite library. The |
| 12 # focus of this script is multithreading behavior | 12 # focus of this script is multithreading behavior |
| 13 # | 13 # |
| 14 # $Id: thread1.test,v 1.8 2008/10/07 15:25:49 drh Exp $ | 14 # $Id: thread1.test,v 1.8 2008/10/07 15:25:49 drh Exp $ |
| 15 | 15 |
| 16 | 16 |
| 17 set testdir [file dirname $argv0] | 17 set testdir [file dirname $argv0] |
| 18 source $testdir/tester.tcl | 18 source $testdir/tester.tcl |
| 19 | 19 |
| 20 # Skip this whole file if the thread testing code is not enabled | 20 # Skip this whole file if the thread testing code is not enabled |
| 21 # | 21 # |
| 22 ifcapable !mutex { | 22 if {[run_thread_tests]==0} { finish_test ; return } |
| 23 finish_test | |
| 24 return | |
| 25 } | |
| 26 if {[llength [info command thread_step]]==0 || [sqlite3 -has-codec]} { | 23 if {[llength [info command thread_step]]==0 || [sqlite3 -has-codec]} { |
| 27 finish_test | 24 finish_test |
| 28 return | 25 return |
| 29 } | 26 } |
| 30 | 27 |
| 31 # Create some data to work with | 28 # Create some data to work with |
| 32 # | 29 # |
| 33 do_test thread1-1.1 { | 30 do_test thread1-1.1 { |
| 34 execsql { | 31 execsql { |
| 35 CREATE TABLE t1(a,b); | 32 CREATE TABLE t1(a,b); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 do_test thread1-2.10 { | 164 do_test thread1-2.10 { |
| 168 thread_finalize C | 165 thread_finalize C |
| 169 thread_result C | 166 thread_result C |
| 170 } SQLITE_OK | 167 } SQLITE_OK |
| 171 do_test thread1-2.11 { | 168 do_test thread1-2.11 { |
| 172 execsql {SELECT * FROM t2} | 169 execsql {SELECT * FROM t2} |
| 173 } {98 99} | 170 } {98 99} |
| 174 | 171 |
| 175 thread_halt * | 172 thread_halt * |
| 176 finish_test | 173 finish_test |
| OLD | NEW |