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

In the OP_Column opcode, when extracting a field that is past the end of

a short record (because the row was originally inserted prior to ALTER TABLE
ADD COLUMN) then make sure the output register is fully NULL and does not
contain leftover flags (such as MEM_Ephem) from its previous use.
Fix for ticket [43107840f1c02].  This is a cherrypick of
check-in [24780f8ddc1683fc].

FossilOrigin-Name: 304ea6ba6f4cf40a76d32d37af73a253f493ba47
This commit is contained in:
drh
2014-10-29 01:13:58 +00:00
parent 62ecc28caf
commit 739383d25d
4 changed files with 24 additions and 13 deletions

View File

@@ -2441,7 +2441,7 @@ case OP_Column: {
if( pOp->p4type==P4_MEM ){
sqlite3VdbeMemShallowCopy(pDest, pOp->p4.pMem, MEM_Static);
}else{
MemSetTypeFlag(pDest, MEM_Null);
sqlite3VdbeMemSetNull(pDest);
}
goto op_column_out;
}