diff options
author | drh <drh@noemail.net> | 2016-02-02 02:22:30 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-02-02 02:22:30 +0000 |
commit | 33c1eb64772caf48a33d92e1a3c5a577c9ba1aa9 (patch) | |
tree | e820c4a4276381c4c71f8cf891e75dc67302fa8b /src/where.c | |
parent | e1ed0bb6077cc223fa54f58ae835f133d1c4aa59 (diff) | |
parent | b8db549832d2acc2fc30327e6fb5c0474820f122 (diff) | |
download | sqlite-33c1eb64772caf48a33d92e1a3c5a577c9ba1aa9.tar.gz sqlite-33c1eb64772caf48a33d92e1a3c5a577c9ba1aa9.zip |
Merge all recent enhancements from trunk.
FossilOrigin-Name: f3f9200115caf4b356f90ec97c351d1afbcb9bf6
Diffstat (limited to 'src/where.c')
-rw-r--r-- | src/where.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/where.c b/src/where.c index 2cb8334ff..8c8dfbb7b 100644 --- a/src/where.c +++ b/src/where.c @@ -4014,7 +4014,7 @@ WhereInfo *sqlite3WhereBegin( int ii; /* Loop counter */ sqlite3 *db; /* Database connection */ int rc; /* Return code */ - u8 bFordelete = 0; + u8 bFordelete = 0; /* OPFLAG_FORDELETE or zero, as appropriate */ assert( (wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || ( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 @@ -4259,16 +4259,15 @@ WhereInfo *sqlite3WhereBegin( /* If the caller is an UPDATE or DELETE statement that is requesting ** to use a one-pass algorithm, determine if this is appropriate. - ** The one-pass algorithm only works if the WHERE clause constrains - ** the statement to update or delete a single row. */ assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 ); if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 ){ int wsFlags = pWInfo->a[0].pWLoop->wsFlags; int bOnerow = (wsFlags & WHERE_ONEROW)!=0; - if( bOnerow || ( (wctrlFlags & WHERE_ONEPASS_MULTIROW) - && 0==(wsFlags & WHERE_VIRTUALTABLE) - )){ + if( bOnerow + || ((wctrlFlags & WHERE_ONEPASS_MULTIROW)!=0 + && 0==(wsFlags & WHERE_VIRTUALTABLE)) + ){ pWInfo->eOnePass = bOnerow ? ONEPASS_SINGLE : ONEPASS_MULTI; if( HasRowid(pTabList->a[0].pTab) && (wsFlags & WHERE_IDX_ONLY) ){ if( wctrlFlags & WHERE_ONEPASS_MULTIROW ){ |