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

Fix a couple of test script problems on this branch. Both related to the fact that temp database page sizes can no longer be changed by VACUUM or the backup API after the temp db is populated.

FossilOrigin-Name: 6bb5aa2be2a6c5ca66a98a9387b2845507a6bdd2
This commit is contained in:
dan
2016-04-27 11:24:42 +00:00
parent 45164826b7
commit 9bf0136384
4 changed files with 34 additions and 33 deletions

View File

@ -684,22 +684,24 @@ do_faultsim_test pagerfault-14a -prep {
# is not possible to change the page-size of an in-memory database. Even
# using the backup API.
#
if {$TEMP_STORE<2} {
do_faultsim_test pagerfault-14b -prep {
catch { db2 close }
faultsim_restore_and_reopen
# Update: It is no longer possible to change the page size of any temp
# database after it has been created.
#
do_faultsim_test pagerfault-14b -prep {
catch { db2 close }
faultsim_restore_and_reopen
sqlite3 db2 ""
db2 eval { PRAGMA page_size = 4096; CREATE TABLE xx(a) }
} -body {
sqlite3_backup B db2 main db main
B step 200
set rc [B finish]
if {[string match SQLITE_IOERR_* $rc]} {set rc SQLITE_IOERR}
if {$rc != "SQLITE_OK"} { error [sqlite3_test_errstr $rc] }
set {} {}
} -test {
faultsim_test_result {0 {}} {1 {sqlite3_backup_init() failed}}
}
} -body {
sqlite3_backup B db2 main db main
B step 200
set rc [B finish]
if {[string match SQLITE_IOERR_* $rc]} {set rc SQLITE_IOERR}
if {$rc != "SQLITE_OK"} { error [sqlite3_test_errstr $rc] }
set {} {}
} -test {
faultsim_test_result {1 {attempt to write a readonly database}} \
{1 {sqlite3_backup_init() failed}}
}
do_faultsim_test pagerfault-14c -prep {