Add tests for recovering data to a lost-and-found table from a utf-16 db. No code changes.
FossilOrigin-Name: 832f6e9f797eecb9a3dae4e7e20c70eda1e91372e9d3ce4223d57f26582cdbd2
This commit is contained in:
parent
28f32bedd1
commit
6d841fdc89
@ -329,5 +329,37 @@ do_test 17.2 {
|
||||
list [catch { $R finish } msg] $msg
|
||||
} {0 {}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
foreach enc {utf8 utf16 utf16le utf16be} {
|
||||
reset_db
|
||||
do_execsql_test 18.$enc.1 {
|
||||
PRAGMA encoding='utf16';
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE TABLE t2(a, b);
|
||||
INSERT INTO t1 VALUES('abc', 'def');
|
||||
PRAGMA writable_schema = 1;
|
||||
DELETE FROM sqlite_schema WHERE name='t1';
|
||||
}
|
||||
|
||||
proc my_sql_hook {sql} {
|
||||
if {[string match "INSERT INTO lostandfound*" $sql]} {
|
||||
lappend ::script $sql
|
||||
}
|
||||
return 0
|
||||
}
|
||||
do_test 18.$enc.2 {
|
||||
set ::script [list]
|
||||
set R [sqlite3_recover_init_sql db main my_sql_hook]
|
||||
$R config lostandfound lostandfound
|
||||
$R run
|
||||
$R finish
|
||||
set ::script
|
||||
} {{INSERT INTO lostandfound VALUES(2, 2, 2, 1, 'abc', 'def')}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C It\sturns\sout\sthat\spagerExclusiveLock()\scan\sbe\scalled\swith\sthe\slock\sstate\nalready\sset\sto\sRESERVED\sif\sthe\sSQLITE_FCNTL_PERSIST_WAL\ssetting\sis\sset\sand\na\sspecific\ssequence\sof\smultiple\sjournal\smode\schanges\soccur.\nEnhance\spagerExclusiveLock()\sto\sdeal\swith\sthis.\n[forum:/forumpost/8130545bc6|Forum\spost\s8130545bc6]
|
||||
D 2023-05-07T03:23:32.841
|
||||
C Add\stests\sfor\srecovering\sdata\sto\sa\slost-and-found\stable\sfrom\sa\sutf-16\sdb.\sNo\scode\schanges.
|
||||
D 2023-05-08T10:51:35.367
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -375,7 +375,7 @@ F ext/rbu/sqlite3rbu.c 71a7f0dea3a846ff7c2499dc34a2528f5ddcbe23e2c54dc3cd1fa4d93
|
||||
F ext/rbu/sqlite3rbu.h 9d923eb135c5d04aa6afd7c39ca47b0d1d0707c100e02f19fdde6a494e414304
|
||||
F ext/rbu/test_rbu.c ee6ede75147bc081fe9bc3931e6b206277418d14d3fbceea6fdc6216d9b47055
|
||||
F ext/recover/dbdata.c 31d580785cf14eb3c20ed6fbb421a10a66569858f837928e6b326088c38d4c72
|
||||
F ext/recover/recover1.test 36a4fd33134809439e677c0e7045b1d31a0ae4f70f464830bce158e2fb1e82f8
|
||||
F ext/recover/recover1.test 465af681e7e82616e56a1a49f137be0d3cb38d56765745b4ea2c3b7e7bac6a17
|
||||
F ext/recover/recover_common.tcl a61306c1eb45c0c3fc45652c35b2d4ec19729e340bdf65a272ce4c229cefd85a
|
||||
F ext/recover/recoverbuild.test c74170e0f7b02456af41838afeb5353fdb985a48cc2331d661bbabbca7c6b8e3
|
||||
F ext/recover/recoverclobber.test 3ba6c0c373c5c63d17e82eced64c05c57ccaf26c1abe1ca7141334022a79f32e
|
||||
@ -2068,8 +2068,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 3f30ea5ec9d849c64d8c38f4fffbc06c749ecff91ab90bc29b3a3cc9ec5b9df0
|
||||
R 50489123bab67876dc44e71aabe4a3c4
|
||||
U drh
|
||||
Z 15666d796dadaefad48a0d98e2e18377
|
||||
P 2bb8d977392f635515aa4a36f6f763a2e4858f7adc1120519e2e74c04a9749b5
|
||||
R 824d68be43b361e4021c8eac532ab687
|
||||
U dan
|
||||
Z 3f1aa1e29fd9bcf7f00f9d1631802f51
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
2bb8d977392f635515aa4a36f6f763a2e4858f7adc1120519e2e74c04a9749b5
|
||||
832f6e9f797eecb9a3dae4e7e20c70eda1e91372e9d3ce4223d57f26582cdbd2
|
Loading…
Reference in New Issue
Block a user