-C Changes\sto\sthe\sbackup\sfunctionality\sso\sthat\sit\sworks\sbetter\swith\scodecs.\s(CVS\s6783)
-D 2009-06-18T20:52:47
+C Make\ssure\sthe\ssqlite3VdbeGetOp()\ssubroutine\sworks\seven\swhen\sSQLite\sis\ncompiled\swith\sSQLITE_OMIT_TRACE.\s(CVS\s6784)
+D 2009-06-19T00:33:32
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c b64129c296e480c2827606e206ea51bb30904626
F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405
-F src/pager.c 4c21c7ac6777cca4efa1855070b099d2f964ec64
+F src/pager.c 3edf86ef797defae17bc32407626ca2ce7442d7b
F src/pager.h 5aec418bf99f568b92ae82816a1463400513726d
F src/parse.y bab89225c2543a350ef96995926520bbbd781aba
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
F src/vdbeInt.h 3727128255a93d116e454f67d4559700f7ae4d6f
F src/vdbeapi.c 619992b16821b989050e8a12e259d795d30731a9
-F src/vdbeaux.c 14e1c6065172530a14648292371ccd3c1ea0d490
+F src/vdbeaux.c 77b6734303c58e36db65f6e63795425546905059
F src/vdbeblob.c c25d7e7bc6d5917feeb17270bd275fa771f26e5c
F src/vdbemem.c ba39c0afa609595c7c23dfc2ac929d9414faa59f
F src/vtab.c 98fbffc5efe68d8107511dec0a650efc7daa9446
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P ed08b53cd64c4ff2c94ef4e48441c5236041c9ca
-R 398bd4d99486dbc4ce2de243d75a2f75
+P 87d6796d986e4d5238252e704d936ab4407a0265
+R a70a1ca61dc3d6f4216d562f52d535d5
U drh
-Z c91ffb1e85d44ff0c9e62c342254c34c
+Z 9502f7414b8e904937dc49dc8f715629
-87d6796d986e4d5238252e704d936ab4407a0265
\ No newline at end of file
+1c8ec2a6e4efbb3fdc58f999b7b725fa5dc4d0e9
\ No newline at end of file
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.595 2009/06/18 20:52:47 drh Exp $
+** @(#) $Id: pager.c,v 1.596 2009/06/19 00:33:32 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
-** $Id: vdbeaux.c,v 1.460 2009/06/09 18:58:53 shane Exp $
+** $Id: vdbeaux.c,v 1.461 2009/06/19 00:33:32 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
** is readable and writable, but it has no effect. The return of a dummy
** opcode allows the call to continue functioning after a OOM fault without
** having to check to see if the return from this routine is a valid pointer.
+**
+** About the #ifdef SQLITE_OMIT_TRACE: Normally, this routine is never called
+** unless p->nOp>0. This is because in the absense of SQLITE_OMIT_TRACE,
+** an OP_Trace instruction is always inserted by sqlite3VdbeGet() as soon as
+** a new VDBE is created. So we are free to set addr to p->nOp-1 without
+** having to double-check to make sure that the result is non-negative. But
+** if SQLITE_OMIT_TRACE is defined, the OP_Trace is omitted and we do need to
+** check the value of p->nOp-1 before continuing.
*/
VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
static VdbeOp dummy;
assert( p->magic==VDBE_MAGIC_INIT );
- if( addr<0 ) addr = p->nOp - 1;
+ if( addr<0 ){
+#ifdef SQLITE_OMIT_TRACE
+ if( p->nOp==0 ) return &dummy;
+#endif
+ addr = p->nOp - 1;
+ }
assert( (addr>=0 && addr<p->nOp) || p->db->mallocFailed );
if( p->db->mallocFailed ){
return &dummy;