1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

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
This commit is contained in:
drh
2019-12-31 12:18:24 +00:00
parent 70d6b8327a
commit 02ff747bc0
4 changed files with 27 additions and 11 deletions

View File

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