aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-10-29 00:58:38 +0000
committerdrh <drh@noemail.net>2014-10-29 00:58:38 +0000
commit22e8d833f06835a9ea2cdf7e7d2dd55f79102ce0 (patch)
treead6f6d172c1348ccc06fe9dc5bb0889df1715369 /src
parentaa55563d7eed0ba2e6ab0afd5625b00e30931b1d (diff)
downloadsqlite-22e8d833f06835a9ea2cdf7e7d2dd55f79102ce0.tar.gz
sqlite-22e8d833f06835a9ea2cdf7e7d2dd55f79102ce0.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/vdbe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vdbe.c b/src/vdbe.c
index d256c6b77..c17bfdfe1 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -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;
}