mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Added support for proxy file locking style
Added pragma support for controlling proxy file locking Added file control access to last errno and proxy locking Added support for TMPDIR environment variable Extended unit tests to cover new proxy locking pragmas and file control features (CVS 5934) FossilOrigin-Name: b9bc36d3d5e35821ef69c0881a84c0afed253c9e
This commit is contained in:
@ -13,12 +13,23 @@
|
||||
# This file implements tests the ability of the library to open
|
||||
# many different databases at the same time without leaking memory.
|
||||
#
|
||||
# $Id: manydb.test,v 1.3 2006/01/11 01:08:34 drh Exp $
|
||||
# $Id: manydb.test,v 1.4 2008/11/21 00:10:35 aswift Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
set N 300
|
||||
# if we're using proxy locks, we use 5 filedescriptors for a db
|
||||
# that is open and in the middle of writing changes, normally
|
||||
# sqlite uses 3 (proxy locking adds the conch and the local lock)
|
||||
set using_proxy 0
|
||||
foreach {name value} [array get env SQLITE_FORCE_PROXY_LOCKING] {
|
||||
set using_proxy value
|
||||
}
|
||||
set num_fd_per_openwrite_db 3
|
||||
if {$using_proxy>0} {
|
||||
set num_fd_per_openwrite_db 5
|
||||
}
|
||||
|
||||
# First test how many file descriptors are available for use. To open a
|
||||
# database for writing SQLite requires 3 file descriptors (the database, the
|
||||
@ -35,7 +46,7 @@ foreach fd $filehandles {
|
||||
catch {
|
||||
file delete -force testfile.1
|
||||
}
|
||||
set N [expr $i / 3]
|
||||
set N [expr $i / $num_fd_per_openwrite_db]
|
||||
|
||||
# Create a bunch of random database names
|
||||
#
|
||||
|
Reference in New Issue
Block a user