1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Avoid the use of statement journals on DELETEs of a single row without

triggers or foreign keys.

FossilOrigin-Name: 20bf5800808ea02b2aa4bf01a380926784c0e7514a2c73ca303cac1f5c732ae0
This commit is contained in:
drh
2018-04-20 19:46:52 +00:00
parent ac9151d848
commit 7c48360d7c
3 changed files with 9 additions and 8 deletions

View File

@@ -343,7 +343,7 @@ void sqlite3DeleteFrom(
goto delete_from_cleanup;
}
if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
sqlite3BeginWriteOperation(pParse, 1, iDb);
sqlite3BeginWriteOperation(pParse, bComplex, iDb);
/* If we are trying to delete from a view, realize that view into
** an ephemeral table.
@@ -447,6 +447,7 @@ void sqlite3DeleteFrom(
eOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);
assert( IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI );
assert( IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF );
if( eOnePass!=ONEPASS_SINGLE ) sqlite3MultiWrite(pParse);
/* Keep track of the number of rows to be deleted */
if( memCnt ){