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

Fix sqlite3VdbeMakeWritable() to always clear the MEM_Ephem flag.

Change the OP_Move opcode to always deephemeralize moved content.

FossilOrigin-Name: fbb06727181eac1470b2dd458d2d159146439d21
This commit is contained in:
drh
2015-04-28 14:00:02 +00:00
parent 5fb71254e4
commit bd6789e761
4 changed files with 14 additions and 12 deletions

View File

@@ -1205,10 +1205,11 @@ case OP_Move: {
memAboutToChange(p, pOut);
sqlite3VdbeMemMove(pOut, pIn1);
#ifdef SQLITE_DEBUG
if( pOut->pScopyFrom>=&aMem[p1] && pOut->pScopyFrom<&aMem[p1+pOp->p3] ){
if( pOut->pScopyFrom>=&aMem[p1] && pOut->pScopyFrom<pOut ){
pOut->pScopyFrom += pOp->p2 - p1;
}
#endif
Deephemeralize(pOut);
REGISTER_TRACE(p2++, pOut);
pIn1++;
pOut++;