Lines Matching refs:k
569 int k; in sqliteWhereBegin() local
570 for(k=0; k<pIdx->nColumn; k++){ in sqliteWhereBegin()
571 if( pIdx->aiColumn[k]==iColumn ){ in sqliteWhereBegin()
574 if( k==0 ) inMask |= 1; in sqliteWhereBegin()
578 eqMask |= 1<<k; in sqliteWhereBegin()
583 ltMask |= 1<<k; in sqliteWhereBegin()
588 gtMask |= 1<<k; in sqliteWhereBegin()
604 int k; in sqliteWhereBegin() local
605 for(k=0; k<pIdx->nColumn; k++){ in sqliteWhereBegin()
606 if( pIdx->aiColumn[k]==iColumn ){ in sqliteWhereBegin()
609 eqMask |= 1<<k; in sqliteWhereBegin()
614 gtMask |= 1<<k; in sqliteWhereBegin()
619 ltMask |= 1<<k; in sqliteWhereBegin()
721 int j, k; in sqliteWhereBegin() local
745 k = iDirectEq[i]; in sqliteWhereBegin()
746 assert( k<nExpr ); in sqliteWhereBegin()
747 assert( aExpr[k].p!=0 ); in sqliteWhereBegin()
748 assert( aExpr[k].idxLeft==iCur || aExpr[k].idxRight==iCur ); in sqliteWhereBegin()
750 if( aExpr[k].idxLeft==iCur ){ in sqliteWhereBegin()
751 Expr *pX = aExpr[k].p; in sqliteWhereBegin()
753 sqliteExprCode(pParse, aExpr[k].p->pRight); in sqliteWhereBegin()
768 sqliteExprCode(pParse, aExpr[k].p->pLeft); in sqliteWhereBegin()
770 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
785 for(k=0; k<nExpr; k++){ in sqliteWhereBegin()
786 Expr *pX = aExpr[k].p; in sqliteWhereBegin()
788 if( aExpr[k].idxLeft==iCur in sqliteWhereBegin()
789 && (aExpr[k].prereqRight & loopMask)==aExpr[k].prereqRight in sqliteWhereBegin()
794 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
811 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
815 if( aExpr[k].idxRight==iCur in sqliteWhereBegin()
816 && aExpr[k].p->op==TK_EQ in sqliteWhereBegin()
817 && (aExpr[k].prereqLeft & loopMask)==aExpr[k].prereqLeft in sqliteWhereBegin()
818 && aExpr[k].p->pRight->iColumn==pIdx->aiColumn[j] in sqliteWhereBegin()
820 sqliteExprCode(pParse, aExpr[k].p->pLeft); in sqliteWhereBegin()
821 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
876 k = iDirectGt[i]; in sqliteWhereBegin()
877 assert( k<nExpr ); in sqliteWhereBegin()
878 assert( aExpr[k].p!=0 ); in sqliteWhereBegin()
879 assert( aExpr[k].idxLeft==iCur || aExpr[k].idxRight==iCur ); in sqliteWhereBegin()
880 if( aExpr[k].idxLeft==iCur ){ in sqliteWhereBegin()
881 sqliteExprCode(pParse, aExpr[k].p->pRight); in sqliteWhereBegin()
883 sqliteExprCode(pParse, aExpr[k].p->pLeft); in sqliteWhereBegin()
886 aExpr[k].p->op==TK_LT || aExpr[k].p->op==TK_GT, brk); in sqliteWhereBegin()
888 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
893 k = iDirectLt[i]; in sqliteWhereBegin()
894 assert( k<nExpr ); in sqliteWhereBegin()
895 assert( aExpr[k].p!=0 ); in sqliteWhereBegin()
896 assert( aExpr[k].idxLeft==iCur || aExpr[k].idxRight==iCur ); in sqliteWhereBegin()
897 if( aExpr[k].idxLeft==iCur ){ in sqliteWhereBegin()
898 sqliteExprCode(pParse, aExpr[k].p->pRight); in sqliteWhereBegin()
900 sqliteExprCode(pParse, aExpr[k].p->pLeft); in sqliteWhereBegin()
905 if( aExpr[k].p->op==TK_LT || aExpr[k].p->op==TK_GT ){ in sqliteWhereBegin()
910 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
957 for(k=0; k<nExpr; k++){ in sqliteWhereBegin()
958 if( aExpr[k].p==0 ) continue; in sqliteWhereBegin()
959 if( aExpr[k].idxLeft==iCur in sqliteWhereBegin()
960 && aExpr[k].p->op==TK_EQ in sqliteWhereBegin()
961 && (aExpr[k].prereqRight & loopMask)==aExpr[k].prereqRight in sqliteWhereBegin()
962 && aExpr[k].p->pLeft->iColumn==pIdx->aiColumn[j] in sqliteWhereBegin()
964 sqliteExprCode(pParse, aExpr[k].p->pRight); in sqliteWhereBegin()
965 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
968 if( aExpr[k].idxRight==iCur in sqliteWhereBegin()
969 && aExpr[k].p->op==TK_EQ in sqliteWhereBegin()
970 && (aExpr[k].prereqLeft & loopMask)==aExpr[k].prereqLeft in sqliteWhereBegin()
971 && aExpr[k].p->pRight->iColumn==pIdx->aiColumn[j] in sqliteWhereBegin()
973 sqliteExprCode(pParse, aExpr[k].p->pLeft); in sqliteWhereBegin()
974 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
1001 for(k=0; k<nExpr; k++){ in sqliteWhereBegin()
1002 Expr *pExpr = aExpr[k].p; in sqliteWhereBegin()
1004 if( aExpr[k].idxLeft==iCur in sqliteWhereBegin()
1006 && (aExpr[k].prereqRight & loopMask)==aExpr[k].prereqRight in sqliteWhereBegin()
1011 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
1014 if( aExpr[k].idxRight==iCur in sqliteWhereBegin()
1016 && (aExpr[k].prereqLeft & loopMask)==aExpr[k].prereqLeft in sqliteWhereBegin()
1021 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
1060 for(k=0; k<nExpr; k++){ in sqliteWhereBegin()
1061 Expr *pExpr = aExpr[k].p; in sqliteWhereBegin()
1063 if( aExpr[k].idxLeft==iCur in sqliteWhereBegin()
1065 && (aExpr[k].prereqRight & loopMask)==aExpr[k].prereqRight in sqliteWhereBegin()
1070 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()
1073 if( aExpr[k].idxRight==iCur in sqliteWhereBegin()
1075 && (aExpr[k].prereqLeft & loopMask)==aExpr[k].prereqLeft in sqliteWhereBegin()
1080 disableTerm(pLevel, &aExpr[k].p); in sqliteWhereBegin()