1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Performance improvement in sqlite3VdbeAddOp(). (CVS 3138)

FossilOrigin-Name: 6bcbe8fcad35de6e9b90e7776bd262fdf7cbc28e
This commit is contained in:
drh
2006-03-15 22:44:36 +00:00
parent aa01c7e2cd
commit fd2d26bb7d
3 changed files with 12 additions and 10 deletions

View File

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