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

Add an extra fault-injection test to sortfault.test. Remove an unreachable branch from vdbesort.c.

FossilOrigin-Name: a33a366ba8a0da81ddd895d552a348441ef8529a
This commit is contained in:
dan
2014-05-03 20:43:13 +00:00
parent e18e90ebaf
commit f7f425d600
4 changed files with 35 additions and 15 deletions

View File

@ -26,6 +26,7 @@ do_execsql_test 1.0 {
foreach {tn mmap_limit nWorker tmpstore threadsmode fakeheap} {
1 0 0 file multithread false
2 100000 0 file multithread false
3 100000 1 file multithread false
} {
catch { db close }
sqlite3_shutdown
@ -53,6 +54,27 @@ foreach {tn mmap_limit nWorker tmpstore threadsmode fakeheap} {
} -test {
faultsim_test_result {0 {40 1000 40 1000 40 1000 40 1000 40 1000}}
}
do_faultsim_test 2.$tn -prep {
sqlite3 db test.db
sqlite3_test_control SQLITE_TESTCTRL_SORTER_MMAP db $::mmap_limit
add_test_utf16bin_collate db
execsql { PRAGMA cache_size = 5 }
} -body {
execsql {
WITH r(x,y) AS (
SELECT 100, $::str
UNION ALL
SELECT x-1, $::str FROM r
LIMIT 100
)
SELECT count(x), length(y) FROM r GROUP BY y COLLATE utf16bin, (x%5)
}
} -test {
faultsim_test_result {0 {20 1000 20 1000 20 1000 20 1000 20 1000}}
}
}
catch { db close }