/ Check-in [f264015f]
Login

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

Overview
Comment:Experimental change to VACUUM so that it preserves existing ROWID values.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | vacuum-preserves-rowid
Files: files | file ages | folders
SHA3-256: f264015f84de51d74f681ba62a5f26bd859480d93e1eaf9e1018b3e9b4e0bea3
User & Date: drh 2019-02-07 15:09:44
Context
2019-02-07
19:07
Change VACUUM so that it preserves ROWID values. check-in: 49e5d11d user: drh tags: trunk
15:09
Experimental change to VACUUM so that it preserves existing ROWID values. Closed-Leaf check-in: f264015f user: drh tags: vacuum-preserves-rowid
00:17
In the fuzzcheck test program, make sure the isspace() and related routines are not given values outside the range of -1 to 255. check-in: f2983287 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/insert.c.

  2343   2343         addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
  2344   2344         sqlite3VdbeVerifyAbortable(v, onError);
  2345   2345         addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
  2346   2346         VdbeCoverage(v);
  2347   2347         sqlite3RowidConstraint(pParse, onError, pDest);
  2348   2348         sqlite3VdbeJumpHere(v, addr2);
  2349   2349         autoIncStep(pParse, regAutoinc, regRowid);
  2350         -    }else if( pDest->pIndex==0 ){
         2350  +    }else if( pDest->pIndex==0 && !(db->mDbFlags & DBFLAG_Vacuum) ){
  2351   2351         addr1 = sqlite3VdbeAddOp2(v, OP_NewRowid, iDest, regRowid);
  2352   2352       }else{
  2353   2353         addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
  2354   2354         assert( (pDest->tabFlags & TF_Autoincrement)==0 );
  2355   2355       }
  2356   2356       sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
  2357   2357       if( db->mDbFlags & DBFLAG_Vacuum ){