Changes to test_intarray.c so that it build with SQLITE_OMIT_VIRTUALTABLE.

Added testcase() macros to expr.c.

FossilOrigin-Name: f0599d28fabe9e67a7150a91c266cb7655a2002e
This commit is contained in:
drh 2009-11-13 15:03:59 +00:00
parent 91fc4a0c4d
commit 5c03f30a9a
4 changed files with 23 additions and 14 deletions

View File

@ -1,8 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C Shift\smore\sOP_Found\sopcodes\sover\sto\susing\sthe\sunpacked\sformat,\sfor\simproved\nperformance.
D 2009-11-12T20:39:03
C Changes\sto\stest_intarray.c\sso\sthat\sit\sbuild\swith\sSQLITE_OMIT_VIRTUALTABLE.\nAdded\stestcase()\smacros\sto\sexpr.c.
D 2009-11-13T15:04:00
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 53f3dfa49f28ab5b80cb083fb7c9051e596bcfa1
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -117,7 +117,7 @@ F src/callback.c 908f3e0172c3d4058f4ca0acd42c637c52e9669f
F src/complete.c 77016e5a2766cf8b84381397152d2c99ea4b218f
F src/date.c a79c0a8f219370b972e320741f995a3bef9df33f
F src/delete.c ec04635d152debdab70d4b30c5516b59282075ea
F src/expr.c 33c08bb50674d6b5e4c8100d18c6270e6d07fb14
F src/expr.c 94f3086a342a1d151fb9d17ef1c33bff4cc768f0
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
F src/fkey.c e2116672a6bd610dc888e27df292ebc7999c9bb0
F src/func.c bf54e1202cbfb28bf4b1fd9b58899009ae76716f
@ -190,7 +190,7 @@ F src/test_devsym.c de3c9af2bb9a8b1e44525c449e4ec3f88e3d4110
F src/test_func.c 1c94388a23d4a9e7cd62ec79d612d1bae2451fa2
F src/test_hexio.c 1c0f4238c6fb36c890ce7c07d9c8e1cecedad9ad
F src/test_init.c 5d624ffd0409d424cf9adbfe1f056b200270077c
F src/test_intarray.c c905030e44e192559dba1a5c1e5e3fcbbbe20def
F src/test_intarray.c 25b3df15cca9ddb83927e002f4885d98a63bba0d
F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
F src/test_journal.c adc0ce3840ed19b49feb1d583b2212f560ef7866
F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
@ -771,14 +771,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P b9eab885cd2ca1a1633329e7036c125e8dba62c5
R bfa1e6d0d13eb6efded0b2eed08f59ea
P 6705ab1ad12cbdbbcf1f3e5439a4e6cbdcc421b3
R 113ec7e28504a631fbea880c6edbe4b5
U drh
Z d7c2b8cfb0a9b4cbaabc9813a91bb3c2
Z 55bd08a5e60091a7c6ccfe092d37cd33
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFK/HJqoxKgR168RlERAviFAJ9aMaBxiz20SHBh7VnDB+/x4A0hUQCfQ7jk
jfzZx12yW5yQrNg8aanD/xQ=
=snJx
iD8DBQFK/XVjoxKgR168RlERAkI6AJ92F0IYOBbisAxZZJEawtvMIRZbRwCbBrkq
ORTLeq5KTxD7nLajGv9hog8=
=/pam
-----END PGP SIGNATURE-----

View File

@ -1 +1 @@
6705ab1ad12cbdbbcf1f3e5439a4e6cbdcc421b3
f0599d28fabe9e67a7150a91c266cb7655a2002e

View File

@ -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;
}

View File

@ -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;
}