mirror of
https://github.com/sqlite/sqlite.git
synced 2024-11-22 12:17:40 +01:00
Add new test file recoverclobber.test.
FossilOrigin-Name: cb4e950c472bd24a79a8505a7f8e4c3a0f7821648297d05cc760738b777d5149
This commit is contained in:
parent
abb28667f1
commit
4a08e793c6
58
ext/recover/recoverclobber.test
Normal file
58
ext/recover/recoverclobber.test
Normal file
@ -0,0 +1,58 @@
|
||||
# 2019 April 23
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# Tests for the SQLITE_RECOVER_ROWIDS option.
|
||||
#
|
||||
|
||||
if {![info exists testdir]} {
|
||||
set testdir [file join [file dirname [info script]] .. .. test]
|
||||
}
|
||||
source [file join [file dirname [info script]] recover_common.tcl]
|
||||
source $testdir/tester.tcl
|
||||
set testprefix recoverclobber
|
||||
|
||||
ifcapable !vtab {
|
||||
finish_test; return
|
||||
}
|
||||
|
||||
proc recover {db output} {
|
||||
set R [sqlite3_recover_init db main test.db2]
|
||||
$R step
|
||||
$R finish
|
||||
}
|
||||
|
||||
forcedelete test.db2
|
||||
do_execsql_test 1.0 {
|
||||
ATTACH 'test.db2' AS aux;
|
||||
CREATE TABLE aux.x1(x, one);
|
||||
INSERT INTO x1 VALUES(1, 'one'), (2, 'two'), (3, 'three');
|
||||
|
||||
CREATE TABLE t1(a, b);
|
||||
INSERT INTO t1 VALUES(1, 1), (2, 2), (3, 3), (4, 4);
|
||||
|
||||
DETACH aux;
|
||||
}
|
||||
|
||||
breakpoint
|
||||
do_test 1.1 {
|
||||
recover db test.db2
|
||||
} {}
|
||||
|
||||
do_execsql_test 1.2 {
|
||||
ATTACH 'test.db2' AS aux;
|
||||
SELECT * FROM aux.t1;
|
||||
} {1 1 2 2 3 3 4 4}
|
||||
|
||||
do_catchsql_test 1.3 {
|
||||
SELECT * FROM aux.x1;
|
||||
} {1 {no such table: aux.x1}}
|
||||
|
||||
finish_test
|
11
manifest
11
manifest
@ -1,5 +1,5 @@
|
||||
C Ensure\sthat\sthe\srecover\sextension\sproperly\sescapes\sCR\sand\sNL\scharacters\sin\stext\smode.\sAlso\sthat\sit\sholds\stransactions\sopen\son\sboth\sinput\sand\soutput\sdatabases\sfor\sthe\sduration\sof\sa\srecovery\soperation.
|
||||
D 2022-09-07T16:41:33.248
|
||||
C Add\snew\stest\sfile\srecoverclobber.test.
|
||||
D 2022-09-08T11:04:23.161
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -389,6 +389,7 @@ F ext/rbu/sqlite3rbu.h 1dc88ab7bd32d0f15890ea08d23476c4198d3da3056985403991f8c9c
|
||||
F ext/rbu/test_rbu.c 03f6f177096a5f822d68d8e4069ad8907fe572c62ff2d19b141f59742821828a
|
||||
F ext/recover/recover1.test ae8ce9828210aa6c466bf88e23b0933849d5bb43091abe48cf2e56d636e51e93
|
||||
F ext/recover/recover_common.tcl 6679af7dffc858e345053a91c9b0a897595b4a13007aceffafca75304ccb137c
|
||||
F ext/recover/recoverclobber.test e6537ebf99f57bfff6cca59550b5f4278319b57a89865abb98d755a8fd561d84
|
||||
F ext/recover/recoverold.test f368a6ae2db12b6017257b332a19ab5df527f4061e43f12f5c85d8e2b236f074
|
||||
F ext/recover/recoverrowid.test ec4436cd69e6cdacb48dd2963ff6dd9dbd5fe648376de5e7c0c2f4f6cbacb417
|
||||
F ext/recover/sqlite3recover.c 9724f913fd457f655e2873552bc6600a6aaff7104b9113ccb38fea18b6a71f03
|
||||
@ -2006,8 +2007,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 1d5000f5718004110776ff58284d824854a93fe1cd1f6d8a4e8b8b0c2b2c3076
|
||||
R 3bf4abb672d881722cf6509f544c5091
|
||||
P 6cca8913e703635ad89415a60fc84000ac188d9df43f45594b8ad87facb91d54
|
||||
R 102ea2ce4694a6be6ee34f8e72c4fbd9
|
||||
U dan
|
||||
Z c71f206aa1a37ae4579417497726bb42
|
||||
Z e86817dfd35f39cea8c450fbde6bc553
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
6cca8913e703635ad89415a60fc84000ac188d9df43f45594b8ad87facb91d54
|
||||
cb4e950c472bd24a79a8505a7f8e4c3a0f7821648297d05cc760738b777d5149
|
Loading…
Reference in New Issue
Block a user