SQLite

Check-in [091cfe8e0a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Oops - the deephemerialization needs to occur before the move, not after. Was: Rather than try to keep track of the parent of an ephermeral register when the register moves, just deephemeralize all registers touched by the OP_Move opcode.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | mistake
Files: files | file ages | folders
SHA1: 091cfe8e0a89c64f5a63c3d3b375479eb10c5cda
User & Date: drh 2015-04-28 13:11:52.720
Original Comment: Rather than try to keep track of the parent of an ephermeral register when the register moves, just deephemeralize all registers touched by the OP_Move opcode.
Context
2015-04-28
13:11
Oops - the deephemerialization needs to occur before the move, not after. Was: Rather than try to keep track of the parent of an ephermeral register when the register moves, just deephemeralize all registers touched by the OP_Move opcode. (Closed-Leaf check-in: 091cfe8e0a user: drh tags: mistake)
12:44
Shift the Mem.pScopyFrom pointer in the correct direction in OP_Move. Fix for a defective check-in [a2135ad13049] and ticket [d6352363751]. Debugging code only - does not affect normal operation. (check-in: add4e043b3 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbe.c.
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
  pOut = &aMem[p2];
  do{
    assert( pOut<=&aMem[(p->nMem-p->nCursor)] );
    assert( pIn1<=&aMem[(p->nMem-p->nCursor)] );
    assert( memIsValid(pIn1) );
    memAboutToChange(p, pOut);
    sqlite3VdbeMemMove(pOut, pIn1);
#ifdef SQLITE_DEBUG
    if( pOut->pScopyFrom>=&aMem[p1] && pOut->pScopyFrom<&aMem[p1+pOp->p3] ){
      pOut->pScopyFrom += pOp->p2 - p1;
    }
#endif
    REGISTER_TRACE(p2++, pOut);
    pIn1++;
    pOut++;
  }while( --n );
  break;
}








<
<
|
<
<







1200
1201
1202
1203
1204
1205
1206


1207


1208
1209
1210
1211
1212
1213
1214
  pOut = &aMem[p2];
  do{
    assert( pOut<=&aMem[(p->nMem-p->nCursor)] );
    assert( pIn1<=&aMem[(p->nMem-p->nCursor)] );
    assert( memIsValid(pIn1) );
    memAboutToChange(p, pOut);
    sqlite3VdbeMemMove(pOut, pIn1);


    Deephemeralize(pOut);


    REGISTER_TRACE(p2++, pOut);
    pIn1++;
    pOut++;
  }while( --n );
  break;
}