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

Add the OK_IF_ALWAYS_TRUE() and OK_IF_ALWAYS_FALSE() macros for marking

conditionals that improve performance but do not change the outcome.

FossilOrigin-Name: 6035c9b2728f47d338696978eb6fe5a7d6cb84bbea0792ef985c0986ac8f39dd
This commit is contained in:
drh
2017-10-02 21:29:51 +00:00
parent 3ee1416b68
commit 2f65b2f512
5 changed files with 27 additions and 11 deletions

View File

@@ -4285,7 +4285,7 @@ static int withExpand(
*/
static void selectPopWith(Walker *pWalker, Select *p){
Parse *pParse = pWalker->pParse;
if( pParse->pWith && p->pPrior==0 ){
if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){
With *pWith = findRightmost(p)->pWith;
if( pWith!=0 ){
assert( pParse->pWith==pWith );
@@ -4340,7 +4340,7 @@ static int selectExpander(Walker *pWalker, Select *p){
}
pTabList = p->pSrc;
pEList = p->pEList;
if( p->pWith ){
if( OK_IF_ALWAYS_TRUE(p->pWith) ){
sqlite3WithPush(pParse, p->pWith, 0);
}