diff options
author | dan <Dan Kennedy> | 2022-08-25 13:32:55 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2022-08-25 13:32:55 +0000 |
commit | aa07b36dd52cfb4d7690d4e8917ea0187d44b405 (patch) | |
tree | a44fbedbd81022593e7cc23a12a9702cadac2ef7 /test/btreefault.test | |
parent | 7383f5a7d928f278bba838fb85a66809f7f89d70 (diff) | |
download | sqlite-aa07b36dd52cfb4d7690d4e8917ea0187d44b405.tar.gz sqlite-aa07b36dd52cfb4d7690d4e8917ea0187d44b405.zip |
Remove a NEVER() macro for a condition that is actually reachable following an OOM. dbsqlfuzz crash-6ef3cd3b18ccc5de86120950a0498641acd90a33.txt.
FossilOrigin-Name: b573e2cffa5fedc893ed30e76e47022b3617ac5583e1eb486afa810b2514c419
Diffstat (limited to 'test/btreefault.test')
-rw-r--r-- | test/btreefault.test | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/btreefault.test b/test/btreefault.test index 61104c5a7..d0ba05961 100644 --- a/test/btreefault.test +++ b/test/btreefault.test @@ -54,4 +54,53 @@ do_faultsim_test 1 -prep { faultsim_integrity_check } +#------------------------------------------------------------------------- +# dbsqlfuzz crash-6ef3cd3b18ccc5de86120950a0498641acd90a33.txt +# +reset_db + +do_execsql_test 2.0 { + CREATE TABLE t1(i INTEGER PRIMARY KEY, a, b); + CREATE INDEX i1 ON t1(b); + CREATE TABLE t2(x, y); +} + +do_execsql_test 2.1 { + INSERT INTO t1 VALUES(25, 25, 25); + INSERT INTO t2 VALUES(25, 'a'), (25, 'b'), (25, 'c'); +} + +faultsim_save +do_test 2.2 { + set res [list] + db eval { + SELECT x, y FROM t1 CROSS JOIN t2 WHERE t2.x=t1.i AND +t1.i=25 ORDER BY b + } { + lappend res $x $y + if {$y=="b"} { + db eval { DELETE FROM t1 WHERE i=25 } + } + } + set res +} {25 a 25 b} + +do_faultsim_test 2 -faults oom-t* -prep { + faultsim_restore_and_reopen + db eval {SELECT * FROM sqlite_master} +} -body { + set ::myres [list] + db eval { + SELECT x, y FROM t1 CROSS JOIN t2 WHERE t2.x=t1.i AND +t1.i=25 ORDER BY b + } { + lappend ::myres $x $y + if {$y=="b"} { + db eval { DELETE FROM t1 WHERE i=25 } + } + } + set ::myres +} -test { + faultsim_test_result {0 {25 a 25 b}} +} + + finish_test |