Update tests in returning1.test to account for [c7896e88].
[sqlite.git] / test / memjournal.test
blob73f984b5533bfae979e64334c91e8d7d6b525cde
1 # 2021 May 24
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
6 #    May you do good and not evil.
7 #    May you find forgiveness for yourself and forgive others.
8 #    May you share freely, never taking more than you give.
10 #***********************************************************************
11 # Tests focused on the in-memory journal.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 source $testdir/malloc_common.tcl
17 set testprefix memjournal
20 do_execsql_test 1.0 {
21   PRAGMA journal_mode = memory;
22   CREATE TABLE t1(a);
23 } {memory}
25 set nRow [expr 1]
27 do_execsql_test 1.1 {
28   BEGIN;
29     INSERT INTO t1 VALUES( randomblob(500) );
30 } {}
32 do_test 1.2 {
33   for {set i 1} {$i <= 500} {incr i} {
34     execsql {
35       SAVEPOINT one;
36       UPDATE t1 SET a=randomblob(500);
37     }
38     execsql { SAVEPOINT abc } 
39     execsql { UPDATE t1 SET a=randomblob(500) WHERE rowid<=$i AND 0 }
40     execsql { RELEASE abc }
41   } 
42 } {}
44 do_execsql_test 1.3 {
45   COMMIT;
48 finish_test