Changes to support building with various SQLITE_OMIT_XXX options defined.

FossilOrigin-Name: 2039ed952a02bdcd4fc6d2e20572c4632084dcdb
This commit is contained in:
dan
2011-04-06 17:54:31 +00:00
parent 6d59c2c1c2
commit bb2b441867
7 changed files with 75 additions and 53 deletions
+1 -1
View File
@@ -2127,7 +2127,6 @@ int sqlite3BtreeSyncDisabled(Btree *p){
return rc;
}
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
/*
** Change the default pages size and the number of reserved bytes per page.
** Or, if the page size has already been fixed, return SQLITE_READONLY
@@ -2182,6 +2181,7 @@ int sqlite3BtreeGetPageSize(Btree *p){
return p->pBt->pageSize;
}
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
/*
** Return the number of bytes of space at the end of every page that
** are intentually left unused. This is the "reserved" space that is
+5
View File
@@ -71,6 +71,11 @@
# define sqlite3_complete16 0
#endif
#ifdef SQLITE_OMIT_DECLTYPE
# define sqlite3_column_decltype16 0
# define sqlite3_column_decltype 0
#endif
#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
# define sqlite3_progress_handler 0
#endif
+16 -12
View File
@@ -806,6 +806,22 @@ static void explainTempTable(Parse *pParse, const char *zUsage){
}
}
/*
** Assign expression b to lvalue a. A second, no-op, version of this macro
** is provided when SQLITE_OMIT_EXPLAIN is defined. This allows the code
** in sqlite3Select() to assign values to structure member variables that
** only exist if SQLITE_OMIT_EXPLAIN is not defined without polluting the
** code with #ifndef directives.
*/
# define explainSetInteger(a, b) a = b
#else
/* No-op versions of the explainXXX() functions and macros. */
# define explainTempTable(y,z)
# define explainSetInteger(y,z)
#endif
#if !defined(SQLITE_OMIT_EXPLAIN) && !defined(SQLITE_OMIT_COMPOUND_SELECT)
/*
** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
** is a no-op. Otherwise, it adds a single row of output to the EQP result,
@@ -837,21 +853,9 @@ static void explainComposite(
sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
}
}
/*
** Assign expression b to lvalue a. A second, no-op, version of this macro
** is provided when SQLITE_OMIT_EXPLAIN is defined. This allows the code
** in sqlite3Select() to assign values to structure member variables that
** only exist if SQLITE_OMIT_EXPLAIN is not defined without polluting the
** code with #ifndef directives.
*/
# define explainSetInteger(a, b) a = b
#else
/* No-op versions of the explainXXX() functions and macros. */
# define explainTempTable(y,z)
# define explainComposite(v,w,x,y,z)
# define explainSetInteger(y,z)
#endif
/*
-1
View File
@@ -453,7 +453,6 @@ void *sqlite3_server(void *NotUsed){
pthread_mutex_unlock(&pMsg->clientMutex);
pthread_cond_signal(&pMsg->clientWakeup);
}
sqlite3_thread_cleanup();
pthread_mutex_unlock(&g.serverMutex);
return 0;
}