aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 8785e3b56..275ba6f77 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -1156,6 +1156,22 @@ void sqlite3VdbeChangeP5(Vdbe *p, u16 p5){
}
/*
+** If the previous opcode is an OP_Column that delivers results
+** into register iDest, then add the OPFLAG_TYPEOF flag to that
+** opcode.
+*/
+void sqlite3VdbeTypeofColumn(Vdbe *p, int iDest){
+ if( p->nOp>0 ){
+ VdbeOp *pOp = &p->aOp[p->nOp-1];
+ if( pOp->opcode==OP_Column && pOp->p3==iDest ){
+ pOp->p5 |= OPFLAG_TYPEOFARG;
+ }
+ }else{
+ assert( p->db->mallocFailed );
+ }
+}
+
+/*
** Change the P2 operand of instruction addr so that it points to
** the address of the next instruction to be coded.
*/