1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Repurpose the SQLITE_TESTCTRL_FAULT_INSTALL test-control to register a

callback to be invoked by sqlite3FaultSim().  That test-control has been
unused since 2008-06-20 and was never used in any official release.

FossilOrigin-Name: 0d43a7ad9abe821e33e0bf83a997aa4461b1e3f2
This commit is contained in:
drh
2014-05-16 14:17:01 +00:00
parent a5e2b50d0a
commit c007f61bb0
8 changed files with 171 additions and 20 deletions

View File

@ -604,5 +604,21 @@ do_execsql_test misc1-19.2 {
SELECT * FROM t19b;
} {4 5 6}
# 2014-05-16: Tests for the SQLITE_TESTCTRL_FAULT_INSTALL feature.
#
unset -nocomplain fault_callbacks
set fault_callbacks {}
proc fault_callback {n} {
lappend ::fault_callbacks $n
return 0
}
do_test misc1-19.1 {
sqlite3_test_control_fault_install fault_callback
set fault_callbacks
} {0}
do_test misc1-19.2 {
sqlite3_test_control_fault_install
set fault_callbacks
} {0}
finish_test