diff options
author | drh <drh@noemail.net> | 2006-03-15 22:44:36 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-03-15 22:44:36 +0000 |
commit | fd2d26bb7debc8719d3958792adb59070febdbc3 (patch) | |
tree | b8f5f5f9139187cfc2bdf1123562499802db2708 /src/vdbeaux.c | |
parent | aa01c7e2cdaaf096298a01ebdb8071142c365a4b (diff) | |
download | sqlite-fd2d26bb7debc8719d3958792adb59070febdbc3.tar.gz sqlite-fd2d26bb7debc8719d3958792adb59070febdbc3.zip |
Performance improvement in sqlite3VdbeAddOp(). (CVS 3138)
FossilOrigin-Name: 6bcbe8fcad35de6e9b90e7776bd262fdf7cbc28e
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 1766c4527..4214352db 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -107,9 +107,11 @@ int sqlite3VdbeAddOp(Vdbe *p, int op, int p1, int p2){ i = p->nOp; p->nOp++; assert( p->magic==VDBE_MAGIC_INIT ); - resizeOpArray(p, i+1); - if( sqlite3MallocFailed() ){ - return 0; + if( p->nOpAlloc<=i ){ + resizeOpArray(p, i+1); + if( sqlite3MallocFailed() ){ + return 0; + } } pOp = &p->aOp[i]; pOp->opcode = op; |