diff options
author | drh <drh@noemail.net> | 2009-11-13 15:03:59 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2009-11-13 15:03:59 +0000 |
commit | 5c03f30a9ae286fdb296c6c78ce52239f531539a (patch) | |
tree | 367d2cd13b4e4812e928c069b431020eb49ddfd1 /src | |
parent | 91fc4a0c4ddda097fb9704d9414717cdfbf01272 (diff) | |
download | sqlite-5c03f30a9ae286fdb296c6c78ce52239f531539a.tar.gz sqlite-5c03f30a9ae286fdb296c6c78ce52239f531539a.zip |
Changes to test_intarray.c so that it build with SQLITE_OMIT_VIRTUALTABLE.
Added testcase() macros to expr.c.
FossilOrigin-Name: f0599d28fabe9e67a7150a91c266cb7655a2002e
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 3 | ||||
-rw-r--r-- | src/test_intarray.c | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c index a50348f2d..a5e5edd32 100644 --- a/src/expr.c +++ b/src/expr.c @@ -3192,6 +3192,7 @@ void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){ break; } case TK_BETWEEN: { + testcase( jumpIfNull==0 ); exprCodeBetween(pParse, pExpr, dest, 1, jumpIfNull); break; } @@ -3284,6 +3285,7 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){ break; } case TK_NOT: { + testcase( jumpIfNull==0 ); sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull); break; } @@ -3331,6 +3333,7 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){ break; } case TK_BETWEEN: { + testcase( jumpIfNull==0 ); exprCodeBetween(pParse, pExpr, dest, 0, jumpIfNull); break; } diff --git a/src/test_intarray.c b/src/test_intarray.c index 438596fe8..212481b41 100644 --- a/src/test_intarray.c +++ b/src/test_intarray.c @@ -221,7 +221,8 @@ int sqlite3_intarray_create( const char *zName, sqlite3_intarray **ppReturn ){ - int rc; + int rc = SQLITE_OK; +#ifndef SQLITE_OMIT_VIRTUALTABLE sqlite3_intarray *p; *ppReturn = p = sqlite3_malloc( sizeof(*p) ); @@ -238,6 +239,7 @@ int sqlite3_intarray_create( rc = sqlite3_exec(db, zSql, 0, 0, 0); sqlite3_free(zSql); } +#endif return rc; } @@ -293,7 +295,7 @@ static int test_intarray_create( sqlite3 *db; const char *zName; sqlite3_intarray *pArray; - int rc; + int rc = SQLITE_OK; char zPtr[100]; if( objc!=3 ){ @@ -302,7 +304,9 @@ static int test_intarray_create( } if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR; zName = Tcl_GetString(objv[2]); +#ifndef SQLITE_OMIT_VIRTUALTABLE rc = sqlite3_intarray_create(db, zName, &pArray); +#endif if( rc!=SQLITE_OK ){ assert( pArray==0 ); Tcl_AppendResult(interp, sqlite3TestErrorName(rc), (char*)0); @@ -325,7 +329,7 @@ static int test_intarray_bind( Tcl_Obj *CONST objv[] /* Command arguments */ ){ sqlite3_intarray *pArray; - int rc; + int rc = SQLITE_OK; int i, n; sqlite3_int64 *a; @@ -335,6 +339,7 @@ static int test_intarray_bind( } pArray = (sqlite3_intarray*)sqlite3TestTextToPtr(Tcl_GetString(objv[1])); n = objc - 2; +#ifndef SQLITE_OMIT_VIRTUALTABLE a = sqlite3_malloc( sizeof(a[0])*n ); if( a==0 ){ Tcl_AppendResult(interp, "SQLITE_NOMEM", (char*)0); @@ -349,6 +354,7 @@ static int test_intarray_bind( Tcl_AppendResult(interp, sqlite3TestErrorName(rc), (char*)0); return TCL_ERROR; } +#endif return TCL_OK; } |