mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Fix some trivial cases where database corruption was causing an error code other than SQLITE_CORRUPT to be returned. (CVS 5690)
FossilOrigin-Name: 89fda074f6b4959c32f1083badba3c73cffb4995
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
# the database file by changing the values of pseudo-randomly selected
|
||||
# bytes.
|
||||
#
|
||||
# $Id: fuzz3.test,v 1.1 2008/09/09 18:28:07 danielk1977 Exp $
|
||||
# $Id: fuzz3.test,v 1.2 2008/09/10 17:53:36 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -123,7 +123,7 @@ do_test fuzz3-2 {
|
||||
db_checksum
|
||||
} $::cksum
|
||||
|
||||
for {set ii 0} {$ii < 10000} {incr ii} {
|
||||
for {set ii 0} {$ii < 5000} {incr ii} {
|
||||
purge_pcache
|
||||
|
||||
# Randomly modify a single byte of the database file somewhere within
|
||||
@ -131,12 +131,12 @@ for {set ii 0} {$ii < 10000} {incr ii} {
|
||||
set iNew [expr int(rand()*5*1024*256)]
|
||||
set iOld [modify_database $iNew]
|
||||
|
||||
set iTest 2
|
||||
set iTest 0
|
||||
foreach sql {
|
||||
{SELECT * FROM t2 ORDER BY d}
|
||||
{SELECT * FROM t1}
|
||||
{SELECT * FROM t2}
|
||||
{SELECT * FROM t1 ORDER BY a}
|
||||
{SELECT * FROM t2 ORDER BY d}
|
||||
{SELECT * FROM t1 WHERE a = (SELECT a FROM t1 WHERE rowid=25)}
|
||||
{SELECT * FROM t2 WHERE d = (SELECT d FROM t2 WHERE rowid=1)}
|
||||
{SELECT * FROM t2 WHERE d = (SELECT d FROM t2 WHERE rowid=50)}
|
||||
|
Reference in New Issue
Block a user