Index: src/btree.c ================================================================== --- src/btree.c +++ src/btree.c @@ -7,11 +7,11 @@ ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.355 2007/04/13 02:14:30 drh Exp $ +** $Id: btree.c,v 1.356 2007/04/19 00:24:34 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to ** ** Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3: @@ -3517,30 +3517,26 @@ */ int sqlite3BtreeNext(BtCursor *pCur, int *pRes){ int rc; MemPage *pPage; -#ifndef SQLITE_OMIT_SHARED_CACHE rc = restoreOrClearCursorPosition(pCur); if( rc!=SQLITE_OK ){ return rc; } -#endif assert( pRes!=0 ); pPage = pCur->pPage; if( CURSOR_INVALID==pCur->eState ){ *pRes = 1; return SQLITE_OK; } -#ifndef SQLITE_OMIT_SHARED_CACHE if( pCur->skip>0 ){ pCur->skip = 0; *pRes = 0; return SQLITE_OK; } pCur->skip = 0; -#endif assert( pPage->isInit ); assert( pCur->idxnCell ); pCur->idx++; @@ -3587,28 +3583,24 @@ int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){ int rc; Pgno pgno; MemPage *pPage; -#ifndef SQLITE_OMIT_SHARED_CACHE rc = restoreOrClearCursorPosition(pCur); if( rc!=SQLITE_OK ){ return rc; } -#endif if( CURSOR_INVALID==pCur->eState ){ *pRes = 1; return SQLITE_OK; } -#ifndef SQLITE_OMIT_SHARED_CACHE if( pCur->skip<0 ){ pCur->skip = 0; *pRes = 0; return SQLITE_OK; } pCur->skip = 0; -#endif pPage = pCur->pPage; assert( pPage->isInit ); assert( pCur->idx>=0 ); if( !pPage->leaf ){ Index: src/vtab.c ================================================================== --- src/vtab.c +++ src/vtab.c @@ -9,11 +9,11 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to help implement virtual tables. ** -** $Id: vtab.c,v 1.42 2007/04/18 14:24:34 danielk1977 Exp $ +** $Id: vtab.c,v 1.43 2007/04/19 00:24:35 drh Exp $ */ #ifndef SQLITE_OMIT_VIRTUALTABLE #include "sqliteInt.h" /* @@ -130,14 +130,16 @@ Token *pModuleName /* Name of the module for the virtual table */ ){ int iDb; /* The database the table is being created in */ Table *pTable; /* The new virtual table */ +#ifndef SQLITE_OMIT_SHARED_CACHE if( sqlite3ThreadDataReadOnly()->useSharedData ){ sqlite3ErrorMsg(pParse, "Cannot use virtual tables in shared-cache mode"); return; } +#endif sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, 0); pTable = pParse->pNewTable; if( pTable==0 || pParse->nErr ) return; assert( 0==pTable->pIndex );