Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: third_party/sqlite/src/pager.c

Issue 203011: Temporarilly comment out SQLite load optimization... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/meta_table_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** 2001 September 15 2 ** 2001 September 15
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 5390 matching lines...) Expand 10 before | Expand all | Expand 10 after
5401 return rc; 5401 return rc;
5402 } 5402 }
5403 5403
5404 /* Copy the data to each page. Note that the page numbers we pass to _get 5404 /* Copy the data to each page. Note that the page numbers we pass to _get
5405 * are one-based, 0 is a marker for no page. We also need to check that we 5405 * are one-based, 0 is a marker for no page. We also need to check that we
5406 * haven't loaded more pages than the cache can hold total. There may have 5406 * haven't loaded more pages than the cache can hold total. There may have
5407 * already been a few pages loaded before, so we may fill the cache before 5407 * already been a few pages loaded before, so we may fill the cache before
5408 * loading all of the pages we want to. 5408 * loading all of the pages we want to.
5409 */ 5409 */
5410 for(i=1; i <= loadPages && pPager->nPage < pPager->mxPage; i++) { 5410 for(i=1; i <= loadPages && pPager->nPage < pPager->mxPage; i++) {
5411 DbPage *pPage; 5411 DbPage *pPage = 0;
5412 rc = sqlite3PagerAcquire2(pPager, i, &pPage, 0, 5412 rc = sqlite3PagerAcquire2(pPager, i, &pPage, 0,
5413 &fileData[(i-1)*(i64)pPager->pageSize]); 5413 &fileData[(i-1)*(i64)pPager->pageSize]);
5414 if (rc != SQLITE_OK) 5414 if (rc != SQLITE_OK)
5415 break; 5415 break;
5416 sqlite3PagerUnref(pPage); 5416 sqlite3PagerUnref(pPage);
5417 } 5417 }
5418 freeLarge(fileData); 5418 freeLarge(fileData);
5419 return SQLITE_OK; 5419 return SQLITE_OK;
5420 } 5420 }
5421 /* End preload-cache.patch for Chromium */ 5421 /* End preload-cache.patch for Chromium */
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5485 ** Get/set the size-limit used for persistent journal files. 5485 ** Get/set the size-limit used for persistent journal files.
5486 */ 5486 */
5487 i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){ 5487 i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){
5488 if( iLimit>=-1 ){ 5488 if( iLimit>=-1 ){
5489 pPager->journalSizeLimit = iLimit; 5489 pPager->journalSizeLimit = iLimit;
5490 } 5490 }
5491 return pPager->journalSizeLimit; 5491 return pPager->journalSizeLimit;
5492 } 5492 }
5493 5493
5494 #endif /* SQLITE_OMIT_DISKIO */ 5494 #endif /* SQLITE_OMIT_DISKIO */
OLDNEW
« no previous file with comments | « chrome/browser/meta_table_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698