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

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/src/test_btree.c

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 ** 2007 May 05 2 ** 2007 May 05
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 15 matching lines...) Expand all
26 void * clientData, 26 void * clientData,
27 Tcl_Interp *interp, 27 Tcl_Interp *interp,
28 int objc, 28 int objc,
29 Tcl_Obj *CONST objv[] 29 Tcl_Obj *CONST objv[]
30 ){ 30 ){
31 #ifndef SQLITE_OMIT_SHARED_CACHE 31 #ifndef SQLITE_OMIT_SHARED_CACHE
32 extern BtShared *sqlite3SharedCacheList; 32 extern BtShared *sqlite3SharedCacheList;
33 BtShared *pBt; 33 BtShared *pBt;
34 Tcl_Obj *pRet = Tcl_NewObj(); 34 Tcl_Obj *pRet = Tcl_NewObj();
35 for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){ 35 for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
36 const char *zFile = sqlite3PagerFilename(pBt->pPager); 36 const char *zFile = sqlite3PagerFilename(pBt->pPager, 1);
37 Tcl_ListObjAppendElement(interp, pRet, Tcl_NewStringObj(zFile, -1)); 37 Tcl_ListObjAppendElement(interp, pRet, Tcl_NewStringObj(zFile, -1));
38 Tcl_ListObjAppendElement(interp, pRet, Tcl_NewIntObj(pBt->nRef)); 38 Tcl_ListObjAppendElement(interp, pRet, Tcl_NewIntObj(pBt->nRef));
39 } 39 }
40 Tcl_SetObjResult(interp, pRet); 40 Tcl_SetObjResult(interp, pRet);
41 #endif 41 #endif
42 return TCL_OK; 42 return TCL_OK;
43 } 43 }
44 44
45 /* 45 /*
46 ** Print debugging information about all cursors to standard output. 46 ** Print debugging information about all cursors to standard output.
47 */ 47 */
48 void sqlite3BtreeCursorList(Btree *p){ 48 void sqlite3BtreeCursorList(Btree *p){
49 #ifdef SQLITE_DEBUG 49 #ifdef SQLITE_DEBUG
50 BtCursor *pCur; 50 BtCursor *pCur;
51 BtShared *pBt = p->pBt; 51 BtShared *pBt = p->pBt;
52 for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){ 52 for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
53 MemPage *pPage = pCur->apPage[pCur->iPage]; 53 MemPage *pPage = pCur->apPage[pCur->iPage];
54 char *zMode = pCur->wrFlag ? "rw" : "ro"; 54 char *zMode = (pCur->curFlags & BTCF_WriteFlag) ? "rw" : "ro";
55 sqlite3DebugPrintf("CURSOR %p rooted at %4d(%s) currently at %d.%d%s\n", 55 sqlite3DebugPrintf("CURSOR %p rooted at %4d(%s) currently at %d.%d%s\n",
56 pCur, pCur->pgnoRoot, zMode, 56 pCur, pCur->pgnoRoot, zMode,
57 pPage ? pPage->pgno : 0, pCur->aiIdx[pCur->iPage], 57 pPage ? pPage->pgno : 0, pCur->aiIdx[pCur->iPage],
58 (pCur->eState==CURSOR_VALID) ? "" : " eof" 58 (pCur->eState==CURSOR_VALID) ? "" : " eof"
59 ); 59 );
60 } 60 }
61 #endif 61 #endif
62 } 62 }
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/src/test_backup.c ('k') | third_party/sqlite/sqlite-src-3080704/src/test_config.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698