/ Check-in [8e311a6d]
Login

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

Overview
Comment:Update the recent auto-vacuum fix so that it works for the in-memory pointer-map structure used by this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent
Files: files | file ages | folders
SHA3-256: 8e311a6dba202e8733830d8f31b8f0ce11eaefb3a0ab5e5e95ac0d2e5136043b
User & Date: dan 2017-06-08 16:23:55
Wiki:begin-concurrent
Context
2017-06-10
17:23
Remove sqlite3_log() and abort() calls added to this branch to debug the pointer-map problem ([fda22108]). check-in: 79544fc2 user: dan tags: begin-concurrent
2017-06-08
16:23
Update the recent auto-vacuum fix so that it works for the in-memory pointer-map structure used by this branch. check-in: 8e311a6d user: dan tags: begin-concurrent
16:10
Merge 3.19.3 changes with this branch. check-in: e2d38d51 user: dan tags: begin-concurrent
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  8634   8634       }
  8635   8635       oldCell = findCell(pPage, idx);
  8636   8636       if( !pPage->leaf ){
  8637   8637         memcpy(newCell, oldCell, 4);
  8638   8638       }
  8639   8639       rc = clearCell(pPage, oldCell, &info);
  8640   8640       if( info.nSize==szNew && info.nLocal==info.nPayload 
  8641         -     && (!ISAUTOVACUUM || szNew<pPage->minLocal)
         8641  +     && (!REQUIRE_PTRMAP || szNew<pPage->minLocal)
  8642   8642       ){
  8643   8643         /* Overwrite the old cell with the new if they are the same size.
  8644   8644         ** We could also try to do this if the old cell is smaller, then add
  8645   8645         ** the leftover space to the free list.  But experiments show that
  8646   8646         ** doing that is no faster then skipping this optimization and just
  8647   8647         ** calling dropCell() and insertCell(). 
  8648   8648         **

Changes to test/concurrent4.test.

    80     80     do_test 2.$tn.4 {
    81     81       sql2 {
    82     82         PRAGMA integrity_check;
    83     83       }
    84     84     } {ok}
    85     85   }
    86     86   
           87  +reset_db
           88  +do_execsql_test 3.1 {
           89  +  PRAGMA page_size = 1024;
           90  +  PRAGMA journal_mode = wal;
           91  +  CREATE TABLE t2(x);
           92  +  INSERT INTO t2 VALUES(randomblob(5000));
           93  +  CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
           94  +  INSERT INTO t1 VALUES(25, randomblob(104));
           95  +  DELETE FROM t2;
           96  +} {wal}
           97  +
           98  +do_execsql_test 3.2 {
           99  +  BEGIN CONCURRENT;
          100  +    REPLACE INTO t1 VALUES(25, randomblob(1117));
          101  +  COMMIT;
          102  +} {}
    87    103   
    88    104   finish_test
    89    105