-C Change\sall\sinstances\sof\s"it's"\sin\scomments\sto\seither\s"its"\sor\s"it\sis",\nas\sappropriate,\sin\scase\sthe\scomments\sare\sever\sagain\sread\sby\sa\spedantic\ngrammarian.\s\sTicket\s#2840.\s(CVS\s4629)
-D 2007-12-13T21:54:10
+C Fix\san\sout-of-memory\sNULL\spointer\sdefer\sin\sthe\scode\sgenerator.\s\sTicket\s#2843.\s(CVS\s4630)
+D 2007-12-14T15:12:21
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in e66cf1239b8009b073156b36f92e68657d4755da
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/date.c 49c5a6d2de6c12000905b4d36868b07d3011bbf6
F src/delete.c 1f957c4acb2270772c6fab8411459e7dd43d585f
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
-F src/expr.c 045ba74471616f5d619ae95194cb4b9cbbe36cee
+F src/expr.c 43807e139e14957330095d9ac183f7ad449ce907
F src/func.c 996071cf0af9d967e58b69fce1909555059ebc7d
F src/hash.c 45a7005aac044b6c86bd7e49c44bc15d30006d6c
F src/hash.h 031cd9f915aff27e12262cb9eb570ac1b8326b53
-F src/insert.c c7e1867a6a162c074d47786f1f0152b9583e8c01
+F src/insert.c dc29839e489fcbef57f05a7df20b5178ede87988
F src/journal.c 807bed7a158979ac8d63953e1774e8d85bff65e2
F src/legacy.c 4ac53191fad2e3c4d59bde1228879b2dc5a96d66
F src/limits.h 71ab25f17e35e0a9f3f6f234b8ed49cc56731d35
F test/mallocC.test 6f02fa2b4baa943bc6d6db323d5d07067967e728
F test/mallocD.test d638fb8f214b47fd31edfae8af738b92bd943dc0
F test/mallocE.test e15333c394d7c330c8372a7cdf7b0f7c16573082
-F test/mallocF.test 249860dd3357fe37855f8b86e105953457795e24
+F test/mallocF.test e1804792a6365ad43589b26608850a38e491170a
F test/malloc_common.tcl b47137fb36e95fdafb0267745afefcd6b0a5b9dc
F test/manydb.test 8de36b8d33aab5ef295b11d9e95310aeded31af8
F test/memdb.test a67bda4ff90a38f2b19f6c7f95aa7289e051d893
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 993a213024964f4411a9c25c10810543c8089d07
-R 22708bddd0f834ba6f15107d672277c5
+P 4e91a267febda572e7239f0f1cc66b3102558c36
+R 54e75e21053846fd523e8fe53c1b5635
U drh
-Z 2dc3963a41d285ba0556b60d69ae1106
+Z d37be7f202b08432b08e54bc9d000878
-4e91a267febda572e7239f0f1cc66b3102558c36
\ No newline at end of file
+b821b6ed176b4259e1d4b56c8eb548933b6f530a
\ No newline at end of file
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.319 2007/12/13 21:54:11 drh Exp $
+** $Id: expr.c,v 1.320 2007/12/14 15:12:21 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
*/
void sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr){
Vdbe *v = pParse->pVdbe;
+ VdbeOp *pOp;
int iMem;
int addr1, addr2;
if( v==0 ) return;
addr1 = sqlite3VdbeCurrentAddr(v);
sqlite3ExprCode(pParse, pExpr);
addr2 = sqlite3VdbeCurrentAddr(v);
- if( addr2>addr1+1 || sqlite3VdbeGetOp(v, addr1)->opcode==OP_Function ){
+ if( addr2>addr1+1
+ || ((pOp = sqlite3VdbeGetOp(v, addr1))!=0 && pOp->opcode==OP_Function) ){
iMem = pExpr->iTable = pParse->nMem++;
sqlite3VdbeAddOp(v, OP_MemStore, iMem, 0);
pExpr->op = TK_REGISTER;
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
-** $Id: insert.c,v 1.195 2007/12/12 17:42:53 danielk1977 Exp $
+** $Id: insert.c,v 1.196 2007/12/14 15:12:21 drh Exp $
*/
#include "sqliteInt.h"
int iEnd = sqlite3VdbeCurrentAddr(v);
for(i=iStartAddr; i<iEnd; i++){
VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
+ assert( pOp==0 );
if( pOp->opcode==OP_OpenRead ){
VdbeOp *pPrior = &pOp[-1];
int tnum = pOp->p2;
# This test script checks that tickets #2794, #2795, #2796, and #2797
# have been fixed.
#
-# $Id: mallocF.test,v 1.1 2007/11/26 13:36:00 drh Exp $
+# $Id: mallocF.test,v 1.2 2007/12/14 15:12:21 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
SELECT x FROM t1 WHERE y BETWEEN 10 AND 29
}
+# Ticket #2843
+#
+set PREP {
+ CREATE TABLE t1(x);
+ CREATE TRIGGER r1 BEFORE INSERT ON t1 BEGIN
+ SELECT 'hello';
+ END;
+}
+do_malloc_test mallocF-4 -sqlprep $PREP -sqlbody {
+ INSERT INTO t1 VALUES(random());
+}
+
finish_test