diff options
author | drh <drh@noemail.net> | 2015-09-15 13:42:16 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-15 13:42:16 +0000 |
commit | b77ebd828bb75e0cf21c2f149fb84024bd6b5f3a (patch) | |
tree | b673a68d1e173a4040fae1791d0f534bb1074012 /src | |
parent | 128ea696eac4dc6619820b0386f7fd226b96eeec (diff) | |
download | sqlite-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')
-rw-r--r-- | src/delete.c | 6 | ||||
-rw-r--r-- | src/insert.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/delete.c b/src/delete.c index 7c2f3fcd0..860b2cf11 100644 --- a/src/delete.c +++ b/src/delete.c @@ -361,7 +361,11 @@ void sqlite3DeleteFrom( ** It is easier just to erase the whole table. Prior to version 3.6.5, ** this optimization caused the row change count (the value returned by ** API function sqlite3_count_changes) to be set incorrectly. */ - if( rcauth==SQLITE_OK && pWhere==0 && !bComplex && !IsVirtual(pTab) ){ + if( rcauth==SQLITE_OK + && pWhere==0 + && !bComplex + && !IsVirtual(pTab) + ){ assert( !isView ); sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName); if( HasRowid(pTab) ){ 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; |