/ Check-in [e54330b4]
Login

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

Overview
Comment:Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode with ATTACH-ed databases.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e54330b43127e46fc6494748cbb353a6fc91cfd7
User & Date: drh 2014-04-04 14:12:52
Context
2014-04-04
18:20
Merge changes to the query planner that strive to ensure that any index usage that is a proper subset of some other index usage always has a slightly higher cost. check-in: 683dd379 user: drh tags: trunk
14:12
Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode with ATTACH-ed databases. check-in: e54330b4 user: drh tags: trunk
2014-04-03
16:29
Use OP_Copy instead of OP_SCopy when moving results out of a subquery, to prevent the subquery results from changing out from under the outer query. Fix for ticket [98825a79ce1456]. Problem introduced by check-in [1e64dd782a126f48d78]. check-in: d5513dfa user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  1620   1620     u32 cksum = 0;                   /* Checksum of string zMaster */
  1621   1621   
  1622   1622     assert( pPager->setMaster==0 );
  1623   1623     assert( !pagerUseWal(pPager) );
  1624   1624   
  1625   1625     if( !zMaster 
  1626   1626      || pPager->journalMode==PAGER_JOURNALMODE_MEMORY 
  1627         -   || pPager->journalMode==PAGER_JOURNALMODE_OFF 
         1627  +   || !isOpen(pPager->jfd)
  1628   1628     ){
  1629   1629       return SQLITE_OK;
  1630   1630     }
  1631   1631     pPager->setMaster = 1;
  1632         -  assert( isOpen(pPager->jfd) );
  1633   1632     assert( pPager->journalHdr <= pPager->journalOff );
  1634   1633   
  1635   1634     /* Calculate the length in bytes and the checksum of zMaster */
  1636   1635     for(nMaster=0; zMaster[nMaster]; nMaster++){
  1637   1636       cksum += zMaster[nMaster];
  1638   1637     }
  1639   1638   

Changes to test/wal.test.

  1569   1569     } [wal_file_size 1 1024]
  1570   1570   }
  1571   1571   
  1572   1572   db close
  1573   1573   sqlite3_shutdown
  1574   1574   test_sqlite3_log
  1575   1575   sqlite3_initialize
         1576  +
         1577  +# Make sure PRAGMA journal_mode=WAL works with ATTACHED databases in
         1578  +# all journal modes.
         1579  +#
         1580  +foreach mode {OFF MEMORY PERSIST DELETE TRUNCATE WAL} {
         1581  +  delete_file test.db test2.db
         1582  +  sqlite3 db test.db
         1583  +  do_test wal-25.$mode {
         1584  +    db eval "PRAGMA journal_mode=$mode"
         1585  +    db eval {ATTACH 'test2.db' AS t2; PRAGMA journal_mode=WAL;}
         1586  +  } {wal}
         1587  +  db close
         1588  +}
  1576   1589   
  1577   1590   finish_test