/ Check-in [6996fb34]
Login

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 Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553

  /* Fill in the header. */
  nHeader = 0;
  if( !pPage->leaf ){
    nHeader += 4;
  }
  if( pPage->hasData ){
    nHeader += putVarint(&pCell[nHeader], nData+nZero);
  }else{
    nData = nZero = 0;
  }
  nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
  btreeParseCellPtr(pPage, pCell, &info);
  assert( info.nHeader==nHeader );
  assert( info.nKey==nKey );







|







5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553

  /* Fill in the header. */
  nHeader = 0;
  if( !pPage->leaf ){
    nHeader += 4;
  }
  if( pPage->hasData ){
    nHeader += putVarint32(&pCell[nHeader], nData+nZero);
  }else{
    nData = nZero = 0;
  }
  nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
  btreeParseCellPtr(pPage, pCell, &info);
  assert( info.nHeader==nHeader );
  assert( info.nKey==nKey );