/ Check-in [fbe70e11]
Login

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

Overview
Comment:Do not read the database file size on a SAVEPOINT rollback any more since after checkin [65b8636ac6e5] the in-header-size field is always valid.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:fbe70e1106bcc5086ceb9d8f39cc39baf3643092
User & Date: drh 2010-08-05 03:21:40
Context
2010-08-05
11:56
Make the size of a Bitvec object 512 bytes on all platforms, instead of having the size depend on the size of a pointer. This makes testing easier. check-in: ca479f3d user: drh tags: trunk
03:21
Do not read the database file size on a SAVEPOINT rollback any more since after checkin [65b8636ac6e5] the in-header-size field is always valid. check-in: fbe70e11 user: drh tags: trunk
02:52
Fix the query planner so that when it has a choice of full-scan tables to move to the outer loop, it chooses the one that is likely to give the fewest output rows. Ticket [13f033c865f878]. check-in: 309bbedf user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

3324
3325
3326
3327
3328
3329
3330
3331
3332
3333




3334
3335
3336
3337
3338
3339
3340
    assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
    sqlite3BtreeEnter(p);
    rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
    if( rc==SQLITE_OK ){
      if( iSavepoint<0 && pBt->initiallyEmpty ) pBt->nPage = 0;
      rc = newDatabase(pBt);
      pBt->nPage = get4byte(28 + pBt->pPage1->aData);
      if( pBt->nPage==0 ){
        sqlite3PagerPagecount(pBt->pPager, (int*)&pBt->nPage);
      }




    }
    sqlite3BtreeLeave(p);
  }
  return rc;
}

/*







<
<
|
>
>
>
>







3324
3325
3326
3327
3328
3329
3330


3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
    assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
    sqlite3BtreeEnter(p);
    rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
    if( rc==SQLITE_OK ){
      if( iSavepoint<0 && pBt->initiallyEmpty ) pBt->nPage = 0;
      rc = newDatabase(pBt);
      pBt->nPage = get4byte(28 + pBt->pPage1->aData);



      /* The database size was written into the offset 28 of the header
      ** when the transaction started, so we know that the value at offset
      ** 28 is nonzero. */
      assert( pBt->nPage>0 );
    }
    sqlite3BtreeLeave(p);
  }
  return rc;
}

/*