/ Check-in [81f5ae13]
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:Avoid unnecessary no-op calls from getAndInitPage() to btreeInitPage() in the btree.c logic.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 81f5ae13b2e23daee03151d32515387b7f5ba5e5
User & Date: drh 2013-12-09 01:04:54
Context
2013-12-09
01:58
Use memmove() rather than a home-made copy loop in dropCell() of btree.c, for a size reduction and performance improvement. check-in: 78e17068 user: drh tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  1648   1648     assert( sqlite3_mutex_held(pBt->mutex) );
  1649   1649     assert( bReadonly==PAGER_GET_READONLY || bReadonly==0 );
  1650   1650   
  1651   1651     if( pgno>btreePagecount(pBt) ){
  1652   1652       rc = SQLITE_CORRUPT_BKPT;
  1653   1653     }else{
  1654   1654       rc = btreeGetPage(pBt, pgno, ppPage, bReadonly);
  1655         -    if( rc==SQLITE_OK ){
         1655  +    if( rc==SQLITE_OK && (*ppPage)->isInit==0 ){
  1656   1656         rc = btreeInitPage(*ppPage);
  1657   1657         if( rc!=SQLITE_OK ){
  1658   1658           releasePage(*ppPage);
  1659   1659         }
  1660   1660       }
  1661   1661     }
  1662   1662