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].

FossilOrigin-Name: 24780f8ddc1683fc62180e6961dc6bfe1168f4df
This commit is contained in:
drh
2014-10-29 00:58:38 +00:00
parent aa55563d7e
commit 22e8d833f0
4 changed files with 24 additions and 10 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;
}