diff options
author | drh <drh@noemail.net> | 2016-09-10 19:51:40 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-09-10 19:51:40 +0000 |
commit | 2eb22af03dfbf55703fa3ccaaa3001e3efbe4132 (patch) | |
tree | 0250c2f1d44b412aba669c5c6cb45e43f69570d3 /src | |
parent | 9871664ed666afcaf2af8f8efe63b5805089c3e6 (diff) | |
download | sqlite-2eb22af03dfbf55703fa3ccaaa3001e3efbe4132.tar.gz sqlite-2eb22af03dfbf55703fa3ccaaa3001e3efbe4132.zip |
Changes to give a warning-free build with SQLITE_OMIT_INCRBLOB and
SQLITE_OMIT_SHARED_CACHE.
FossilOrigin-Name: 711c59171b22df04224183a713e6c36e0bb3bba8
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.h | 4 | ||||
-rw-r--r-- | src/tclsqlite.c | 13 | ||||
-rw-r--r-- | src/test3.c | 17 | ||||
-rw-r--r-- | src/vdbe.c | 6 | ||||
-rw-r--r-- | src/vdbemem.c | 2 |
5 files changed, 27 insertions, 15 deletions
diff --git a/src/btree.h b/src/btree.h index b76e2ce21..0df98a3a6 100644 --- a/src/btree.h +++ b/src/btree.h @@ -90,7 +90,9 @@ int sqlite3BtreeIsInReadTrans(Btree*); int sqlite3BtreeIsInBackup(Btree*); void *sqlite3BtreeSchema(Btree *, int, void(*)(void *)); int sqlite3BtreeSchemaLocked(Btree *pBtree); +#ifndef SQLITE_OMIT_SHARED_CACHE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock); +#endif int sqlite3BtreeSavepoint(Btree *, int, int); const char *sqlite3BtreeGetFilename(Btree *); @@ -293,8 +295,10 @@ int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*); char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*); struct Pager *sqlite3BtreePager(Btree*); +#ifndef SQLITE_OMIT_INCRBLOB int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*); void sqlite3BtreeIncrblobCursor(BtCursor *); +#endif void sqlite3BtreeClearCursor(BtCursor *); int sqlite3BtreeSetVersion(Btree *pBt, int iVersion); int sqlite3BtreeCursorHasHint(BtCursor*, unsigned int mask); diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 3db4a32c4..b2f13bd5e 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -590,7 +590,8 @@ static int DbProgressHandler(void *cd){ } #endif -#ifndef SQLITE_OMIT_TRACE +#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) && \ + !defined(SQLITE_OMIT_DEPRECATED) /* ** This routine is called by the SQLite trace handler whenever a new ** block of SQL is executed. The TCL script in pDb->zTrace is executed. @@ -684,7 +685,8 @@ static int DbTraceV2Handler( } #endif -#ifndef SQLITE_OMIT_TRACE +#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) && \ + !defined(SQLITE_OMIT_DEPRECATED) /* ** This routine is called by the SQLite profile handler after a statement ** SQL has executed. The TCL script in pDb->zProfile is evaluated. @@ -2747,7 +2749,8 @@ static int SQLITE_TCLAPI DbObjCmd( }else{ pDb->zProfile = 0; } -#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) +#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) && \ + !defined(SQLITE_OMIT_DEPRECATED) if( pDb->zProfile ){ pDb->interp = interp; sqlite3_profile(pDb->db, DbProfileHandler, pDb); @@ -2934,8 +2937,8 @@ static int SQLITE_TCLAPI DbObjCmd( }else{ pDb->zTrace = 0; } -#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) \ - && !defined(SQLITE_OMIT_DEPRECATED) +#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) && \ + !defined(SQLITE_OMIT_DEPRECATED) if( pDb->zTrace ){ pDb->interp = interp; sqlite3_trace(pDb->db, DbTraceHandler, pDb); diff --git a/src/test3.c b/src/test3.c index 6995684c2..6b4bfedbd 100644 --- a/src/test3.c +++ b/src/test3.c @@ -253,7 +253,6 @@ static int SQLITE_TCLAPI btree_close_cursor( const char **argv /* Text of each argument */ ){ BtCursor *pCur; - Btree *pBt; int rc; if( argc!=2 ){ @@ -262,12 +261,18 @@ static int SQLITE_TCLAPI btree_close_cursor( return TCL_ERROR; } pCur = sqlite3TestTextToPtr(argv[1]); - pBt = pCur->pBtree; - sqlite3_mutex_enter(pBt->db->mutex); - sqlite3BtreeEnter(pBt); +#if SQLITE_THREADSAFE>0 + { + Btree *pBt = pCur->pBtree; + sqlite3_mutex_enter(pBt->db->mutex); + sqlite3BtreeEnter(pBt); + rc = sqlite3BtreeCloseCursor(pCur); + sqlite3BtreeLeave(pBt); + sqlite3_mutex_leave(pBt->db->mutex); + } +#else rc = sqlite3BtreeCloseCursor(pCur); - sqlite3BtreeLeave(pBt); - sqlite3_mutex_leave(pBt->db->mutex); +#endif ckfree((char *)pCur); if( rc ){ Tcl_AppendResult(interp, sqlite3ErrName(rc), 0); diff --git a/src/vdbe.c b/src/vdbe.c index 91ff5bc90..63b78697a 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -3877,7 +3877,7 @@ case OP_SeekGT: { /* jump, in3 */ #ifdef SQLITE_DEBUG { int i; for(i=0; i<r.nField; i++) assert( memIsValid(&r.aMem[i]) ); } #endif - ExpandBlob(r.aMem); + (void)ExpandBlob(r.aMem); r.eqSeen = 0; rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, &r, 0, 0, &res); if( rc!=SQLITE_OK ){ @@ -4020,7 +4020,7 @@ case OP_Found: { /* jump, in3 */ r.aMem = pIn3; for(ii=0; ii<r.nField; ii++){ assert( memIsValid(&r.aMem[ii]) ); - ExpandBlob(&r.aMem[ii]); + (void)ExpandBlob(&r.aMem[ii]); #ifdef SQLITE_DEBUG if( ii ) REGISTER_TRACE(pOp->p3+ii, &r.aMem[ii]); #endif @@ -4032,7 +4032,7 @@ case OP_Found: { /* jump, in3 */ ); if( pIdxKey==0 ) goto no_mem; assert( pIn3->flags & MEM_Blob ); - ExpandBlob(pIn3); + (void)ExpandBlob(pIn3); sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey); } pIdxKey->default_rc = 0; diff --git a/src/vdbemem.c b/src/vdbemem.c index 1a41ec0f1..ca6e480d1 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -192,7 +192,7 @@ int sqlite3VdbeMemMakeWriteable(Mem *pMem){ int f; assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); assert( (pMem->flags&MEM_RowSet)==0 ); - ExpandBlob(pMem); + (void)ExpandBlob(pMem); f = pMem->flags; if( (f&(MEM_Str|MEM_Blob)) && (pMem->szMalloc==0 || pMem->z!=pMem->zMalloc) ){ if( sqlite3VdbeMemGrow(pMem, pMem->n + 2, 1) ){ |