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:
@@ -508,9 +508,7 @@ void sqlite3GenerateRowDelete(
|
||||
sqlite3VdbeAddOp2(v, OP_Copy, iRowid, iOld);
|
||||
for(iCol=0; iCol<pTab->nCol; iCol++){
|
||||
if( mask==0xffffffff || mask&(1<<iCol) ){
|
||||
int iTarget = iOld + iCol + 1;
|
||||
sqlite3VdbeAddOp3(v, OP_Column, iCur, iCol, iTarget);
|
||||
sqlite3ColumnDefault(v, pTab, iCol, iTarget);
|
||||
sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, iCol, iOld+iCol+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user