Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | In the pager, avoid checking for the illegal page number 0 except when creating a new page. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | pager-get-method |
Files: | files | file ages | folders |
SHA1: |
dee20ba982125ea98c280ad1571789af |
User & Date: | drh 2016-12-13 18:34:01.957 |
Context
2016-12-13
| ||
18:47 | Convert sqlite3PagerGet() into a pointer-dispatched virtual method. This makes it about 25% faster. (check-in: 7f88bb4412 user: drh tags: trunk) | |
18:34 | In the pager, avoid checking for the illegal page number 0 except when creating a new page. (Closed-Leaf check-in: dee20ba982 user: drh tags: pager-get-method) | |
15:53 | Further refinements to the virtual method implementation of sqlite3PagerGet(). (check-in: 67df444648 user: drh tags: pager-get-method) | |
Changes
Changes to src/pager.c.
︙ | |||
5362 5363 5364 5365 5366 5367 5368 | 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 | - - - - | int flags /* PAGER_GET_XXX flags */ ){ int rc = SQLITE_OK; PgHdr *pPg; u8 noContent; /* True if PAGER_GET_NOCONTENT is set */ sqlite3_pcache_page *pBase; |
︙ | |||
5395 5396 5397 5398 5399 5400 5401 | 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 | - - + + - - - - - + + + + + + + | ** the page. Return without further ado. */ assert( pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager) ); pPager->aStat[PAGER_STAT_HIT]++; return SQLITE_OK; }else{ /* The pager cache has created a new page. Its content needs to |
︙ |
Changes to src/pcache.c.
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - + | ** ** assert( sqlite3PcachePageSanity(pPg) ); */ #if SQLITE_DEBUG int sqlite3PcachePageSanity(PgHdr *pPg){ PCache *pCache; assert( pPg!=0 ); |
︙ | |||
368 369 370 371 372 373 374 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - | ){ int eCreate; sqlite3_pcache_page *pRes; assert( pCache!=0 ); assert( pCache->pCache!=0 ); assert( createFlag==3 || createFlag==0 ); |
︙ |