mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Do not require a statement journal in cases where REPLACE conflict handling is
used to insert a single row, so long as the REPLACE operation cannot fire any triggers or foreign key actions. FossilOrigin-Name: 469a62ca33081854e54f3af6d93ab5a350484b149c8c8c4ee8be0ae5418382d9
This commit is contained in:
@@ -1830,10 +1830,12 @@ void sqlite3GenerateConstraintChecks(
|
||||
default: {
|
||||
Trigger *pTrigger = 0;
|
||||
assert( onError==OE_Replace );
|
||||
sqlite3MultiWrite(pParse);
|
||||
if( db->flags&SQLITE_RecTriggers ){
|
||||
pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
|
||||
}
|
||||
if( pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0) ){
|
||||
sqlite3MultiWrite(pParse);
|
||||
}
|
||||
sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
|
||||
regR, nPkField, 0, OE_Replace,
|
||||
(pIdx==pPk ? ONEPASS_SINGLE : ONEPASS_OFF), iThisCur);
|
||||
|
||||
Reference in New Issue
Block a user