/ Check-in [87aa9357]
Login

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

Overview
Comment:Add test cases for ticket [7f7f8026eda387d544].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 87aa9357fbe6749bae60e30af54ca16e48678802
User & Date: drh 2016-04-07 21:14:35
Context
2016-04-08
19:44
Update documentation for sqlite3_snapshot_open(). No code changes. check-in: 1dfa5234 user: drh tags: trunk
2016-04-07
21:14
Add test cases for ticket [7f7f8026eda387d544]. check-in: 87aa9357 user: drh tags: trunk
18:42
Prevent the in-memory journal read cursor from entering an inconsistent state when it reads the last few bytes out of the journal file. Fix for ticket [7f7f8026eda38]. check-in: c4b9c611 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/savepoint7.test.

    90     90           INSERT INTO t2 VALUES($a,$b,$c);
    91     91           ROLLBACK TO x2;
    92     92         }
    93     93       }
    94     94     } msg]
    95     95     list $rc $msg [db eval {SELECT * FROM t2}]
    96     96   } {1 {abort due to ROLLBACK} {}}
           97  +
           98  +# Ticket: https://www.sqlite.org/src/tktview/7f7f8026eda387d544b
           99  +# Segfault in the in-memory journal logic triggered by a tricky
          100  +# combination of SAVEPOINT operations.
          101  +#
          102  +unset -nocomplain i
          103  +for {set i 248} {$i<=253} {incr i} {
          104  +  do_test savepoint7-3.$i {
          105  +    db close
          106  +    forcedelete test.db
          107  +    sqlite3 db test.db
          108  +    db eval {
          109  +      PRAGMA page_size=1024;
          110  +      PRAGMA temp_store=MEMORY;
          111  +      BEGIN;
          112  +      CREATE TABLE t1(x INTEGER PRIMARY KEY, y TEXT);
          113  +      WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<$::i)
          114  +      INSERT INTO t1(x,y) SELECT x*10, printf('%04d%.800c',x,'*') FROM c;
          115  +      SAVEPOINT one;
          116  +        SELECT count(*) FROM t1;
          117  +        WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<$::i)
          118  +        INSERT INTO t1(x,y) SELECT x*10+1, printf('%04d%.800c',x,'*') FROM c;
          119  +      ROLLBACK TO one;
          120  +        SELECT count(*) FROM t1;
          121  +        SAVEPOINT twoB;
          122  +          WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<10)
          123  +          INSERT INTO t1(x,y) SELECT x*10+2, printf('%04d%.800c',x,'*') FROM c;
          124  +        ROLLBACK TO twoB;
          125  +      RELEASE one;
          126  +      COMMIT;
          127  +    }
          128  +  } [list $i $i]
          129  +}
          130  +
    97    131   
    98    132   finish_test