1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a problem with OOM handling in the sorter code.

FossilOrigin-Name: 59cd5229e2b5be5272cf57c7e7d09e97d16a5425
This commit is contained in:
dan
2014-04-01 10:19:02 +00:00
parent b3f56fdb69
commit 38fdead890
8 changed files with 104 additions and 29 deletions

View File

@ -880,6 +880,28 @@ do_malloc_test 39 -tclprep {
db close
}
reset_db
add_test_utf16bin_collate db
do_execsql_test 40.1 {
CREATE TABLE t1(a);
INSERT INTO t1 VALUES('fghij');
INSERT INTO t1 VALUES('pqrst');
INSERT INTO t1 VALUES('abcde');
INSERT INTO t1 VALUES('uvwxy');
INSERT INTO t1 VALUES('klmno');
}
do_execsql_test 40.2 {
SELECT * FROM t1 ORDER BY 1 COLLATE utf16bin;
} {abcde fghij klmno pqrst uvwxy}
do_faultsim_test 40.3 -faults oom-trans* -body {
execsql {
SELECT * FROM t1 ORDER BY 1 COLLATE utf16bin;
}
} -test {
faultsim_test_result {0 {abcde fghij klmno pqrst uvwxy}}
faultsim_integrity_check
}
# Ensure that no file descriptors were leaked.
do_test malloc-99.X {
catch {db close}