diff options
author | drh <drh@noemail.net> | 2019-12-31 12:18:24 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-12-31 12:18:24 +0000 |
commit | 02ff747bc0a6039cddf6108719426d247026fa18 (patch) | |
tree | e287f4fc8085bef492f152c8c05a32b64133b91a /src | |
parent | 70d6b8327a70a34644a65e9c2166d35a24787b4f (diff) | |
download | sqlite-02ff747bc0a6039cddf6108719426d247026fa18.tar.gz sqlite-02ff747bc0a6039cddf6108719426d247026fa18.zip |
The OP_ResultRow opcode releases the SCopy dependences on all its registers,
as the values in those registers will not be reused.
FossilOrigin-Name: 1dc83c5d54ca2890112e735e336c209adb8d067d2f647e9f8ae5d58f84a52461
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index 40e022d62..cc999a3eb 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -1477,6 +1477,14 @@ case OP_ResultRow: { || (pMem[i].flags & (MEM_Str|MEM_Blob))==0 ); sqlite3VdbeMemNulTerminate(&pMem[i]); REGISTER_TRACE(pOp->p1+i, &pMem[i]); +#ifdef SQLITE_DEBUG + /* The registers in the result will not be used again when the + ** prepared statement restarts. This is because sqlite3_column() + ** APIs might have caused type conversions of made other changes to + ** the register values. Therefore, we can go ahead and break any + ** OP_SCopy dependencies. */ + pMem[i].pScopyFrom = 0; +#endif } if( db->mallocFailed ) goto no_mem; @@ -1484,6 +1492,7 @@ case OP_ResultRow: { db->xTrace(SQLITE_TRACE_ROW, db->pTraceArg, p, 0); } + /* Return SQLITE_ROW */ p->pc = (int)(pOp - aOp) + 1; |