diff --git a/manifest b/manifest index cff3de8ab8..5e53a6616b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Added\sIFNULL\sand\sNVL\sfunctions.\s(CVS\s401) -D 2002-02-28T00:46:26 +C Fix\sthe\scoredump.\s\sThere\sare\sstill\sproblems\sin\sthe\stest\ssuite\sthough.\s(CVS\s402) +D 2002-02-28T01:46:12 F Makefile.in 50f1b3351df109b5774771350d8c1b8d3640130d F Makefile.template 89e373b2dad0321df00400fa968dc14b61a03296 F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0 @@ -23,8 +23,8 @@ F src/btree.c 495275fe14f3b718cf2f691dce979d4c0e1f8e5d F src/btree.h 8abeabfe6e0b1a990b64fa457592a6482f6674f3 F src/build.c 7ada2426caba70cb1072ba268bedb694b5018065 F src/delete.c 950d8f9097361419f1963875f9943344b469cf02 -F src/expr.c 32a2b5826b892a61e153df0ff5778e01d1ba9ad9 -F src/func.c 7bfb8a2068cc5e8bed64a3eaf8521448e05371cc +F src/expr.c 173965f4d1ef4469ae3aa83b1240f7cb8d2a3846 +F src/func.c 2a607655d2aa8f1cb2179964c9ded3bbeab6b683 F src/hash.c cc259475e358baaf299b00a2c7370f2b03dda892 F src/hash.h dca065dda89d4575f3176e75e9a3dc0f4b4fb8b9 F src/insert.c 164d2d5e943268a8ff0594e1947599e04df0ce11 @@ -37,7 +37,7 @@ F src/pager.h b28f004e2f5541dc60cc32db01bf80cf4d056283 F src/parse.y fc460cda6f475beae963c7f9c737cf13f44f3420 F src/printf.c 300a90554345751f26e1fc0c0333b90a66110a1d F src/random.c 19e8e00fe0df32a742f115773f57651be327cabe -F src/select.c 0aeaf678ba3621b0bb11c220892321d29cfe15aa +F src/select.c 1851abd794ad81639bb7d8ac4b24c8c70cd0ec17 F src/shell.c 9f8249ca5b8f8aad40becd778c151b58c0d6109e F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e F src/sqlite.h.in a9b5772604265f98f3120573ef29e37b9d917216 @@ -51,7 +51,7 @@ F src/threadtest.c 81f0598e0f031c1bd506af337fdc1b7e8dff263f F src/tokenize.c 4b5d30590a744b9bb5605a92d1f620ab2e7e75af F src/update.c 18971d265b0341574b7e3f73116e7947ddab0997 F src/util.c 1c01f0a54a77ae9fb638d026d18093ee1b61e3b3 -F src/vdbe.c 1c16db3ba6222e3ae04cf4461305c6828ff6d018 +F src/vdbe.c b7dda08abdcdbdb4996fc58e702f2ac140c4433e F src/vdbe.h 8ab845e63e196e8eb5e51ce69f43b233e51db07e F src/where.c 664be01b0ce9ffaecbde609afbd4d8d3e5ed1585 F test/all.test 7a8a8a7a579ed2bb4d8976d55402f21eacd58049 @@ -127,7 +127,7 @@ F www/speed.tcl 83457b2bf6bb430900bd48ca3dd98264d9a916a5 F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279 F www/tclsqlite.tcl 829b393d1ab187fd7a5e978631b3429318885c49 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218 -P 50797fee5066ec9ea23b720e5ab7e8fc8ccc1988 -R ce3267187f04fb6cf19d5ce1ab432374 +P c6a85c8ee3d653a294bcc033ac6cab2b6de06f96 +R 04a7bbe2baff580acccc1436b54d7bc7 U drh -Z b311912d740a382c290a6410e1cb599f +Z ca8712c82e6c361edcb455161975de2d diff --git a/manifest.uuid b/manifest.uuid index 09592c194d..5fde4ea332 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c6a85c8ee3d653a294bcc033ac6cab2b6de06f96 \ No newline at end of file +6af10cc53acc1ffa60de3f0d5880a6b72815404c \ No newline at end of file diff --git a/src/expr.c b/src/expr.c index ccfc6833d9..48885eac01 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.49 2002/02/28 00:41:10 drh Exp $ +** $Id: expr.c,v 1.50 2002/02/28 01:46:12 drh Exp $ */ #include "sqliteInt.h" @@ -1180,7 +1180,8 @@ int sqliteExprAnalyzeAggregates(Parse *pParse, Expr *pExpr){ pParse->aAgg[i].isAgg = 1; pParse->aAgg[i].pExpr = pExpr; pParse->aAgg[i].pFunc = sqliteFindFunction(pParse->db, - pExpr->token.z, pExpr->token.n, pExpr->pList->nExpr, 0); + pExpr->token.z, pExpr->token.n, + pExpr->pList ? pExpr->pList->nExpr : 0, 0); } pExpr->iAgg = i; break; diff --git a/src/func.c b/src/func.c index 0916e480fc..bd0f606a32 100644 --- a/src/func.c +++ b/src/func.c @@ -16,7 +16,7 @@ ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.7 2002/02/28 00:46:26 drh Exp $ +** $Id: func.c,v 1.8 2002/02/28 01:46:13 drh Exp $ */ #include #include @@ -269,9 +269,7 @@ static void countStep(sqlite_func *context, int argc, const char **argv){ static void countFinalize(sqlite_func *context){ CountCtx *p; p = sqlite_aggregate_context(context, sizeof(*p)); - if( p ){ - sqlite_set_result_int(context, p->n); - } + sqlite_set_result_int(context, p ? p->n : 0); } /* diff --git a/src/select.c b/src/select.c index c5f97c0b2e..f71016524e 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.69 2002/02/28 00:41:11 drh Exp $ +** $Id: select.c,v 1.70 2002/02/28 01:46:13 drh Exp $ */ #include "sqliteInt.h" @@ -1271,7 +1271,7 @@ int sqliteSelect( } } sqliteVdbeAddOp(v, OP_Integer, i, 0); - sqliteVdbeAddOp(v, OP_AggFunc, 0, pE->pList->nExpr); + sqliteVdbeAddOp(v, OP_AggFunc, 0, pE->pList ? pE->pList->nExpr : 0); assert( pParse->aAgg[i].pFunc!=0 ); assert( pParse->aAgg[i].pFunc->xStep!=0 ); sqliteVdbeChangeP3(v, -1, (char*)pParse->aAgg[i].pFunc, P3_POINTER); diff --git a/src/vdbe.c b/src/vdbe.c index a65ff35b81..f1a769ca94 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -30,7 +30,7 @@ ** But other routines are also provided to help in building up ** a program instruction by instruction. ** -** $Id: vdbe.c,v 1.126 2002/02/28 00:41:11 drh Exp $ +** $Id: vdbe.c,v 1.127 2002/02/28 01:46:13 drh Exp $ */ #include "sqliteInt.h" #include @@ -4432,7 +4432,7 @@ case OP_AggFunc: { Mem *pMem; sqlite_func ctx; - VERIFY( if( n<=0 ) goto bad_instruction; ) + VERIFY( if( n<0 ) goto bad_instruction; ) VERIFY( if( p->tos+1tos].flags!=STK_Int ) goto bad_instruction; ) for(i=p->tos-n; itos; i++){ @@ -4612,7 +4612,6 @@ case OP_AggNext: { int freeCtx; if( p->agg.apFunc[i]==0 ) continue; if( p->agg.apFunc[i]->xFinalize==0 ) continue; - if( (aMem[i].s.flags & STK_AggCtx)==0 ) continue; ctx.s.flags = STK_Null; ctx.z = 0; ctx.pAgg = (void*)aMem[i].z;