/ Check-in [6996fb34]
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:Use putVarint32() instead of putVarint() for a quantity that can never exceed 2GiB - 1.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6996fb34445adedf463b66ed1f339ee1f27ce6e5
User & Date: drh 2013-12-09 00:47:11
Context
2013-12-09
01:04
Avoid unnecessary no-op calls from getAndInitPage() to btreeInitPage() in the btree.c logic. check-in: 81f5ae13 user: drh tags: trunk
00:47
Use putVarint32() instead of putVarint() for a quantity that can never exceed 2GiB - 1. check-in: 6996fb34 user: drh tags: trunk
2013-12-08
23:33
Another simplification to the OP_MakeRecord opcode, making it slightly faster and very slightly smaller. check-in: f2f5a3ce user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  5539   5539   
  5540   5540     /* Fill in the header. */
  5541   5541     nHeader = 0;
  5542   5542     if( !pPage->leaf ){
  5543   5543       nHeader += 4;
  5544   5544     }
  5545   5545     if( pPage->hasData ){
  5546         -    nHeader += putVarint(&pCell[nHeader], nData+nZero);
         5546  +    nHeader += putVarint32(&pCell[nHeader], nData+nZero);
  5547   5547     }else{
  5548   5548       nData = nZero = 0;
  5549   5549     }
  5550   5550     nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
  5551   5551     btreeParseCellPtr(pPage, pCell, &info);
  5552   5552     assert( info.nHeader==nHeader );
  5553   5553     assert( info.nKey==nKey );