/ Check-in [18115164]
Login

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

Overview
Comment:Move an assert() and testcase() into their correct position within getAndInitPage().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 18115164e12509ec21f34598089a7f1310048819
User & Date: drh 2015-06-29 00:52:33
Context
2015-06-29
03:28
Very small size reduction and performance increase in sqlite3BitvecTest(). check-in: 9b3a7281 user: drh tags: trunk
00:52
Move an assert() and testcase() into their correct position within getAndInitPage(). check-in: 18115164 user: drh tags: trunk
00:21
Use tail recursion in pcache1Unpin() to get a small size reduction and speed improvement. check-in: fde70472 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970


1971
1972
1973
1974
1975
1976
1977
  if( pCur
   && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey)
  ){
    rc = SQLITE_CORRUPT_BKPT;
    releasePage(*ppPage);
    goto getAndInitPage_error;
  }

  testcase( pgno==0 );
  assert( pgno!=0 || rc==SQLITE_CORRUPT );
  return SQLITE_OK;

getAndInitPage_error:
  if( pCur ) pCur->iPage--;


  return rc;
}

/*
** Release a MemPage.  This should be called once for each prior
** call to btreeGetPage.
*/







<
<
<




>
>







1957
1958
1959
1960
1961
1962
1963



1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
  if( pCur
   && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey)
  ){
    rc = SQLITE_CORRUPT_BKPT;
    releasePage(*ppPage);
    goto getAndInitPage_error;
  }



  return SQLITE_OK;

getAndInitPage_error:
  if( pCur ) pCur->iPage--;
  testcase( pgno==0 );
  assert( pgno!=0 || rc==SQLITE_CORRUPT );
  return rc;
}

/*
** Release a MemPage.  This should be called once for each prior
** call to btreeGetPage.
*/