/ Check-in [b10d0f93]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Do not bother to initialize unused fields in the BtreePayload object.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b10d0f939c82c4de3faa90b86de9ec4a89992856
User & Date: drh 2016-10-04 00:47:26
Context
2016-10-04
12:20
Fix a problem with the lempar.c parser template. check-in: 3a9d802f user: drh tags: trunk
00:47
Do not bother to initialize unused fields in the BtreePayload object. check-in: b10d0f93 user: drh tags: trunk
2016-10-03
18:13
Allow deterministic functions in the WHERE clause of a partial index. check-in: c6e9b942 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  6096   6096       nPayload = pX->nData + pX->nZero;
  6097   6097       pSrc = pX->pData;
  6098   6098       nSrc = pX->nData;
  6099   6099       assert( pPage->intKeyLeaf ); /* fillInCell() only called for leaves */
  6100   6100       nHeader += putVarint32(&pCell[nHeader], nPayload);
  6101   6101       nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey);
  6102   6102     }else{
  6103         -    assert( pX->nData==0 );
  6104         -    assert( pX->nZero==0 );
  6105   6103       assert( pX->nKey<=0x7fffffff && pX->pKey!=0 );
  6106   6104       nSrc = nPayload = (int)pX->nKey;
  6107   6105       pSrc = pX->pKey;
  6108   6106       nHeader += putVarint32(&pCell[nHeader], nPayload);
  6109   6107     }
  6110   6108     
  6111   6109     /* Fill in the payload */

Changes to src/vdbe.c.

  5055   5055     rc = ExpandBlob(pIn2);
  5056   5056     if( rc ) goto abort_due_to_error;
  5057   5057     if( pOp->opcode==OP_SorterInsert ){
  5058   5058       rc = sqlite3VdbeSorterWrite(pC, pIn2);
  5059   5059     }else{
  5060   5060       x.nKey = pIn2->n;
  5061   5061       x.pKey = pIn2->z;
  5062         -    x.nData = 0;
  5063         -    x.nZero = 0;
  5064         -    x.pData = 0;
  5065   5062       rc = sqlite3BtreeInsert(pC->uc.pCursor, &x, pOp->p3, 
  5066   5063           ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
  5067   5064           );
  5068   5065       assert( pC->deferredMoveto==0 );
  5069   5066       pC->cacheStatus = CACHE_STALE;
  5070   5067     }
  5071   5068     if( rc) goto abort_due_to_error;