mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-06 15:49:35 +03:00
Make sure the value of an INTEGER PRIMARY KEY column supplied to triggers
and especially to FK constraints really contains the ROWID and not the NULL that is stored in the column itself. Ticket [dd08e5a988d00dec]. FossilOrigin-Name: 636f86095eb1f4bdcfb0c9ed846c4c6b3589c10b
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
** May you find forgiveness for yourself and forgive others.
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
sqlite*************************************************************************
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle UPDATE statements.
|
||||
*/
|
||||
@@ -396,8 +396,7 @@ void sqlite3Update(
|
||||
);
|
||||
for(i=0; i<pTab->nCol; i++){
|
||||
if( aXRef[i]<0 || oldmask==0xffffffff || (oldmask & (1<<i)) ){
|
||||
sqlite3VdbeAddOp3(v, OP_Column, iCur, i, regOld+i);
|
||||
sqlite3ColumnDefault(v, pTab, i, regOld+i);
|
||||
sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOld+i);
|
||||
}else{
|
||||
sqlite3VdbeAddOp2(v, OP_Null, 0, regOld+i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user