diff options
author | drh <drh@noemail.net> | 2016-12-07 20:09:51 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-12-07 20:09:51 +0000 |
commit | bdaa1ee2ee41dddd318b289450cfc7aafa3bf34c (patch) | |
tree | ff13311ad880b1cfc6e54874fa5339b3eaefa888 /src/vdbeaux.c | |
parent | 4ed8c83cfd08fec21b672bcc2fd6e81323975c49 (diff) | |
download | sqlite-bdaa1ee2ee41dddd318b289450cfc7aafa3bf34c.tar.gz sqlite-bdaa1ee2ee41dddd318b289450cfc7aafa3bf34c.zip |
Performance optimization for sqlite3VdbeAddOp4().
FossilOrigin-Name: 04716c907bf9fc9b827e18fdc7b4e1069e201536
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 308d96917..04dc9599f 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -313,7 +313,11 @@ int sqlite3VdbeAddOp4Int( int p4 /* The P4 operand as an integer */ ){ int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3); - sqlite3VdbeChangeP4(p, addr, SQLITE_INT_TO_PTR(p4), P4_INT32); + if( p->db->mallocFailed==0 ){ + VdbeOp *pOp = &p->aOp[addr]; + pOp->p4type = P4_INT32; + pOp->p4.i = p4; + } return addr; } |