mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Added the SQLITE_FCNTL_WIN32_AV_RETRY file control for configuring the
retry counts and delays in the windows VFS. FossilOrigin-Name: 7aaf0a6ae1238129e07eb191ca3f043df445e27a
This commit is contained in:
@ -67,6 +67,40 @@ while {1} {
|
||||
}
|
||||
set ::log {}
|
||||
}
|
||||
|
||||
do_test win32lock-2.0 {
|
||||
file_control_win32_av_retry db -1 -1
|
||||
} {0 10 25}
|
||||
do_test win32lock-2.1 {
|
||||
file_control_win32_av_retry db 1 1
|
||||
} {0 1 1}
|
||||
|
||||
set delay1 50
|
||||
while {1} {
|
||||
sqlite3_sleep 10
|
||||
lock_win32_file test.db 0 $::delay1
|
||||
set rc [catch {db eval {SELECT x, length(y) FROM t1 ORDER BY rowid}} msg]
|
||||
if {$rc} {
|
||||
do_test win32lock-2.2-$delay1-fin {
|
||||
set ::msg
|
||||
} {disk I/O error}
|
||||
break
|
||||
} else {
|
||||
do_test win32lock-2.2-$delay1 {
|
||||
set ::msg
|
||||
} {1 100000 2 50000 3 25000 4 12500}
|
||||
if {$::log!=""} {
|
||||
do_test win32lock-2.2-$delay1-log1 {
|
||||
regsub {\d+} $::log # x
|
||||
set x
|
||||
} {{delayed #ms for lock/sharing conflict}}
|
||||
}
|
||||
incr delay1 50
|
||||
}
|
||||
set ::log {}
|
||||
}
|
||||
|
||||
file_control_win32_av_retry db 10 25
|
||||
sqlite3_test_control_pending_byte $old_pending_byte
|
||||
sqlite3_shutdown
|
||||
test_sqlite3_log
|
||||
|
Reference in New Issue
Block a user