aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-11-06 14:05:21 +0000
committerdrh <drh@noemail.net>2013-11-06 14:05:21 +0000
commitd9b7ec93487d8f7a288e20d1ee4f0899f7b57498 (patch)
tree8e5eea74f0e60e8d312e50bf9a8c3a553f88df8a /src
parent416846a3625606374ea42af09bb81161273b895f (diff)
downloadsqlite-d9b7ec93487d8f7a288e20d1ee4f0899f7b57498.tar.gz
sqlite-d9b7ec93487d8f7a288e20d1ee4f0899f7b57498.zip
Minor optimization to the OP_Halt opcode.
FossilOrigin-Name: d70c78814ba565a44628eab61a3a0a5dba56269a
Diffstat (limited to 'src')
-rw-r--r--src/vdbe.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/vdbe.c b/src/vdbe.c
index 602bd1b51..95faaae1b 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -872,22 +872,22 @@ case OP_Halt: {
aMem = p->aMem;
break;
}
- if( pOp->p5 ){
- static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK",
- "FOREIGN KEY" };
- assert( pOp->p5>=1 && pOp->p5<=4 );
- testcase( pOp->p5==1 );
- testcase( pOp->p5==2 );
- testcase( pOp->p5==3 );
- testcase( pOp->p5==4 );
- zType = azType[pOp->p5-1];
- }else{
- zType = 0;
- }
p->rc = pOp->p1;
p->errorAction = (u8)pOp->p2;
p->pc = pc;
if( p->rc ){
+ if( pOp->p5 ){
+ static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK",
+ "FOREIGN KEY" };
+ assert( pOp->p5>=1 && pOp->p5<=4 );
+ testcase( pOp->p5==1 );
+ testcase( pOp->p5==2 );
+ testcase( pOp->p5==3 );
+ testcase( pOp->p5==4 );
+ zType = azType[pOp->p5-1];
+ }else{
+ zType = 0;
+ }
zLogFmt = "abort at %d in [%s]: %s";
if( zType && pOp->p4.z ){
sqlite3SetString(&p->zErrMsg, db, "%s constraint failed: %s",