aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-09-15 13:42:16 +0000
committerdrh <drh@noemail.net>2015-09-15 13:42:16 +0000
commitb77ebd828bb75e0cf21c2f149fb84024bd6b5f3a (patch)
treeb673a68d1e173a4040fae1791d0f534bb1074012 /src/insert.c
parent128ea696eac4dc6619820b0386f7fd226b96eeec (diff)
downloadsqlite-b77ebd828bb75e0cf21c2f149fb84024bd6b5f3a.tar.gz
sqlite-b77ebd828bb75e0cf21c2f149fb84024bd6b5f3a.zip
Reformat some code to make it easier to merge with sessions. No logic changes.
FossilOrigin-Name: eade355fafec558fc13dc4b08ca0b07713a2cd84
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/insert.c b/src/insert.c
index 613277835..53b429c1f 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1349,9 +1349,11 @@ void sqlite3GenerateConstraintChecks(
sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
regNewData, 1, 0, OE_Replace,
ONEPASS_SINGLE, -1);
- }else if( pTab->pIndex ){
- sqlite3MultiWrite(pParse);
- sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, 0, -1);
+ }else{
+ if( pTab->pIndex ){
+ sqlite3MultiWrite(pParse);
+ sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,-1);
+ }
}
seenReplace = 1;
break;