Check the value of the schema cookie before reading the sqlite_master table. (CVS 1585)
FossilOrigin-Name: 80c299f8839d920c61854f575498340b28db98d7
This commit is contained in:
+13
-7
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script is multithreading behavior
|
||||
#
|
||||
# $Id: thread1.test,v 1.5 2004/06/10 05:59:25 danielk1977 Exp $
|
||||
# $Id: thread1.test,v 1.6 2004/06/14 08:26:37 danielk1977 Exp $
|
||||
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@@ -96,14 +96,20 @@ do_test thread1-1.12 {
|
||||
} {t1 t2}
|
||||
|
||||
|
||||
# Under this scenario:
|
||||
#
|
||||
# read-lock A
|
||||
# read-lock B
|
||||
# unlock A
|
||||
# write-lock C
|
||||
# The following tests - thread1-2.* - test the following scenario:
|
||||
#
|
||||
# Make sure the write-lock fails with SQLITE_BUSY
|
||||
# 1: Read-lock thread A
|
||||
# 2: Read-lock thread B
|
||||
# 3: Attempt to write in thread C -> SQLITE_BUSY
|
||||
# 4: Check db write failed from main thread.
|
||||
# 5: Unlock from thread A.
|
||||
# 6: Attempt to write in thread C -> SQLITE_BUSY
|
||||
# 7: Check db write failed from main thread.
|
||||
# 8: Unlock from thread B.
|
||||
# 9: Attempt to write in thread C -> SQLITE_DONE
|
||||
# 10: Finalize the write from thread C
|
||||
# 11: Check db write succeeded from main thread.
|
||||
#
|
||||
do_test thread1-2.1 {
|
||||
thread_halt *
|
||||
|
||||
Reference in New Issue
Block a user