diff --git a/test/sqlcipher-rekey.test b/test/sqlcipher-rekey.test index 89f7462..aa6b055 100644 --- a/test/sqlcipher-rekey.test +++ b/test/sqlcipher-rekey.test @@ -208,17 +208,16 @@ do_test rekey-delete-and-query-1 { } for {set i 1} {$i<1000} {incr i} { - set r [expr {int(rand()*32767)}] set r1 [expr {int(rand()*32767)}] - execsql "INSERT INTO t1 VALUES($r,$r1);" + execsql "INSERT INTO t1 VALUES($i,$r1);" } - set r [expr {int(rand()*32767)}] + + execsql "DELETE FROM t1 WHERE a < 500;" + set r1 [expr {int(rand()*32767)}] - execsql "UPDATE t1 SET b = $r WHERE a < $r1;" + execsql "UPDATE t1 SET b = $r1 WHERE a < 750;" - set r [expr {int(rand()*32767)}] - - execsql "DELETE FROM t1 WHERE a < $r;" + execsql "DELETE FROM t1 WHERE a > 750;" execsql { COMMIT; @@ -262,17 +261,16 @@ do_test rekey-delete-and-query-wal-1 { } for {set i 1} {$i<1000} {incr i} { - set r [expr {int(rand()*32767)}] set r1 [expr {int(rand()*32767)}] - execsql "INSERT INTO t1 VALUES($r,$r1);" + execsql "INSERT INTO t1 VALUES($i,$r1);" } - set r [expr {int(rand()*32767)}] + + execsql "DELETE FROM t1 WHERE a < 500;" + set r1 [expr {int(rand()*32767)}] - execsql "UPDATE t1 SET b = $r WHERE a < $r1;" + execsql "UPDATE t1 SET b = $r1 WHERE a < 750;" - set r [expr {int(rand()*32767)}] - - execsql "DELETE FROM t1 WHERE a < $r;" + execsql "DELETE FROM t1 WHERE a > 750;" execsql { COMMIT;