Make sure code *compiles* with each OMIT and ENABLE option. Mostly changes to test modules.

FossilOrigin-Name: 7cc515edc9cade2bc6c74699b3e4153bf2b74ebb
This commit is contained in:
shaneh
2011-02-09 19:55:20 +00:00
parent ecac670a8b
commit bb201344cf
10 changed files with 163 additions and 83 deletions
+4
View File
@@ -3251,6 +3251,7 @@ void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
exprCodeBetween(pParse, pExpr, dest, 1, jumpIfNull);
break;
}
#ifndef SQLITE_OMIT_SUBQUERY
case TK_IN: {
int destIfFalse = sqlite3VdbeMakeLabel(v);
int destIfNull = jumpIfNull ? dest : destIfFalse;
@@ -3259,6 +3260,7 @@ void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
sqlite3VdbeResolveLabel(v, destIfFalse);
break;
}
#endif
default: {
r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
sqlite3VdbeAddOp3(v, OP_If, r1, dest, jumpIfNull!=0);
@@ -3392,6 +3394,7 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
exprCodeBetween(pParse, pExpr, dest, 0, jumpIfNull);
break;
}
#ifndef SQLITE_OMIT_SUBQUERY
case TK_IN: {
if( jumpIfNull ){
sqlite3ExprCodeIN(pParse, pExpr, dest, dest);
@@ -3402,6 +3405,7 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
}
break;
}
#endif
default: {
r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
sqlite3VdbeAddOp3(v, OP_IfNot, r1, dest, jumpIfNull!=0);
+2 -2
View File
@@ -2468,7 +2468,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
}else{
pDb->zProfile = 0;
}
#ifndef SQLITE_OMIT_TRACE
#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT)
if( pDb->zProfile ){
pDb->interp = interp;
sqlite3_profile(pDb->db, DbProfileHandler, pDb);
@@ -2652,7 +2652,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
}else{
pDb->zTrace = 0;
}
#ifndef SQLITE_OMIT_TRACE
#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT)
if( pDb->zTrace ){
pDb->interp = interp;
sqlite3_trace(pDb->db, DbTraceHandler, pDb);
+2
View File
@@ -5641,7 +5641,9 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "sqlite3_wal_checkpoint", test_wal_checkpoint, 0 },
{ "sqlite3_wal_checkpoint_v2",test_wal_checkpoint_v2, 0 },
{ "test_sqlite3_log", test_sqlite3_log, 0 },
#ifndef SQLITE_OMIT_EXPLAIN
{ "print_explain_query_plan", test_print_eqp, 0 },
#endif
};
static int bitmask_size = sizeof(Bitmask)*8;
int i;
+5
View File
@@ -149,8 +149,13 @@ static void test_destructor_count(
** arguments. It returns the text value returned by the sqlite3_errmsg16()
** API function.
*/
#ifndef SQLITE_OMIT_BUILTIN_TEST
void sqlite3BeginBenignMalloc(void);
void sqlite3EndBenignMalloc(void);
#else
#define sqlite3BeginBenignMalloc()
#define sqlite3EndBenignMalloc()
#endif
static void test_agg_errmsg16_step(sqlite3_context *a, int b,sqlite3_value **c){
}
static void test_agg_errmsg16_final(sqlite3_context *ctx){
+15 -1
View File
@@ -24,6 +24,20 @@
#include <assert.h>
#include "sqliteInt.h"
/*
** For a build without mutexes, no-op the mutex calls.
*/
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE==0
#define sqlite3_mutex_alloc(X) ((sqlite3_mutex*)8)
#define sqlite3_mutex_free(X)
#define sqlite3_mutex_enter(X)
#define sqlite3_mutex_try(X) SQLITE_OK
#define sqlite3_mutex_leave(X)
#define sqlite3_mutex_held(X) ((void)(X),1)
#define sqlite3_mutex_notheld(X) ((void)(X),1)
#endif /* SQLITE_THREADSAFE==0 */
/************************ Shim Definitions ******************************/
/* This is the limit on the chunk size. It may be changed by calling
@@ -64,7 +78,7 @@ typedef struct multiplexConn multiplexConn;
*/
struct multiplexGroup {
sqlite3_file **pReal; /* Handles to each chunk */
char *bOpen; /* 0 if chunk not opened */
char *bOpen; /* array of bools - 0 if chunk not opened */
char *zName; /* Base filename of this group */
int nName; /* Length of base filename */
int flags; /* Flags used for original opening */