Changes to give a warning-free build with SQLITE_OMIT_INCRBLOB and
SQLITE_OMIT_SHARED_CACHE. FossilOrigin-Name: 711c59171b22df04224183a713e6c36e0bb3bba8
This commit is contained in:
@@ -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);
|
||||
|
||||
+8
-5
@@ -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);
|
||||
|
||||
+11
-6
@@ -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);
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
+1
-1
@@ -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) ){
|
||||
|
||||
Reference in New Issue
Block a user