/ Check-in [9df01957]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add extra test cases for deferred page allocation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent
Files: files | file ages | folders
SHA3-256: 9df0195780306a26709e87daabf9d426856aebf2082060b98818f2d48c7472ec
User & Date: dan 2017-05-26 16:51:15
Wiki:begin-concurrent
Context
2017-05-26
18:18
Adjust the bitvec related sqlite3_log messages added by [9527089b]. check-in: a7e0e7a4 user: dan tags: begin-concurrent
16:51
Add extra test cases for deferred page allocation. check-in: 9df01957 user: dan tags: begin-concurrent
16:15
Fix a problem with deferred page allocation in transactions that revert page allocations by savepoint rollbacks. check-in: a4a3bbe6 user: dan tags: begin-concurrent
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/concurrent4.test.

    38     38       DELETE FROM t1 WHERE rowid = 1000;
    39     39   }
    40     40   
    41     41   do_execsql_test 1.2 { ROLLBACK TO abc }
    42     42   do_execsql_test 1.3 { COMMIT }
    43     43   do_execsql_test 1.4 { PRAGMA integrity_check } {ok}
    44     44   
           45  +do_multiclient_test tn {
           46  +  do_test 2.$tn.1 {
           47  +    sql1 {
           48  +      PRAGMA journal_mode = wal;
           49  +      CREATE TABLE t1(a, b);
           50  +      WITH s(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<100)
           51  +        INSERT INTO t1 SELECT randomblob(400), randomblob(400) FROM s;
           52  +
           53  +      CREATE TABLE t2(a, b);
           54  +      WITH s(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<100)
           55  +        INSERT INTO t2 SELECT randomblob(400), randomblob(400) FROM s;
           56  +    }
           57  +
           58  +    sql1 {
           59  +      BEGIN CONCURRENT;
           60  +        INSERT INTO t1 VALUES(randomblob(3000), randomblob(3000));
           61  +    }
           62  +  } {}
           63  +
           64  +  do_test 2.$tn.2 {
           65  +    sql2 {
           66  +      WITH s(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<10)
           67  +        INSERT INTO t2 SELECT randomblob(400), randomblob(400) FROM s;
           68  +    }
           69  +    sql2 {
           70  +      DELETE FROM t2 WHERE rowid<10;
           71  +    }
           72  +  } {}
           73  +
           74  +  do_test 2.$tn.3 {
           75  +    sql1 {
           76  +      COMMIT;
           77  +      PRAGMA integrity_check;
           78  +    }
           79  +  } {ok}
           80  +  do_test 2.$tn.4 {
           81  +    sql2 {
           82  +      PRAGMA integrity_check;
           83  +    }
           84  +  } {ok}
           85  +}
    45     86   
    46     87   
    47     88   finish_test
    48     89