/ Check-in [f421adf5]
Login

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

Overview
Comment:Very small simplification to the btree balancer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f421adf54c9db91ba6ca64a8ba3751680e47924a
User & Date: drh 2016-01-20 01:32:00
Context
2016-01-20
01:48
During compilation, transfer the azVar[0..nzVar-1] array from Parse to Vdbe rather than copying it. Smaller and faster code. check-in: 80dd495f user: drh tags: trunk
01:32
Very small simplification to the btree balancer. check-in: f421adf5 user: drh tags: trunk
2016-01-19
21:36
Fix an incorrect VFS version number check in the threadtest3.c test program. check-in: 5bf6442b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  7182   7182       ** invariant.
  7183   7183       **
  7184   7184       ** This must be done in advance.  Once the balance starts, the cell
  7185   7185       ** offset section of the btree page will be overwritten and we will no
  7186   7186       ** long be able to find the cells if a pointer to each cell is not saved
  7187   7187       ** first.
  7188   7188       */
  7189         -    memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit);
         7189  +    memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
  7190   7190       if( pOld->nOverflow>0 ){
  7191         -      memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow);
  7192   7191         limit = pOld->aiOvfl[0];
  7193   7192         for(j=0; j<limit; j++){
  7194   7193           b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
  7195   7194           piCell += 2;
  7196   7195           b.nCell++;
  7197   7196         }
  7198   7197         for(k=0; k<pOld->nOverflow; k++){