OpenCoverage

where.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/sqlite/src/src/where.c
Switch to Source codePreprocessed file
LineSourceCount
1typedef struct HiddenIndexInfo HiddenIndexInfo;-
2struct HiddenIndexInfo {-
3 WhereClause *pWC;-
4 Parse *pParse;-
5};-
6-
7-
8static int whereLoopResize(sqlite3*, WhereLoop*, int);-
9-
10-
11-
12 int sqlite3WhereTrace = 0;-
13-
14-
15-
16-
17-
18-
19LogEst sqlite3WhereOutputRowCount(WhereInfo *pWInfo){-
20 return
executed 489286 times by 435 tests: return pWInfo->nRowOut;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pWInfo->nRowOut;
executed 489286 times by 435 tests: return pWInfo->nRowOut;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
489286
21}-
22-
23-
24-
25-
26-
27int sqlite3WhereIsDistinct(WhereInfo *pWInfo){-
28 return
executed 348 times by 1 test: return pWInfo->eDistinct;
Executed by:
  • Self test (438)
pWInfo->eDistinct;
executed 348 times by 1 test: return pWInfo->eDistinct;
Executed by:
  • Self test (438)
348
29}-
30-
31-
32-
33-
34-
35int sqlite3WhereIsOrdered(WhereInfo *pWInfo){-
36 return
executed 80481 times by 435 tests: return pWInfo->nOBSat;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pWInfo->nOBSat;
executed 80481 times by 435 tests: return pWInfo->nOBSat;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
80481
37}-
38int sqlite3WhereOrderByLimitOptLabel(WhereInfo *pWInfo){-
39 WhereLevel *pInner;-
40 if( !pWInfo->bOrderedInnerLoop
!pWInfo->bOrderedInnerLoopDescription
TRUEevaluated 57742 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 51 times by 1 test
Evaluated by:
  • Self test (438)
){
51-57742
41-
42-
43 return
executed 57742 times by 435 tests: return pWInfo->iContinue;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pWInfo->iContinue;
executed 57742 times by 435 tests: return pWInfo->iContinue;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
57742
44 }-
45 pInner = &pWInfo->a[pWInfo->nLevel-1];-
46 -
47 ((void) (0))-
48 ;-
49 return
executed 51 times by 1 test: return pInner->addrNxt;
Executed by:
  • Self test (438)
pInner->addrNxt;
executed 51 times by 1 test: return pInner->addrNxt;
Executed by:
  • Self test (438)
51
50}-
51-
52-
53-
54-
55-
56int sqlite3WhereContinueLabel(WhereInfo *pWInfo){-
57 -
58 ((void) (0))-
59 ;-
60 return
executed 248618 times by 435 tests: return pWInfo->iContinue;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pWInfo->iContinue;
executed 248618 times by 435 tests: return pWInfo->iContinue;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
248618
61}-
62-
63-
64-
65-
66-
67int sqlite3WhereBreakLabel(WhereInfo *pWInfo){-
68 return
executed 249683 times by 435 tests: return pWInfo->iBreak;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pWInfo->iBreak;
executed 249683 times by 435 tests: return pWInfo->iBreak;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
249683
69}-
70int sqlite3WhereOkOnePass(WhereInfo *pWInfo, int *aiCur){-
71 memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2);-
72-
73-
74-
75-
76-
77-
78-
79 return
executed 40356 times by 378 tests: return pWInfo->eOnePass;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • ...
pWInfo->eOnePass;
executed 40356 times by 378 tests: return pWInfo->eOnePass;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • ...
40356
80}-
81-
82-
83-
84-
85static void whereOrMove(WhereOrSet *pDest, WhereOrSet *pSrc){-
86 pDest->n = pSrc->n;-
87 memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));-
88}
executed 18177 times by 1 test: end of block
Executed by:
  • Self test (438)
18177
89static int whereOrInsert(-
90 WhereOrSet *pSet,-
91 Bitmask prereq,-
92 LogEst rRun,-
93 LogEst nOut-
94){-
95 u16 i;-
96 WhereOrCost *p;-
97 for(i=pSet->n, p=pSet->a; i>0
i>0Description
TRUEevaluated 12221 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 33817 times by 1 test
Evaluated by:
  • Self test (438)
; i--, p++){
12221-33817
98 if( rRun<=p->rRun
rRun<=p->rRunDescription
TRUEevaluated 5875 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 6346 times by 1 test
Evaluated by:
  • Self test (438)
&& (
(prereq & p->prereq)==prereqDescription
TRUEevaluated 5840 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 35 times by 1 test
Evaluated by:
  • Self test (438)
prereq & p->prereq)==prereq
(prereq & p->prereq)==prereqDescription
TRUEevaluated 5840 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 35 times by 1 test
Evaluated by:
  • Self test (438)
){
35-6346
99 goto
executed 5840 times by 1 test: goto whereOrInsert_done;
Executed by:
  • Self test (438)
whereOrInsert_done;
executed 5840 times by 1 test: goto whereOrInsert_done;
Executed by:
  • Self test (438)
5840
100 }-
101 if( p->rRun<=rRun
p->rRun<=rRunDescription
TRUEevaluated 6359 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 22 times by 1 test
Evaluated by:
  • Self test (438)
&& (
(p->prereq & p...eq)==p->prereqDescription
TRUEevaluated 6321 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 38 times by 1 test
Evaluated by:
  • Self test (438)
p->prereq & prereq)==p->prereq
(p->prereq & p...eq)==p->prereqDescription
TRUEevaluated 6321 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 38 times by 1 test
Evaluated by:
  • Self test (438)
){
22-6359
102 return
executed 6321 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 6321 times by 1 test: return 0;
Executed by:
  • Self test (438)
6321
103 }-
104 }
executed 60 times by 1 test: end of block
Executed by:
  • Self test (438)
60
105 if( pSet->n<3
pSet->n<3Description
TRUEevaluated 33816 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
){
1-33816
106 p = &pSet->a[pSet->n++];-
107 p->nOut = nOut;-
108 }
executed 33816 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
33816
109 p = pSet->a;-
110 for(i=1; i<pSet->n
i<pSet->nDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
; i++){
1-2
111 if( p->rRun>pSet->a[i].rRun
p->rRun>pSet->a[i].rRunDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
) p = pSet->a + i;
never executed: p = pSet->a + i;
0-2
112 }
executed 2 times by 1 test: end of block
Executed by:
  • Self test (438)
2
113 if( p->rRun<=rRun
p->rRun<=rRunDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
) return
executed 1 time by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 1 time by 1 test: return 0;
Executed by:
  • Self test (438)
0-1
114 }
never executed: end of block
0
115whereOrInsert_done:
code before this statement executed 33816 times by 1 test: whereOrInsert_done:
Executed by:
  • Self test (438)
33816
116 p->prereq = prereq;-
117 p->rRun = rRun;-
118 if( p->nOut>nOut
p->nOut>nOutDescription
TRUEevaluated 4885 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 34771 times by 1 test
Evaluated by:
  • Self test (438)
) p->nOut = nOut;
executed 4885 times by 1 test: p->nOut = nOut;
Executed by:
  • Self test (438)
4885-34771
119 return
executed 39656 times by 1 test: return 1;
Executed by:
  • Self test (438)
1;
executed 39656 times by 1 test: return 1;
Executed by:
  • Self test (438)
39656
120}-
121-
122-
123-
124-
125-
126Bitmask sqlite3WhereGetMask(WhereMaskSet *pMaskSet, int iCursor){-
127 int i;-
128 -
129 ((void) (0))-
130 ;-
131 for(i=0; i<pMaskSet->n
i<pMaskSet->nDescription
TRUEevaluated 1973090 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 162712 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
162712-1973090
132 if( pMaskSet->ix[i]==iCursor
pMaskSet->ix[i]==iCursorDescription
TRUEevaluated 1313604 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 659486 times by 1 test
Evaluated by:
  • Self test (438)
){
659486-1313604
133 return
executed 1313604 times by 435 tests: return (((Bitmask)1)<<(i));
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
(((Bitmask)1)<<(i));
executed 1313604 times by 435 tests: return (((Bitmask)1)<<(i));
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
1313604
134 }-
135 }
executed 659486 times by 1 test: end of block
Executed by:
  • Self test (438)
659486
136 return
executed 162712 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 162712 times by 1 test: return 0;
Executed by:
  • Self test (438)
162712
137}-
138static void createMask(WhereMaskSet *pMaskSet, int iCursor){-
139 -
140 ((void) (0))-
141 ;-
142 pMaskSet->ix[pMaskSet->n++] = iCursor;-
143}
executed 279537 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
279537
144-
145-
146-
147-
148-
149-
150static WhereTerm *whereScanNext(WhereScan *pScan){-
151 int iCur;-
152 i16 iColumn;-
153 Expr *pX;-
154 WhereClause *pWC;-
155 WhereTerm *pTerm;-
156 int k = pScan->k;-
157-
158 -
159 ((void) (0))-
160 ;-
161 pWC = pScan->pWC;-
162 while(1){-
163 iColumn = pScan->aiColumn[pScan->iEquiv-1];-
164 iCur = pScan->aiCur[pScan->iEquiv-1];-
165 -
166 ((void) (0))-
167 ;-
168 do{-
169 for(pTerm=pWC->a+k; k<pWC->nTerm
k<pWC->nTermDescription
TRUEevaluated 1340311 times by 368 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
FALSEevaluated 1017582 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
; k++, pTerm++){
1017582-1340311
170 if( pTerm->leftCursor==iCur
pTerm->leftCursor==iCurDescription
TRUEevaluated 756518 times by 36 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (4)
  • Self test (40)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • ...
FALSEevaluated 583793 times by 360 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
583793-756518
171 && pTerm->u.leftColumn==iColumn
pTerm->u.leftColumn==iColumnDescription
TRUEevaluated 160745 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 595773 times by 34 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (40)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • ...
160745-595773
172 && (iColumn!=(-2)
iColumn!=(-2)Description
TRUEevaluated 160665 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 80 times by 1 test
Evaluated by:
  • Self test (438)
80-160665
173 || sqlite3ExprCompareSkip(pTerm->pExpr->pLeft,
sqlite3ExprCom...xExpr,iCur)==0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 22 times by 1 test
Evaluated by:
  • Self test (438)
22-58
174 pScan->pIdxExpr,iCur)==0
sqlite3ExprCom...xExpr,iCur)==0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 22 times by 1 test
Evaluated by:
  • Self test (438)
)
22-58
175 && (pScan->iEquiv<=1
pScan->iEquiv<=1Description
TRUEevaluated 153550 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 7173 times by 1 test
Evaluated by:
  • Self test (438)
|| !(((pTerm->pExpr)->flags&(0x000001))!=0)
!(((pTerm->pEx...0x000001))!=0)Description
TRUEevaluated 7161 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test (438)
)
12-153550
176 ){-
177 if( (
(pTerm->eOperator & 0x0800)!=0Description
TRUEevaluated 14154 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 146557 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
pTerm->eOperator & 0x0800)!=0
(pTerm->eOperator & 0x0800)!=0Description
TRUEevaluated 14154 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 146557 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
14154-146557
178 && pScan->nEquiv<((int)(sizeof(pScan->aiCur)/sizeof(pScan->aiCur[0])))
pScan->nEquiv<...n->aiCur[0])))Description
TRUEevaluated 14154 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
0-14154
179 && (
(pX = sqlite3E...ght))->op==158Description
TRUEevaluated 14150 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight))->op==158
(pX = sqlite3E...ght))->op==158Description
TRUEevaluated 14150 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
4-14150
180 ){-
181 int j;-
182 for(j=0; j<pScan->nEquiv
j<pScan->nEquivDescription
TRUEevaluated 14729 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7114 times by 1 test
Evaluated by:
  • Self test (438)
; j++){
7114-14729
183 if( pScan->aiCur[j]==pX->iTable
pScan->aiCur[j]==pX->iTableDescription
TRUEevaluated 7108 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7621 times by 1 test
Evaluated by:
  • Self test (438)
7108-7621
184 && pScan->aiColumn[j]==pX->iColumn
pScan->aiColum...]==pX->iColumnDescription
TRUEevaluated 7036 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 72 times by 1 test
Evaluated by:
  • Self test (438)
){
72-7036
185 break;
executed 7036 times by 1 test: break;
Executed by:
  • Self test (438)
7036
186 }-
187 }
executed 7693 times by 1 test: end of block
Executed by:
  • Self test (438)
7693
188 if( j==pScan->nEquiv
j==pScan->nEquivDescription
TRUEevaluated 7114 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7036 times by 1 test
Evaluated by:
  • Self test (438)
){
7036-7114
189 pScan->aiCur[j] = pX->iTable;-
190 pScan->aiColumn[j] = pX->iColumn;-
191 pScan->nEquiv++;-
192 }
executed 7114 times by 1 test: end of block
Executed by:
  • Self test (438)
7114
193 }
executed 14150 times by 1 test: end of block
Executed by:
  • Self test (438)
14150
194 if( (
(pTerm->eOpera...an->opMask)!=0Description
TRUEevaluated 131301 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 29410 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->eOperator & pScan->opMask)!=0
(pTerm->eOpera...an->opMask)!=0Description
TRUEevaluated 131301 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 29410 times by 1 test
Evaluated by:
  • Self test (438)
){
29410-131301
195-
196 if( pScan->zCollName
pScan->zCollNameDescription
TRUEevaluated 69769 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 61532 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
&& (
(pTerm->eOperator & 0x0100)==0Description
TRUEevaluated 69486 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 283 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->eOperator & 0x0100)==0
(pTerm->eOperator & 0x0100)==0Description
TRUEevaluated 69486 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 283 times by 1 test
Evaluated by:
  • Self test (438)
){
283-69769
197 CollSeq *pColl;-
198 Parse *pParse = pWC->pWInfo->pParse;-
199 pX = pTerm->pExpr;-
200 if( !sqlite3IndexAffinityOk(pX, pScan->idxaff)
!sqlite3IndexA...pScan->idxaff)Description
TRUEevaluated 937 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 68549 times by 1 test
Evaluated by:
  • Self test (438)
){
937-68549
201 continue;
executed 937 times by 1 test: continue;
Executed by:
  • Self test (438)
937
202 }-
203 -
204 ((void) (0))-
205 ;-
206 pColl = sqlite3BinaryCompareCollSeq(pParse,-
207 pX->pLeft, pX->pRight);-
208 if( pColl==0
pColl==0Description
TRUEevaluated 2149 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 66400 times by 1 test
Evaluated by:
  • Self test (438)
) pColl = pParse->db->pDfltColl;
executed 2149 times by 1 test: pColl = pParse->db->pDfltColl;
Executed by:
  • Self test (438)
2149-66400
209 if( sqlite3StrICmp(pColl->zName, pScan->zCollName)
sqlite3StrICmp...an->zCollName)Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 68446 times by 1 test
Evaluated by:
  • Self test (438)
){
103-68446
210 continue;
executed 103 times by 1 test: continue;
Executed by:
  • Self test (438)
103
211 }-
212 }
executed 68446 times by 1 test: end of block
Executed by:
  • Self test (438)
68446
213 if( (
(pTerm->eOpera...02|0x0080))!=0Description
TRUEevaluated 80231 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 50030 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->eOperator & (0x0002|0x0080))!=0
(pTerm->eOpera...02|0x0080))!=0Description
TRUEevaluated 80231 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 50030 times by 1 test
Evaluated by:
  • Self test (438)
50030-80231
214 && (
(pX = pTerm->p...ight)->op==158Description
TRUEevaluated 14737 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 65494 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
pX = pTerm->pExpr->pRight)->op==158
(pX = pTerm->p...ight)->op==158Description
TRUEevaluated 14737 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 65494 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
14737-65494
215 && pX->iTable==pScan->aiCur[0]
pX->iTable==pScan->aiCur[0]Description
TRUEevaluated 6917 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7820 times by 1 test
Evaluated by:
  • Self test (438)
6917-7820
216 && pX->iColumn==pScan->aiColumn[0]
pX->iColumn==p...n->aiColumn[0]Description
TRUEevaluated 6912 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
5-6912
217 ){-
218 ;-
219 continue;
executed 6912 times by 1 test: continue;
Executed by:
  • Self test (438)
6912
220 }-
221 pScan->pWC = pWC;-
222 pScan->k = k+1;-
223 return
executed 123349 times by 30 tests: return pTerm;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
pTerm;
executed 123349 times by 30 tests: return pTerm;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
123349
224 }-
225 }
executed 29410 times by 1 test: end of block
Executed by:
  • Self test (438)
29410
226 }
executed 1209010 times by 366 tests: end of block
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
1209010
227 pWC = pWC->pOuter;-
228 k = 0;-
229 }
executed 1017582 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
while( pWC!=0
pWC!=0Description
TRUEevaluated 124663 times by 2 tests
Evaluated by:
  • Self test (34)
  • Self test (438)
FALSEevaluated 892919 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
);
124663-1017582
230 if( pScan->iEquiv>=pScan->nEquiv
pScan->iEquiv>=pScan->nEquivDescription
TRUEevaluated 885839 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 7080 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 885839 times by 435 tests: break;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
7080-885839
231 pWC = pScan->pOrigWC;-
232 k = 0;-
233 pScan->iEquiv++;-
234 }
executed 7080 times by 1 test: end of block
Executed by:
  • Self test (438)
7080
235 return
executed 885839 times by 435 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
0;
executed 885839 times by 435 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
885839
236}-
237static WhereTerm *whereScanInit(-
238 WhereScan *pScan,-
239 WhereClause *pWC,-
240 int iCur,-
241 int iColumn,-
242 u32 opMask,-
243 Index *pIdx-
244){-
245 pScan->pOrigWC = pWC;-
246 pScan->pWC = pWC;-
247 pScan->pIdxExpr = 0;-
248 pScan->idxaff = 0;-
249 pScan->zCollName = 0;-
250 if( pIdx
pIdxDescription
TRUEevaluated 540418 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 374621 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
374621-540418
251 int j = iColumn;-
252 iColumn = pIdx->aiColumn[j];-
253 if( iColumn==(-2)
iColumn==(-2)Description
TRUEevaluated 151 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 540267 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
151-540267
254 pScan->pIdxExpr = pIdx->aColExpr->a[j].pExpr;-
255 pScan->zCollName = pIdx->azColl[j];-
256 }
executed 151 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( iColumn==pIdx->pTable->iPKey
iColumn==pIdx->pTable->iPKeyDescription
TRUEevaluated 212090 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 328177 times by 356 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
){
151-328177
257 iColumn = (-1);-
258 }
executed 212090 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
else if( iColumn>=0
iColumn>=0Description
TRUEevaluated 252094 times by 356 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
FALSEevaluated 76083 times by 333 tests
Evaluated by:
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • ...
){
76083-252094
259 pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;-
260 pScan->zCollName = pIdx->azColl[j];-
261 }
executed 252094 times by 356 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
252094
262 }
executed 540418 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
else if( iColumn==(-2)
iColumn==(-2)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 374620 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
1-540418
263 return
executed 1 time by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 1 time by 1 test: return 0;
Executed by:
  • Self test (438)
1
264 }-
265 pScan->opMask = opMask;-
266 pScan->k = 0;-
267 pScan->aiCur[0] = iCur;-
268 pScan->aiColumn[0] = iColumn;-
269 pScan->nEquiv = 1;-
270 pScan->iEquiv = 1;-
271 return
executed 915038 times by 435 tests: return whereScanNext(pScan);
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
whereScanNext(pScan);
executed 915038 times by 435 tests: return whereScanNext(pScan);
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
915038
272}-
273WhereTerm *sqlite3WhereFindTerm(-
274 WhereClause *pWC,-
275 int iCur,-
276 int iColumn,-
277 Bitmask notReady,-
278 u32 op,-
279 Index *pIdx-
280){-
281 WhereTerm *pResult = 0;-
282 WhereTerm *p;-
283 WhereScan scan;-
284-
285 p = whereScanInit(&scan, pWC, iCur, iColumn, op, pIdx);-
286 op &= 0x0002|0x0080;-
287 while( p
pDescription
TRUEevaluated 33541 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 350807 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
33541-350807
288 if( (
(p->prereqRight & notReady)==0Description
TRUEevaluated 30224 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 3317 times by 1 test
Evaluated by:
  • Self test (438)
p->prereqRight & notReady)==0
(p->prereqRight & notReady)==0Description
TRUEevaluated 30224 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 3317 times by 1 test
Evaluated by:
  • Self test (438)
){
3317-30224
289 if( p->prereqRight==0
p->prereqRight==0Description
TRUEevaluated 29888 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 336 times by 1 test
Evaluated by:
  • Self test (438)
&& (
(p->eOperator&op)!=0Description
TRUEevaluated 29197 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 691 times by 1 test
Evaluated by:
  • Self test (438)
p->eOperator&op)!=0
(p->eOperator&op)!=0Description
TRUEevaluated 29197 times by 30 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
FALSEevaluated 691 times by 1 test
Evaluated by:
  • Self test (438)
){
336-29888
290 ;-
291 return
executed 29197 times by 30 tests: return p;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
p;
executed 29197 times by 30 tests: return p;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (39)
  • Self test (438)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • ...
29197
292 }-
293 if( pResult==0
pResult==0Description
TRUEevaluated 1025 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
) pResult = p;
executed 1025 times by 1 test: pResult = p;
Executed by:
  • Self test (438)
2-1025
294 }
executed 1027 times by 1 test: end of block
Executed by:
  • Self test (438)
1027
295 p = whereScanNext(&scan);-
296 }
executed 4344 times by 1 test: end of block
Executed by:
  • Self test (438)
4344
297 return
executed 350807 times by 435 tests: return pResult;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pResult;
executed 350807 times by 435 tests: return pResult;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
350807
298}-
299static int findIndexCol(-
300 Parse *pParse,-
301 ExprList *pList,-
302 int iBase,-
303 Index *pIdx,-
304 int iCol-
305){-
306 int i;-
307 const char *zColl = pIdx->azColl[iCol];-
308-
309 for(i=0; i<pList->nExpr
i<pList->nExprDescription
TRUEevaluated 111 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 35 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
35-111
310 Expr *p = sqlite3ExprSkipCollate(pList->a[i].pExpr);-
311 if( p->op==158
p->op==158Description
TRUEevaluated 104 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7 times by 1 test
Evaluated by:
  • Self test (438)
7-104
312 && p->iColumn==pIdx->aiColumn[iCol]
p->iColumn==pI...aiColumn[iCol]Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 67 times by 1 test
Evaluated by:
  • Self test (438)
37-67
313 && p->iTable==iBase
p->iTable==iBaseDescription
TRUEevaluated 37 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
0-37
314 ){-
315 CollSeq *pColl = sqlite3ExprNNCollSeq(pParse, pList->a[i].pExpr);-
316 if( 0==sqlite3StrICmp(pColl->zName, zColl)
0==sqlite3StrI...>zName, zColl)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 6 times by 1 test
Evaluated by:
  • Self test (438)
){
6-31
317 return
executed 31 times by 1 test: return i;
Executed by:
  • Self test (438)
i;
executed 31 times by 1 test: return i;
Executed by:
  • Self test (438)
31
318 }-
319 }
executed 6 times by 1 test: end of block
Executed by:
  • Self test (438)
6
320 }
executed 80 times by 1 test: end of block
Executed by:
  • Self test (438)
80
321-
322 return
executed 35 times by 1 test: return -1;
Executed by:
  • Self test (438)
-1;
executed 35 times by 1 test: return -1;
Executed by:
  • Self test (438)
35
323}-
324-
325-
326-
327-
328static int indexColumnNotNull(Index *pIdx, int iCol){-
329 int j;-
330 -
331 ((void) (0))-
332 ;-
333 -
334 ((void) (0))-
335 ;-
336 j = pIdx->aiColumn[iCol];-
337 if( j>=0
j>=0Description
TRUEevaluated 312 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 24 times by 1 test
Evaluated by:
  • Self test (438)
){
24-312
338 return
executed 312 times by 1 test: return pIdx->pTable->aCol[j].notNull;
Executed by:
  • Self test (438)
pIdx->pTable->aCol[j].notNull;
executed 312 times by 1 test: return pIdx->pTable->aCol[j].notNull;
Executed by:
  • Self test (438)
312
339 }else if( j==(-1)
j==(-1)Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
){
2-22
340 return
executed 22 times by 1 test: return 1;
Executed by:
  • Self test (438)
1;
executed 22 times by 1 test: return 1;
Executed by:
  • Self test (438)
22
341 }else{-
342 -
343 ((void) (0))-
344 ;-
345 return
executed 2 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 2 times by 1 test: return 0;
Executed by:
  • Self test (438)
2
346-
347 }-
348}-
349static int isDistinctRedundant(-
350 Parse *pParse,-
351 SrcList *pTabList,-
352 WhereClause *pWC,-
353 ExprList *pDistinct-
354){-
355 Table *pTab;-
356 Index *pIdx;-
357 int i;-
358 int iBase;-
359-
360-
361-
362-
363 if( pTabList->nSrc!=1
pTabList->nSrc!=1Description
TRUEevaluated 63 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 196 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 63 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 63 times by 1 test: return 0;
Executed by:
  • Self test (438)
63-196
364 iBase = pTabList->a[0].iCursor;-
365 pTab = pTabList->a[0].pTab;-
366-
367-
368-
369-
370-
371 for(i=0; i<pDistinct->nExpr
i<pDistinct->nExprDescription
TRUEevaluated 318 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 189 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
189-318
372 Expr *p = sqlite3ExprSkipCollate(pDistinct->a[i].pExpr);-
373 if( p->op==158
p->op==158Description
TRUEevaluated 274 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 44 times by 1 test
Evaluated by:
  • Self test (438)
&& p->iTable==iBase
p->iTable==iBaseDescription
TRUEevaluated 271 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
&& p->iColumn<0
p->iColumn<0Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 264 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 7 times by 1 test: return 1;
Executed by:
  • Self test (438)
1;
executed 7 times by 1 test: return 1;
Executed by:
  • Self test (438)
3-274
374 }
executed 311 times by 1 test: end of block
Executed by:
  • Self test (438)
311
375 for(pIdx=pTab->pIndex; pIdx
pIdxDescription
TRUEevaluated 136 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 177 times by 1 test
Evaluated by:
  • Self test (438)
; pIdx=pIdx->pNext){
136-177
376 if( !((pIdx)->onError!=0)
!((pIdx)->onError!=0)Description
TRUEevaluated 73 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 63 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 73 times by 1 test: continue;
Executed by:
  • Self test (438)
63-73
377 for(i=0; i<pIdx->nKeyCol
i<pIdx->nKeyColDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
12-70
378 if( 0==sqlite3WhereFindTerm(pWC, iBase, i, ~(Bitmask)0, 0x0002, pIdx)
0==sqlite3Wher... 0x0002, pIdx)Description
TRUEevaluated 66 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
){
4-66
379 if( findIndexCol(pParse, pDistinct, iBase, pIdx, i)<0
findIndexCol(p...se, pIdx, i)<0Description
TRUEevaluated 35 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 31 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 35 times by 1 test: break;
Executed by:
  • Self test (438)
31-35
380 if( indexColumnNotNull(pIdx, i)==0
indexColumnNotNull(pIdx, i)==0Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 15 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 16 times by 1 test: break;
Executed by:
  • Self test (438)
15-16
381 }
executed 15 times by 1 test: end of block
Executed by:
  • Self test (438)
15
382 }
executed 19 times by 1 test: end of block
Executed by:
  • Self test (438)
19
383 if( i==pIdx->nKeyCol
i==pIdx->nKeyColDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 51 times by 1 test
Evaluated by:
  • Self test (438)
){
12-51
384-
385 return
executed 12 times by 1 test: return 1;
Executed by:
  • Self test (438)
1;
executed 12 times by 1 test: return 1;
Executed by:
  • Self test (438)
12
386 }-
387 }
executed 51 times by 1 test: end of block
Executed by:
  • Self test (438)
51
388-
389 return
executed 177 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 177 times by 1 test: return 0;
Executed by:
  • Self test (438)
177
390}-
391-
392-
393-
394-
395-
396static LogEst estLog(LogEst N){-
397 return
executed 821273 times by 435 tests: return N<=10 ? 0 : sqlite3LogEst(N) - 33;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
N<=10
N<=10Description
TRUEevaluated 942 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 820331 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
? 0 : sqlite3LogEst(N) - 33;
executed 821273 times by 435 tests: return N<=10 ? 0 : sqlite3LogEst(N) - 33;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
942-821273
398}-
399static void translateColumnToCopy(-
400 Parse *pParse,-
401 int iStart,-
402 int iTabCur,-
403 int iRegister,-
404 int bIncrRowid-
405){-
406 Vdbe *v = pParse->pVdbe;-
407 VdbeOp *pOp = sqlite3VdbeGetOp(v, iStart);-
408 int iEnd = sqlite3VdbeCurrentAddr(v);-
409 if( pParse->db->mallocFailed
pParse->db->mallocFailedDescription
TRUEnever evaluated
FALSEevaluated 35367 times by 1 test
Evaluated by:
  • Self test (438)
) return;
never executed: return;
0-35367
410 for(; iStart<iEnd
iStart<iEndDescription
TRUEevaluated 229659 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 35367 times by 1 test
Evaluated by:
  • Self test (438)
; iStart++, pOp++){
35367-229659
411 if( pOp->p1!=iTabCur
pOp->p1!=iTabCurDescription
TRUEevaluated 188002 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 41657 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 188002 times by 1 test: continue;
Executed by:
  • Self test (438)
41657-188002
412 if( pOp->opcode==90
pOp->opcode==90Description
TRUEevaluated 40510 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1147 times by 1 test
Evaluated by:
  • Self test (438)
){
1147-40510
413 pOp->opcode = 78;-
414 pOp->p1 = pOp->p2 + iRegister;-
415 pOp->p2 = pOp->p3;-
416 pOp->p3 = 0;-
417 }
executed 40510 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( pOp->opcode==129
pOp->opcode==129Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1138 times by 1 test
Evaluated by:
  • Self test (438)
){
9-40510
418 if( bIncrRowid
bIncrRowidDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 6 times by 1 test
Evaluated by:
  • Self test (438)
){
3-6
419-
420 pOp->opcode = 83;-
421 pOp->p1 = pOp->p2;-
422 pOp->p2 = 1;-
423 }
executed 3 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
3
424 pOp->opcode = 73;-
425 pOp->p1 = 0;-
426 pOp->p3 = 0;-
427 }
executed 6 times by 1 test: end of block
Executed by:
  • Self test (438)
6
428 }-
429 }
executed 41657 times by 1 test: end of block
Executed by:
  • Self test (438)
41657
430}
executed 35367 times by 1 test: end of block
Executed by:
  • Self test (438)
35367
431static int termCanDriveIndex(-
432 WhereTerm *pTerm,-
433 struct SrcList_item *pSrc,-
434 Bitmask notReady-
435){-
436 char aff;-
437 if( pTerm->leftCursor!=pSrc->iCursor
pTerm->leftCur...=pSrc->iCursorDescription
TRUEevaluated 305767 times by 360 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
FALSEevaluated 86476 times by 34 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (40)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • ...
) return
executed 305767 times by 360 tests: return 0;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
0;
executed 305767 times by 360 tests: return 0;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
86476-305767
438 if( (
(pTerm->eOpera...02|0x0080))==0Description
TRUEevaluated 18559 times by 3 tests
Evaluated by:
  • Self test (40)
  • Self test (438)
  • Self test (47)
FALSEevaluated 67917 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
pTerm->eOperator & (0x0002|0x0080))==0
(pTerm->eOpera...02|0x0080))==0Description
TRUEevaluated 18559 times by 3 tests
Evaluated by:
  • Self test (40)
  • Self test (438)
  • Self test (47)
FALSEevaluated 67917 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
) return
executed 18559 times by 3 tests: return 0;
Executed by:
  • Self test (40)
  • Self test (438)
  • Self test (47)
0;
executed 18559 times by 3 tests: return 0;
Executed by:
  • Self test (40)
  • Self test (438)
  • Self test (47)
18559-67917
439 if( (
(pSrc->fg.jointype & 0x0008)Description
TRUEevaluated 853 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 67064 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
pSrc->fg.jointype & 0x0008)
(pSrc->fg.jointype & 0x0008)Description
TRUEevaluated 853 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 67064 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
853-67064
440 && !(((pTerm->pExpr)->flags&(0x000001))!=0)
!(((pTerm->pEx...0x000001))!=0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 850 times by 1 test
Evaluated by:
  • Self test (438)
3-850
441 && (
(pTerm->eOperator & 0x0080)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
pTerm->eOperator & 0x0080)
(pTerm->eOperator & 0x0080)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
0-3
442 ){-
443-
444-
445-
446 return
executed 3 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 3 times by 1 test: return 0;
Executed by:
  • Self test (438)
3
447 }-
448 if( (
(pTerm->prereq...& notReady)!=0Description
TRUEevaluated 170 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 67744 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
pTerm->prereqRight & notReady)!=0
(pTerm->prereq...& notReady)!=0Description
TRUEevaluated 170 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 67744 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
) return
executed 170 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 170 times by 1 test: return 0;
Executed by:
  • Self test (438)
170-67744
449 if( pTerm->u.leftColumn<0
pTerm->u.leftColumn<0Description
TRUEevaluated 1152 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 66592 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
) return
executed 1152 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 1152 times by 1 test: return 0;
Executed by:
  • Self test (438)
1152-66592
450 aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;-
451 if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff)
!sqlite3IndexA...m->pExpr, aff)Description
TRUEevaluated 463 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 66129 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
) return
executed 463 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 463 times by 1 test: return 0;
Executed by:
  • Self test (438)
463-66129
452 ;-
453 return
executed 66129 times by 33 tests: return 1;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
1;
executed 66129 times by 33 tests: return 1;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
66129
454}-
455static void constructAutomaticIndex(-
456 Parse *pParse,-
457 WhereClause *pWC,-
458 struct SrcList_item *pSrc,-
459 Bitmask notReady,-
460 WhereLevel *pLevel-
461){-
462 int nKeyCol;-
463 WhereTerm *pTerm;-
464 WhereTerm *pWCEnd;-
465 Index *pIdx;-
466 Vdbe *v;-
467 int addrInit;-
468 Table *pTable;-
469 int addrTop;-
470 int regRecord;-
471 int n;-
472 int i;-
473 int mxBitCol;-
474 CollSeq *pColl;-
475 WhereLoop *pLoop;-
476 char *zNotUsed;-
477 Bitmask idxCols;-
478 Bitmask extraCols;-
479 u8 sentWarning = 0;-
480 Expr *pPartial = 0;-
481 int iContinue = 0;-
482 struct SrcList_item *pTabItem;-
483 int addrCounter = 0;-
484 int regBase;-
485-
486-
487-
488 v = pParse->pVdbe;-
489 -
490 ((void) (0))-
491 ;-
492 addrInit = sqlite3VdbeAddOp0(v, 17); ;-
493-
494-
495-
496 nKeyCol = 0;-
497 pTable = pSrc->pTab;-
498 pWCEnd = &pWC->a[pWC->nTerm];-
499 pLoop = pLevel->pWLoop;-
500 idxCols = 0;-
501 for(pTerm=pWC->a; pTerm<pWCEnd
pTerm<pWCEndDescription
TRUEevaluated 88711 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
; pTerm++){
2859-88711
502 Expr *pExpr = pTerm->pExpr;-
503 -
504 ((void) (0))-
505-
506 -
507 ;-
508 if( pLoop->prereq==0
pLoop->prereq==0Description
TRUEevaluated 146 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 88565 times by 1 test
Evaluated by:
  • Self test (438)
146-88565
509 && (
(pTerm->wtFlags & 0x02)==0Description
TRUEevaluated 114 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 32 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->wtFlags & 0x02)==0
(pTerm->wtFlags & 0x02)==0Description
TRUEevaluated 114 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 32 times by 1 test
Evaluated by:
  • Self test (438)
32-114
510 && !(((pExpr)->flags&(0x000001))!=0)
!(((pExpr)->fl...0x000001))!=0)Description
TRUEevaluated 114 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
0-114
511 && sqlite3ExprIsTableConstant(pExpr, pSrc->iCursor)
sqlite3ExprIsT...pSrc->iCursor)Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 50 times by 1 test
Evaluated by:
  • Self test (438)
){
50-64
512 pPartial = sqlite3ExprAnd(pParse->db, pPartial,-
513 sqlite3ExprDup(pParse->db, pExpr, 0));-
514 }
executed 64 times by 1 test: end of block
Executed by:
  • Self test (438)
64
515 if( termCanDriveIndex(pTerm, pSrc, notReady)
termCanDriveIn...Src, notReady)Description
TRUEevaluated 3019 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 85692 times by 1 test
Evaluated by:
  • Self test (438)
){
3019-85692
516 int iCol = pTerm->u.leftColumn;-
517 Bitmask cMask = iCol>=((int)(sizeof(Bitmask)*8))
iCol>=((int)(s...f(Bitmask)*8))Description
TRUEnever evaluated
FALSEevaluated 3019 times by 1 test
Evaluated by:
  • Self test (438)
? (((Bitmask)1)<<(((int)(sizeof(Bitmask)*8))-1)) : (((Bitmask)1)<<(iCol));
0-3019
518 ;-
519 ;-
520 if( !sentWarning
!sentWarningDescription
TRUEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 160 times by 1 test
Evaluated by:
  • Self test (438)
){
160-2859
521 sqlite3_log((28 | (1<<8)),-
522 "automatic index on %s(%s)", pTable->zName,-
523 pTable->aCol[iCol].zName);-
524 sentWarning = 1;-
525 }
executed 2859 times by 1 test: end of block
Executed by:
  • Self test (438)
2859
526 if( (
(idxCols & cMask)==0Description
TRUEevaluated 3006 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test (438)
idxCols & cMask)==0
(idxCols & cMask)==0Description
TRUEevaluated 3006 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test (438)
){
13-3006
527 if( whereLoopResize(pParse->db, pLoop, nKeyCol+1)
whereLoopResiz...op, nKeyCol+1)Description
TRUEnever evaluated
FALSEevaluated 3006 times by 1 test
Evaluated by:
  • Self test (438)
){
0-3006
528 goto
never executed: goto end_auto_index_create;
end_auto_index_create;
never executed: goto end_auto_index_create;
0
529 }-
530 pLoop->aLTerm[nKeyCol++] = pTerm;-
531 idxCols |= cMask;-
532 }
executed 3006 times by 1 test: end of block
Executed by:
  • Self test (438)
3006
533 }
executed 3019 times by 1 test: end of block
Executed by:
  • Self test (438)
3019
534 }
executed 88711 times by 1 test: end of block
Executed by:
  • Self test (438)
88711
535 -
536 ((void) (0))-
537 ;-
538 pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;-
539 pLoop->wsFlags = 0x00000001 | 0x00000040 | 0x00000200-
540 | 0x00004000;-
541 extraCols = pSrc->colUsed & (~idxCols | (((Bitmask)1)<<(((int)(sizeof(Bitmask)*8))-1)));-
542 mxBitCol = ((((
(((int)(sizeof...(pTable->nCol)Description
TRUEnever evaluated
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
int)(sizeof(Bitmask)*8))-1)<(pTable->nCol)
(((int)(sizeof...(pTable->nCol)Description
TRUEnever evaluated
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
?(((int)(sizeof(Bitmask)*8))-1):(pTable->nCol));
0-2859
543 ;-
544 ;-
545 for(i=0; i<mxBitCol
i<mxBitColDescription
TRUEevaluated 3899 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
2859-3899
546 if( extraCols & (((Bitmask)1)<<(i))
extraCols & ((...tmask)1)<<(i))Description
TRUEevaluated 722 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 3177 times by 1 test
Evaluated by:
  • Self test (438)
) nKeyCol++;
executed 722 times by 1 test: nKeyCol++;
Executed by:
  • Self test (438)
722-3177
547 }
executed 3899 times by 1 test: end of block
Executed by:
  • Self test (438)
3899
548 if( pSrc->colUsed & (((Bitmask)1)<<(((int)(sizeof(Bitmask)*8))-1))
pSrc->colUsed ...tmask)*8))-1))Description
TRUEnever evaluated
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
){
0-2859
549 nKeyCol += pTable->nCol - ((int)(sizeof(Bitmask)*8)) + 1;-
550 }
never executed: end of block
0
551-
552-
553 pIdx = sqlite3AllocateIndexObject(pParse->db, nKeyCol+1, 0, &zNotUsed);-
554 if( pIdx==0
pIdx==0Description
TRUEnever evaluated
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
) goto
never executed: goto end_auto_index_create;
end_auto_index_create;
never executed: goto end_auto_index_create;
0-2859
555 pLoop->u.btree.pIndex = pIdx;-
556 pIdx->zName = "auto-index";-
557 pIdx->pTable = pTable;-
558 n = 0;-
559 idxCols = 0;-
560 for(pTerm=pWC->a; pTerm<pWCEnd
pTerm<pWCEndDescription
TRUEevaluated 88711 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
; pTerm++){
2859-88711
561 if( termCanDriveIndex(pTerm, pSrc, notReady)
termCanDriveIn...Src, notReady)Description
TRUEevaluated 3019 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 85692 times by 1 test
Evaluated by:
  • Self test (438)
){
3019-85692
562 int iCol = pTerm->u.leftColumn;-
563 Bitmask cMask = iCol>=((int)(sizeof(Bitmask)*8))
iCol>=((int)(s...f(Bitmask)*8))Description
TRUEnever evaluated
FALSEevaluated 3019 times by 1 test
Evaluated by:
  • Self test (438)
? (((Bitmask)1)<<(((int)(sizeof(Bitmask)*8))-1)) : (((Bitmask)1)<<(iCol));
0-3019
564 ;-
565 ;-
566 if( (
(idxCols & cMask)==0Description
TRUEevaluated 3006 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test (438)
idxCols & cMask)==0
(idxCols & cMask)==0Description
TRUEevaluated 3006 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test (438)
){
13-3006
567 Expr *pX = pTerm->pExpr;-
568 idxCols |= cMask;-
569 pIdx->aiColumn[n] = pTerm->u.leftColumn;-
570 pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);-
571 pIdx->azColl[n] = pColl
pCollDescription
TRUEevaluated 3005 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
? pColl->zName : sqlite3StrBINARY;
1-3005
572 n++;-
573 }
executed 3006 times by 1 test: end of block
Executed by:
  • Self test (438)
3006
574 }
executed 3019 times by 1 test: end of block
Executed by:
  • Self test (438)
3019
575 }
executed 88711 times by 1 test: end of block
Executed by:
  • Self test (438)
88711
576 -
577 ((void) (0))-
578 ;-
579-
580-
581-
582 for(i=0; i<mxBitCol
i<mxBitColDescription
TRUEevaluated 3899 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
2859-3899
583 if( extraCols & (((Bitmask)1)<<(i))
extraCols & ((...tmask)1)<<(i))Description
TRUEevaluated 722 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 3177 times by 1 test
Evaluated by:
  • Self test (438)
){
722-3177
584 pIdx->aiColumn[n] = i;-
585 pIdx->azColl[n] = sqlite3StrBINARY;-
586 n++;-
587 }
executed 722 times by 1 test: end of block
Executed by:
  • Self test (438)
722
588 }
executed 3899 times by 1 test: end of block
Executed by:
  • Self test (438)
3899
589 if( pSrc->colUsed & (((Bitmask)1)<<(((int)(sizeof(Bitmask)*8))-1))
pSrc->colUsed ...tmask)*8))-1))Description
TRUEnever evaluated
FALSEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
){
0-2859
590 for(i=((int)(sizeof(Bitmask)*8))-1; i<pTable->nCol
i<pTable->nColDescription
TRUEnever evaluated
FALSEnever evaluated
; i++){
0
591 pIdx->aiColumn[n] = i;-
592 pIdx->azColl[n] = sqlite3StrBINARY;-
593 n++;-
594 }
never executed: end of block
0
595 }
never executed: end of block
0
596 -
597 ((void) (0))-
598 ;-
599 pIdx->aiColumn[n] = (-1);-
600 pIdx->azColl[n] = sqlite3StrBINARY;-
601-
602-
603 -
604 ((void) (0))-
605 ;-
606 pLevel->iIdxCur = pParse->nTab++;-
607 sqlite3VdbeAddOp2(v, 112, pLevel->iIdxCur, nKeyCol+1);-
608 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);-
609 ;-
610-
611-
612 pTabItem = &pWC->pWInfo->pTabList->a[pLevel->iFrom];-
613 if( pTabItem->fg.viaCoroutine
pTabItem->fg.viaCoroutineDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2856 times by 1 test
Evaluated by:
  • Self test (438)
){
3-2856
614 int regYield = pTabItem->regReturn;-
615 addrCounter = sqlite3VdbeAddOp2(v, 70, 0, 0);-
616 sqlite3VdbeAddOp3(v, 13, regYield, 0, pTabItem->addrFillSub);-
617 addrTop = sqlite3VdbeAddOp1(v, 14, regYield);-
618 ;-
619 ;-
620 }
executed 3 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
3
621 addrTop = sqlite3VdbeAddOp1(v, 36, pLevel->iTabCur); ;-
622 }
executed 2856 times by 1 test: end of block
Executed by:
  • Self test (438)
2856
623 if( pPartial
pPartialDescription
TRUEevaluated 59 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2800 times by 1 test
Evaluated by:
  • Self test (438)
){
59-2800
624 iContinue = sqlite3VdbeMakeLabel(v);-
625 sqlite3ExprIfFalse(pParse, pPartial, iContinue, 0x10);-
626 pLoop->wsFlags |= 0x00020000;-
627 }
executed 59 times by 1 test: end of block
Executed by:
  • Self test (438)
59
628 regRecord = sqlite3GetTempReg(pParse);-
629 regBase = sqlite3GenerateIndexKey(-
630 pParse, pIdx, pLevel->iTabCur, regRecord, 0, 0, 0, 0-
631 );-
632 sqlite3VdbeAddOp2(v, 133, pLevel->iIdxCur, regRecord);-
633 sqlite3VdbeChangeP5(v, 0x10);-
634 if( pPartial
pPartialDescription
TRUEevaluated 59 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2800 times by 1 test
Evaluated by:
  • Self test (438)
) sqlite3VdbeResolveLabel(v, iContinue);
executed 59 times by 1 test: sqlite3VdbeResolveLabel(v, iContinue);
Executed by:
  • Self test (438)
59-2800
635 if( pTabItem->fg.viaCoroutine
pTabItem->fg.viaCoroutineDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2856 times by 1 test
Evaluated by:
  • Self test (438)
){
3-2856
636 sqlite3VdbeChangeP2(v, addrCounter, regBase+n);-
637 ;-
638 translateColumnToCopy(pParse, addrTop, pLevel->iTabCur,-
639 pTabItem->regResult, 1);-
640 sqlite3VdbeGoto(v, addrTop);-
641 pTabItem->fg.viaCoroutine = 0;-
642 }
executed 3 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
3
643 sqlite3VdbeAddOp2(v, 5, pLevel->iTabCur, addrTop+1); ;-
644 }
executed 2856 times by 1 test: end of block
Executed by:
  • Self test (438)
2856
645 sqlite3VdbeChangeP5(v, 3);-
646 sqlite3VdbeJumpHere(v, addrTop);-
647 sqlite3ReleaseTempReg(pParse, regRecord);-
648-
649-
650 sqlite3VdbeJumpHere(v, addrInit);-
651-
652end_auto_index_create:
code before this statement executed 2859 times by 1 test: end_auto_index_create:
Executed by:
  • Self test (438)
2859
653 sqlite3ExprDelete(pParse->db, pPartial);-
654}
executed 2859 times by 1 test: end of block
Executed by:
  • Self test (438)
2859
655static sqlite3_index_info *allocateIndexInfo(-
656 Parse *pParse,-
657 WhereClause *pWC,-
658 Bitmask mUnusable,-
659 struct SrcList_item *pSrc,-
660 ExprList *pOrderBy,-
661 u16 *pmNoOmit-
662){-
663 int i, j;-
664 int nTerm;-
665 struct sqlite3_index_constraint *pIdxCons;-
666 struct sqlite3_index_orderby *pIdxOrderBy;-
667 struct sqlite3_index_constraint_usage *pUsage;-
668 struct HiddenIndexInfo *pHidden;-
669 WhereTerm *pTerm;-
670 int nOrderBy;-
671 sqlite3_index_info *pIdxInfo;-
672 u16 mNoOmit = 0;-
673-
674-
675-
676 for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm
i<pWC->nTermDescription
TRUEevaluated 23178 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 11464 times by 1 test
Evaluated by:
  • Self test (438)
; i++, pTerm++){
11464-23178
677 if( pTerm->leftCursor != pSrc->iCursor
pTerm->leftCur... pSrc->iCursorDescription
TRUEevaluated 2900 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20278 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 2900 times by 1 test: continue;
Executed by:
  • Self test (438)
2900-20278
678 if( pTerm->prereqRight & mUnusable
pTerm->prereqRight & mUnusableDescription
TRUEevaluated 31 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20247 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 31 times by 1 test: continue;
Executed by:
  • Self test (438)
31-20247
679 -
680 ((void) (0))-
681 ;-
682 ;-
683 ;-
684 ;-
685 ;-
686 if( (
(pTerm->eOpera... ~(0x0800))==0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20243 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->eOperator & ~(0x0800))==0
(pTerm->eOpera... ~(0x0800))==0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20243 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 4 times by 1 test: continue;
Executed by:
  • Self test (438)
4-20243
687 if( pTerm->wtFlags & 0x00
pTerm->wtFlags & 0x00Description
TRUEnever evaluated
FALSEevaluated 20243 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
never executed: continue;
0-20243
688 -
689 ((void) (0))-
690 ;-
691 nTerm++;-
692 }
executed 20243 times by 1 test: end of block
Executed by:
  • Self test (438)
20243
693-
694-
695-
696-
697-
698 nOrderBy = 0;-
699 if( pOrderBy
pOrderByDescription
TRUEevaluated 174 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 11290 times by 1 test
Evaluated by:
  • Self test (438)
){
174-11290
700 int n = pOrderBy->nExpr;-
701 for(i=0; i<n
i<nDescription
TRUEevaluated 187 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 113 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
113-187
702 Expr *pExpr = pOrderBy->a[i].pExpr;-
703 if( pExpr->op!=158
pExpr->op!=158Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 161 times by 1 test
Evaluated by:
  • Self test (438)
|| pExpr->iTable!=pSrc->iCursor
pExpr->iTable!=pSrc->iCursorDescription
TRUEevaluated 35 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 126 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 61 times by 1 test: break;
Executed by:
  • Self test (438)
26-161
704 }
executed 126 times by 1 test: end of block
Executed by:
  • Self test (438)
126
705 if( i==n
i==nDescription
TRUEevaluated 113 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 61 times by 1 test
Evaluated by:
  • Self test (438)
){
61-113
706 nOrderBy = n;-
707 }
executed 113 times by 1 test: end of block
Executed by:
  • Self test (438)
113
708 }
executed 174 times by 1 test: end of block
Executed by:
  • Self test (438)
174
709-
710-
711-
712 pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)-
713 + (sizeof(*pIdxCons) + sizeof(*pUsage))*nTerm-
714 + sizeof(*pIdxOrderBy)*nOrderBy + sizeof(*pHidden) );-
715 if( pIdxInfo==0
pIdxInfo==0Description
TRUEnever evaluated
FALSEevaluated 11464 times by 1 test
Evaluated by:
  • Self test (438)
){
0-11464
716 sqlite3ErrorMsg(pParse, "out of memory");-
717 return
never executed: return 0;
0;
never executed: return 0;
0
718 }-
719-
720-
721-
722-
723-
724-
725 pHidden = (struct HiddenIndexInfo*)&pIdxInfo[1];-
726 pIdxCons = (struct sqlite3_index_constraint*)&pHidden[1];-
727 pIdxOrderBy = (struct sqlite3_index_orderby*)&pIdxCons[nTerm];-
728 pUsage = (struct sqlite3_index_constraint_usage*)&pIdxOrderBy[nOrderBy];-
729 *(int*)&pIdxInfo->nConstraint = nTerm;-
730 *(int*)&pIdxInfo->nOrderBy = nOrderBy;-
731 *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint = pIdxCons;-
732 *(struct sqlite3_index_orderby**)&pIdxInfo->aOrderBy = pIdxOrderBy;-
733 *(struct sqlite3_index_constraint_usage**)&pIdxInfo->aConstraintUsage =-
734 pUsage;-
735-
736 pHidden->pWC = pWC;-
737 pHidden->pParse = pParse;-
738 for(i=j=0, pTerm=pWC->a; i<pWC->nTerm
i<pWC->nTermDescription
TRUEevaluated 23178 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 11464 times by 1 test
Evaluated by:
  • Self test (438)
; i++, pTerm++){
11464-23178
739 u16 op;-
740 if( pTerm->leftCursor != pSrc->iCursor
pTerm->leftCur... pSrc->iCursorDescription
TRUEevaluated 2900 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20278 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 2900 times by 1 test: continue;
Executed by:
  • Self test (438)
2900-20278
741 if( pTerm->prereqRight & mUnusable
pTerm->prereqRight & mUnusableDescription
TRUEevaluated 31 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20247 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 31 times by 1 test: continue;
Executed by:
  • Self test (438)
31-20247
742 -
743 ((void) (0))-
744 ;-
745 ;-
746 ;-
747 ;-
748 ;-
749 if( (
(pTerm->eOpera... ~(0x0800))==0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20243 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->eOperator & ~(0x0800))==0
(pTerm->eOpera... ~(0x0800))==0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20243 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 4 times by 1 test: continue;
Executed by:
  • Self test (438)
4-20243
750 if( pTerm->wtFlags & 0x00
pTerm->wtFlags & 0x00Description
TRUEnever evaluated
FALSEevaluated 20243 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
never executed: continue;
0-20243
751 if( (
(pSrc->fg.join...e & 0x0008)!=0Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20219 times by 1 test
Evaluated by:
  • Self test (438)
pSrc->fg.jointype & 0x0008)!=0
(pSrc->fg.join...e & 0x0008)!=0Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20219 times by 1 test
Evaluated by:
  • Self test (438)
24-20219
752 && !(((pTerm->pExpr)->flags&(0x000001))!=0)
!(((pTerm->pEx...0x000001))!=0)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 19 times by 1 test
Evaluated by:
  • Self test (438)
5-19
753 && (
(pTerm->eOpera...x0080|0x0100))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
pTerm->eOperator & (0x0080|0x0100))
(pTerm->eOpera...x0080|0x0100))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
2-3
754 ){-
755-
756-
757-
758-
759-
760-
761 ;-
762 ;-
763 continue;
executed 3 times by 1 test: continue;
Executed by:
  • Self test (438)
3
764 }-
765 -
766 ((void) (0))-
767 ;-
768 pIdxCons[j].iColumn = pTerm->u.leftColumn;-
769 pIdxCons[j].iTermOffset = i;-
770 op = pTerm->eOperator & 0x1fff;-
771 if( op==0x0001
op==0x0001Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20218 times by 1 test
Evaluated by:
  • Self test (438)
) op = 0x0002;
executed 22 times by 1 test: op = 0x0002;
Executed by:
  • Self test (438)
22-20218
772 if( op==0x0040
op==0x0040Description
TRUEevaluated 139 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20101 times by 1 test
Evaluated by:
  • Self test (438)
){
139-20101
773 pIdxCons[j].op = pTerm->eMatchOp;-
774 }
executed 139 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( op & (0x0100|0x0080)
op & (0x0100|0x0080)Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 20086 times by 1 test
Evaluated by:
  • Self test (438)
){
15-20086
775 if( op==0x0100
op==0x0100Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test (438)
){
5-10
776 pIdxCons[j].op = 71;-
777 }
executed 5 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
5
778 pIdxCons[j].op = 72;-
779 }
executed 10 times by 1 test: end of block
Executed by:
  • Self test (438)
10
780 }else{-
781 pIdxCons[j].op = (u8)op;-
782-
783-
784-
785 -
786 ((void) (0))-
787 ;-
788 -
789 ((void) (0))-
790 ;-
791 -
792 ((void) (0))-
793 ;-
794 -
795 ((void) (0))-
796 ;-
797 -
798 ((void) (0))-
799 ;-
800 -
801 ((void) (0))-
802 ;-
803-
804 if( op & ((0x0002<<(56 -53))|(0x0002<<(55 -53))|(0x0002<<(54 -53))|(0x0002<<(57 -53)))
op & ((0x0002<...02<<(57 -53)))Description
TRUEevaluated 245 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 19841 times by 1 test
Evaluated by:
  • Self test (438)
245-19841
805 && sqlite3ExprIsVector(pTerm->pExpr->pRight)
sqlite3ExprIsV...pExpr->pRight)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 241 times by 1 test
Evaluated by:
  • Self test (438)
4-241
806 ){-
807 if( i<16
i<16Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
) mNoOmit |= (1 << i);
executed 4 times by 1 test: mNoOmit |= (1 << i);
Executed by:
  • Self test (438)
0-4
808 if( op==(0x0002<<(56 -53))
op==(0x0002<<(56 -53))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
) pIdxCons[j].op = (0x0002<<(55 -53));
executed 3 times by 1 test: pIdxCons[j].op = (0x0002<<(55 -53));
Executed by:
  • Self test (438)
1-3
809 if( op==(0x0002<<(54 -53))
op==(0x0002<<(54 -53))Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
) pIdxCons[j].op = (0x0002<<(57 -53));
never executed: pIdxCons[j].op = (0x0002<<(57 -53));
0-4
810 }
executed 4 times by 1 test: end of block
Executed by:
  • Self test (438)
4
811 }
executed 20086 times by 1 test: end of block
Executed by:
  • Self test (438)
20086
812-
813 j++;-
814 }
executed 20240 times by 1 test: end of block
Executed by:
  • Self test (438)
20240
815 for(i=0; i<nOrderBy
i<nOrderByDescription
TRUEevaluated 125 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 11464 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
125-11464
816 Expr *pExpr = pOrderBy->a[i].pExpr;-
817 pIdxOrderBy[i].iColumn = pExpr->iColumn;-
818 pIdxOrderBy[i].desc = pOrderBy->a[i].sortOrder;-
819 }
executed 125 times by 1 test: end of block
Executed by:
  • Self test (438)
125
820-
821 *pmNoOmit = mNoOmit;-
822 return
executed 11464 times by 1 test: return pIdxInfo;
Executed by:
  • Self test (438)
pIdxInfo;
executed 11464 times by 1 test: return pIdxInfo;
Executed by:
  • Self test (438)
11464
823}-
824static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){-
825 sqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;-
826 int rc;-
827-
828 ;-
829 rc = pVtab->pModule->xBestIndex(pVtab, p);-
830 ;-
831-
832 if( rc!=0
rc!=0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 12101 times by 1 test
Evaluated by:
  • Self test (438)
){
1-12101
833 if( rc==7
rc==7Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
){
0-1
834 sqlite3OomFault(pParse->db);-
835 }
never executed: end of block
else if( !pVtab->zErrMsg
!pVtab->zErrMsgDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
){
0-1
836 sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc));-
837 }
never executed: end of block
else{
0
838 sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);-
839 }
executed 1 time by 1 test: end of block
Executed by:
  • Self test (438)
1
840 }-
841 sqlite3_free(pVtab->zErrMsg);-
842 pVtab->zErrMsg = 0;-
843 return
executed 12102 times by 1 test: return pParse->nErr;
Executed by:
  • Self test (438)
pParse->nErr;
executed 12102 times by 1 test: return pParse->nErr;
Executed by:
  • Self test (438)
12102
844}-
845static LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){-
846 LogEst nRet = nNew;-
847 if( pTerm
pTermDescription
TRUEevaluated 56274 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 25792 times by 1 test
Evaluated by:
  • Self test (438)
){
25792-56274
848 if( pTerm->truthProb<=0
pTerm->truthProb<=0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 56269 times by 1 test
Evaluated by:
  • Self test (438)
){
5-56269
849 nRet += pTerm->truthProb;-
850 }
executed 5 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( (
(pTerm->wtFlags & 0x00)==0Description
TRUEevaluated 56269 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
pTerm->wtFlags & 0x00)==0
(pTerm->wtFlags & 0x00)==0Description
TRUEevaluated 56269 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
){
0-56269
851 nRet -= 20; -
852 ((void) (0))-
853 ;-
854 }
executed 56269 times by 1 test: end of block
Executed by:
  • Self test (438)
56269
855 }
executed 56274 times by 1 test: end of block
Executed by:
  • Self test (438)
56274
856 return
executed 82066 times by 1 test: return nRet;
Executed by:
  • Self test (438)
nRet;
executed 82066 times by 1 test: return nRet;
Executed by:
  • Self test (438)
82066
857}-
858static int whereRangeScanEst(-
859 Parse *pParse,-
860 WhereLoopBuilder *pBuilder,-
861 WhereTerm *pLower,-
862 WhereTerm *pUpper,-
863 WhereLoop *pLoop-
864){-
865 int rc = 0;-
866 int nOut = pLoop->nOut;-
867 LogEst nNew;-
868 (void)(pParse);-
869 (void)(pBuilder);-
870 -
871 ((void) (0))-
872 ;-
873-
874 -
875 ((void) (0))-
876 ;-
877 nNew = whereRangeAdjust(pLower, nOut);-
878 nNew = whereRangeAdjust(pUpper, nNew);-
879-
880-
881-
882-
883-
884-
885-
886 if( pLower
pLowerDescription
TRUEevaluated 28305 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 12728 times by 1 test
Evaluated by:
  • Self test (438)
&& pLower->truthProb>0
pLower->truthProb>0Description
TRUEevaluated 28300 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
&& pUpper
pUpperDescription
TRUEevaluated 15241 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 13059 times by 1 test
Evaluated by:
  • Self test (438)
&& pUpper->truthProb>0
pUpper->truthProb>0Description
TRUEevaluated 15241 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
){
0-28305
887 nNew -= 20;-
888 }
executed 15241 times by 1 test: end of block
Executed by:
  • Self test (438)
15241
889-
890 nOut -= (pLower!=0) + (pUpper!=0);-
891 if( nNew<10
nNew<10Description
TRUEevaluated 2646 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 38387 times by 1 test
Evaluated by:
  • Self test (438)
) nNew = 10;
executed 2646 times by 1 test: nNew = 10;
Executed by:
  • Self test (438)
2646-38387
892 if( nNew<nOut
nNew<nOutDescription
TRUEevaluated 40387 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 646 times by 1 test
Evaluated by:
  • Self test (438)
) nOut = nNew;
executed 40387 times by 1 test: nOut = nNew;
Executed by:
  • Self test (438)
646-40387
893-
894-
895-
896-
897-
898-
899 pLoop->nOut = (LogEst)nOut;-
900 return
executed 41033 times by 1 test: return rc;
Executed by:
  • Self test (438)
rc;
executed 41033 times by 1 test: return rc;
Executed by:
  • Self test (438)
41033
901}-
902static void whereLoopInit(WhereLoop *p){-
903 p->aLTerm = p->aLTermSpace;-
904 p->nLTerm = 0;-
905 p->nLSlot = ((int)(sizeof(p->aLTermSpace)/sizeof(p->aLTermSpace[0])));-
906 p->wsFlags = 0;-
907}
executed 1572403 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
1572403
908-
909-
910-
911-
912static void whereLoopClearUnion(sqlite3 *db, WhereLoop *p){-
913 if( p->wsFlags & (0x00000400|0x00004000)
p->wsFlags & (...00|0x00004000)Description
TRUEevaluated 73157 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
FALSEevaluated 910094 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
73157-910094
914 if( (
(p->wsFlags & 0x00000400)!=0Description
TRUEevaluated 22473 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 50684 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
p->wsFlags & 0x00000400)!=0
(p->wsFlags & 0x00000400)!=0Description
TRUEevaluated 22473 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 50684 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
&& p->u.vtab.needFree
p->u.vtab.needFreeDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 22449 times by 1 test
Evaluated by:
  • Self test (438)
){
24-50684
915 sqlite3_free(p->u.vtab.idxStr);-
916 p->u.vtab.needFree = 0;-
917 p->u.vtab.idxStr = 0;-
918 }
executed 24 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( (
(p->wsFlags & 0x00004000)!=0Description
TRUEevaluated 50684 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
FALSEevaluated 22449 times by 1 test
Evaluated by:
  • Self test (438)
p->wsFlags & 0x00004000)!=0
(p->wsFlags & 0x00004000)!=0Description
TRUEevaluated 50684 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
FALSEevaluated 22449 times by 1 test
Evaluated by:
  • Self test (438)
&& p->u.btree.pIndex!=0
p->u.btree.pIndex!=0Description
TRUEevaluated 2859 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 47825 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
){
24-50684
919 sqlite3DbFree(db, p->u.btree.pIndex->zColAff);-
920 sqlite3DbFreeNN(db, p->u.btree.pIndex);-
921 p->u.btree.pIndex = 0;-
922 }
executed 2859 times by 1 test: end of block
Executed by:
  • Self test (438)
2859
923 }
executed 73157 times by 33 tests: end of block
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
73157
924}
executed 983251 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
983251
925-
926-
927-
928-
929static void whereLoopClear(sqlite3 *db, WhereLoop *p){-
930 if( p->aLTerm!=p->aLTermSpace
p->aLTerm!=p->aLTermSpaceDescription
TRUEevaluated 213 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 619731 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
) sqlite3DbFreeNN(db, p->aLTerm);
executed 213 times by 1 test: sqlite3DbFreeNN(db, p->aLTerm);
Executed by:
  • Self test (438)
213-619731
931 whereLoopClearUnion(db, p);-
932 whereLoopInit(p);-
933}
executed 619944 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
619944
934-
935-
936-
937-
938static int whereLoopResize(sqlite3 *db, WhereLoop *p, int n){-
939 WhereTerm **paNew;-
940 if( p->nLSlot>=n
p->nLSlot>=nDescription
TRUEevaluated 467794 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 241 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 467794 times by 435 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
0;
executed 467794 times by 435 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
241-467794
941 n = (n+7)&~7;-
942 paNew = sqlite3DbMallocRawNN(db, sizeof(p->aLTerm[0])*n);-
943 if( paNew==0
paNew==0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 237 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 4 times by 1 test: return 7;
Executed by:
  • Self test (438)
7;
executed 4 times by 1 test: return 7;
Executed by:
  • Self test (438)
4-237
944 memcpy(paNew, p->aLTerm, sizeof(p->aLTerm[0])*p->nLSlot);-
945 if( p->aLTerm!=p->aLTermSpace
p->aLTerm!=p->aLTermSpaceDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 213 times by 1 test
Evaluated by:
  • Self test (438)
) sqlite3DbFreeNN(db, p->aLTerm);
executed 24 times by 1 test: sqlite3DbFreeNN(db, p->aLTerm);
Executed by:
  • Self test (438)
24-213
946 p->aLTerm = paNew;-
947 p->nLSlot = n;-
948 return
executed 237 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 237 times by 1 test: return 0;
Executed by:
  • Self test (438)
237
949}-
950-
951-
952-
953-
954static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){-
955 whereLoopClearUnion(db, pTo);-
956 if( whereLoopResize(db, pTo, pFrom->nLTerm)
whereLoopResiz...pFrom->nLTerm)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 363305 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
2-363305
957 memset(&pTo->u, 0, sizeof(pTo->u));-
958 return
executed 2 times by 1 test: return 7;
Executed by:
  • Self test (438)
7;
executed 2 times by 1 test: return 7;
Executed by:
  • Self test (438)
2
959 }-
960 memcpy(pTo, pFrom, -
961 __builtin_offsetof (-
962 WhereLoop-
963 , -
964 nLSlot-
965 )-
966 );-
967 memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));-
968 if( pFrom->wsFlags & 0x00000400
pFrom->wsFlags & 0x00000400Description
TRUEevaluated 11782 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 351523 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
11782-351523
969 pFrom->u.vtab.needFree = 0;-
970 }
executed 11782 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( (
(pFrom->wsFlag...0x00004000)!=0Description
TRUEevaluated 50670 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
FALSEevaluated 300853 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pFrom->wsFlags & 0x00004000)!=0
(pFrom->wsFlag...0x00004000)!=0Description
TRUEevaluated 50670 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
FALSEevaluated 300853 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
11782-300853
971 pFrom->u.btree.pIndex = 0;-
972 }
executed 50670 times by 33 tests: end of block
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
50670
973 return
executed 363305 times by 435 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
0;
executed 363305 times by 435 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
363305
974}-
975-
976-
977-
978-
979static void whereLoopDelete(sqlite3 *db, WhereLoop *p){-
980 whereLoopClear(db, p);-
981 sqlite3DbFreeNN(db, p);-
982}
executed 314590 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
314590
983-
984-
985-
986-
987static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){-
988 int i;-
989 -
990 ((void) (0))-
991 ;-
992 for(i=0; i<pWInfo->nLevel
i<pWInfo->nLevelDescription
TRUEevaluated 279346 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 332515 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
; i++){
279346-332515
993 WhereLevel *pLevel = &pWInfo->a[i];-
994 if( pLevel->pWLoop
pLevel->pWLoopDescription
TRUEevaluated 278563 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 783 times by 1 test
Evaluated by:
  • Self test (438)
&& (
(pLevel->pWLoo... & 0x00000800)Description
TRUEevaluated 679 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 277884 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
pLevel->pWLoop->wsFlags & 0x00000800)
(pLevel->pWLoo... & 0x00000800)Description
TRUEevaluated 679 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 277884 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
679-278563
995 sqlite3DbFree(db, pLevel->u.in.aInLoop);-
996 }
executed 679 times by 1 test: end of block
Executed by:
  • Self test (438)
679
997 }
executed 279346 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
279346
998 sqlite3WhereClauseClear(&pWInfo->sWC);-
999 while( pWInfo->pLoops
pWInfo->pLoopsDescription
TRUEevaluated 311353 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 332515 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
311353-332515
1000 WhereLoop *p = pWInfo->pLoops;-
1001 pWInfo->pLoops = p->pNextLoop;-
1002 whereLoopDelete(db, p);-
1003 }
executed 311353 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
311353
1004 sqlite3DbFreeNN(db, pWInfo);-
1005}
executed 332515 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
332515
1006static int whereLoopCheaperProperSubset(-
1007 const WhereLoop *pX,-
1008 const WhereLoop *pY-
1009){-
1010 int i, j;-
1011 if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip
pX->nLTerm-pX-...Term-pY->nSkipDescription
TRUEevaluated 27925 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 18917 times by 1 test
Evaluated by:
  • Self test (438)
){
18917-27925
1012 return
executed 27925 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 27925 times by 1 test: return 0;
Executed by:
  • Self test (438)
27925
1013 }-
1014 if( pY->nSkip > pX->nSkip
pY->nSkip > pX->nSkipDescription
TRUEevaluated 35 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 18882 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 35 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 35 times by 1 test: return 0;
Executed by:
  • Self test (438)
35-18882
1015 if( pX->rRun >= pY->rRun
pX->rRun >= pY->rRunDescription
TRUEevaluated 17620 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1262 times by 1 test
Evaluated by:
  • Self test (438)
){
1262-17620
1016 if( pX->rRun > pY->rRun
pX->rRun > pY->rRunDescription
TRUEevaluated 15588 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2032 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 15588 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 15588 times by 1 test: return 0;
Executed by:
  • Self test (438)
2032-15588
1017 if( pX->nOut > pY->nOut
pX->nOut > pY->nOutDescription
TRUEevaluated 620 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1412 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 620 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 620 times by 1 test: return 0;
Executed by:
  • Self test (438)
620-1412
1018 }
executed 1412 times by 1 test: end of block
Executed by:
  • Self test (438)
1412
1019 for(i=pX->nLTerm-1; i>=0
i>=0Description
TRUEevaluated 3108 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1692 times by 1 test
Evaluated by:
  • Self test (438)
; i--){
1692-3108
1020 if( pX->aLTerm[i]==0
pX->aLTerm[i]==0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 3107 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 1 time by 1 test: continue;
Executed by:
  • Self test (438)
1-3107
1021 for(j=pY->nLTerm-1; j>=0
j>=0Description
TRUEevaluated 6884 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 982 times by 1 test
Evaluated by:
  • Self test (438)
; j--){
982-6884
1022 if( pY->aLTerm[j]==pX->aLTerm[i]
pY->aLTerm[j]==pX->aLTerm[i]Description
TRUEevaluated 2125 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4759 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 2125 times by 1 test: break;
Executed by:
  • Self test (438)
2125-4759
1023 }
executed 4759 times by 1 test: end of block
Executed by:
  • Self test (438)
4759
1024 if( j<0
j<0Description
TRUEevaluated 982 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2125 times by 1 test
Evaluated by:
  • Self test (438)
) return
executed 982 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 982 times by 1 test: return 0;
Executed by:
  • Self test (438)
982-2125
1025 }
executed 2125 times by 1 test: end of block
Executed by:
  • Self test (438)
2125
1026 if( (
(pX->wsFlags&0x00000040)!=0Description
TRUEevaluated 1490 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 202 times by 1 test
Evaluated by:
  • Self test (438)
pX->wsFlags&0x00000040)!=0
(pX->wsFlags&0x00000040)!=0Description
TRUEevaluated 1490 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 202 times by 1 test
Evaluated by:
  • Self test (438)
202-1490
1027 && (
(pY->wsFlags&0x00000040)==0Description
TRUEnever evaluated
FALSEevaluated 1490 times by 1 test
Evaluated by:
  • Self test (438)
pY->wsFlags&0x00000040)==0
(pY->wsFlags&0x00000040)==0Description
TRUEnever evaluated
FALSEevaluated 1490 times by 1 test
Evaluated by:
  • Self test (438)
){
0-1490
1028 return
never executed: return 0;
0;
never executed: return 0;
0
1029 }-
1030 return
executed 1692 times by 1 test: return 1;
Executed by:
  • Self test (438)
1;
executed 1692 times by 1 test: return 1;
Executed by:
  • Self test (438)
1692
1031}-
1032static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){-
1033 if( (
(pTemplate->ws...0x00000200)==0Description
TRUEevaluated 327987 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 57699 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (47)
pTemplate->wsFlags & 0x00000200)==0
(pTemplate->ws...0x00000200)==0Description
TRUEevaluated 327987 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 57699 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (47)
) return;
executed 327987 times by 435 tests: return;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
57699-327987
1034 for(; p
pDescription
TRUEevaluated 88395 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 57699 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (47)
; p=p->pNextLoop){
57699-88395
1035 if( p->iTab!=pTemplate->iTab
p->iTab!=pTemplate->iTabDescription
TRUEevaluated 11311 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 77084 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 11311 times by 1 test: continue;
Executed by:
  • Self test (438)
11311-77084
1036 if( (
(p->wsFlags & 0x00000200)==0Description
TRUEevaluated 52819 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 24265 times by 1 test
Evaluated by:
  • Self test (438)
p->wsFlags & 0x00000200)==0
(p->wsFlags & 0x00000200)==0Description
TRUEevaluated 52819 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 24265 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 52819 times by 1 test: continue;
Executed by:
  • Self test (438)
24265-52819
1037 if( whereLoopCheaperProperSubset(p, pTemplate)
whereLoopCheap...(p, pTemplate)Description
TRUEevaluated 1688 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 22577 times by 1 test
Evaluated by:
  • Self test (438)
){
1688-22577
1038-
1039-
1040 -
1041 ;-
1042 pTemplate->rRun = p->rRun;-
1043 pTemplate->nOut = p->nOut - 1;-
1044 }
executed 1688 times by 1 test: end of block
Executed by:
  • Self test (438)
else if( whereLoopCheaperProperSubset(pTemplate, p)
whereLoopCheap...(pTemplate, p)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 22573 times by 1 test
Evaluated by:
  • Self test (438)
){
4-22573
1045-
1046-
1047 -
1048 ;-
1049 pTemplate->rRun = p->rRun;-
1050 pTemplate->nOut = p->nOut + 1;-
1051 }
executed 4 times by 1 test: end of block
Executed by:
  • Self test (438)
4
1052 }
executed 24265 times by 1 test: end of block
Executed by:
  • Self test (438)
24265
1053}
executed 57699 times by 2 tests: end of block
Executed by:
  • Self test (438)
  • Self test (47)
57699
1054static WhereLoop **whereLoopFindLesser(-
1055 WhereLoop **ppPrev,-
1056 const WhereLoop *pTemplate-
1057){-
1058 WhereLoop *p;-
1059 for(p=(*ppPrev); p
pDescription
TRUEevaluated 418966 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
FALSEevaluated 318063 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
; ppPrev=&p->pNextLoop, p=*ppPrev){
318063-418966
1060 if( p->iTab!=pTemplate->iTab
p->iTab!=pTemplate->iTabDescription
TRUEevaluated 262690 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 156276 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
|| p->iSortIdx!=pTemplate->iSortIdx
p->iSortIdx!=p...late->iSortIdxDescription
TRUEevaluated 39439 times by 31 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • ...
FALSEevaluated 116837 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
){
39439-262690
1061-
1062-
1063-
1064 continue;
executed 302129 times by 31 tests: continue;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • ...
302129
1065 }-
1066-
1067-
1068-
1069 -
1070 ((void) (0))-
1071 -
1072 ;-
1073-
1074-
1075-
1076-
1077 -
1078 ((void) (0))-
1079 ;-
1080-
1081-
1082-
1083-
1084 if( (
(p->wsFlags & 0x00004000)!=0Description
TRUEevaluated 50011 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
FALSEevaluated 66826 times by 1 test
Evaluated by:
  • Self test (438)
p->wsFlags & 0x00004000)!=0
(p->wsFlags & 0x00004000)!=0Description
TRUEevaluated 50011 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
FALSEevaluated 66826 times by 1 test
Evaluated by:
  • Self test (438)
50011-66826
1085 && (
(pTemplate->nSkip)==0Description
TRUEevaluated 49984 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
FALSEevaluated 27 times by 1 test
Evaluated by:
  • Self test (438)
pTemplate->nSkip)==0
(pTemplate->nSkip)==0Description
TRUEevaluated 49984 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
FALSEevaluated 27 times by 1 test
Evaluated by:
  • Self test (438)
27-49984
1086 && (
(pTemplate->ws...0x00000200)!=0Description
TRUEevaluated 5584 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 44400 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
pTemplate->wsFlags & 0x00000200)!=0
(pTemplate->ws...0x00000200)!=0Description
TRUEevaluated 5584 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 44400 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
5584-44400
1087 && (
(pTemplate->ws...0x00000001)!=0Description
TRUEevaluated 4445 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1139 times by 1 test
Evaluated by:
  • Self test (438)
pTemplate->wsFlags & 0x00000001)!=0
(pTemplate->ws...0x00000001)!=0Description
TRUEevaluated 4445 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1139 times by 1 test
Evaluated by:
  • Self test (438)
1139-4445
1088 && (
(p->prereq & p...mplate->prereqDescription
TRUEevaluated 4367 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 78 times by 1 test
Evaluated by:
  • Self test (438)
p->prereq & pTemplate->prereq)==pTemplate->prereq
(p->prereq & p...mplate->prereqDescription
TRUEevaluated 4367 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 78 times by 1 test
Evaluated by:
  • Self test (438)
78-4367
1089 ){-
1090 break;
executed 4367 times by 1 test: break;
Executed by:
  • Self test (438)
4367
1091 }-
1092-
1093-
1094-
1095-
1096-
1097-
1098 if( (
(p->prereq & p...eq)==p->prereqDescription
TRUEevaluated 101614 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
FALSEevaluated 10856 times by 1 test
Evaluated by:
  • Self test (438)
p->prereq & pTemplate->prereq)==p->prereq
(p->prereq & p...eq)==p->prereqDescription
TRUEevaluated 101614 times by 13 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (5)
FALSEevaluated 10856 times by 1 test
Evaluated by:
  • Self test (438)
10856-101614
1099 && p->rSetup<=pTemplate->rSetup
p->rSetup<=pTemplate->rSetupDescription
TRUEevaluated 75627 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
FALSEevaluated 25987 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (47)
  • Self test (5)
25987-75627
1100 && p->rRun<=pTemplate->rRun
p->rRun<=pTemplate->rRunDescription
TRUEevaluated 25550 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
FALSEevaluated 50077 times by 1 test
Evaluated by:
  • Self test (438)
25550-50077
1101 && p->nOut<=pTemplate->nOut
p->nOut<=pTemplate->nOutDescription
TRUEevaluated 22325 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
FALSEevaluated 3225 times by 1 test
Evaluated by:
  • Self test (438)
3225-22325
1102 ){-
1103 return
executed 22325 times by 10 tests: return 0;
Executed by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
0;
executed 22325 times by 10 tests: return 0;
Executed by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
22325
1104 }-
1105-
1106-
1107-
1108-
1109-
1110-
1111 if( (
(p->prereq & p...mplate->prereqDescription
TRUEevaluated 83321 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (47)
  • Self test (5)
FALSEevaluated 6824 times by 1 test
Evaluated by:
  • Self test (438)
p->prereq & pTemplate->prereq)==pTemplate->prereq
(p->prereq & p...mplate->prereqDescription
TRUEevaluated 83321 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (47)
  • Self test (5)
FALSEevaluated 6824 times by 1 test
Evaluated by:
  • Self test (438)
6824-83321
1112 && p->rRun>=pTemplate->rRun
p->rRun>=pTemplate->rRunDescription
TRUEevaluated 47647 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 35674 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (47)
  • Self test (5)
35674-47647
1113 && p->nOut>=pTemplate->nOut
p->nOut>=pTemplate->nOutDescription
TRUEevaluated 47587 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 60 times by 1 test
Evaluated by:
  • Self test (438)
60-47587
1114 ){-
1115 -
1116 ((void) (0))-
1117 ;-
1118 break;
executed 47587 times by 1 test: break;
Executed by:
  • Self test (438)
47587
1119 }-
1120 }
executed 42558 times by 10 tests: end of block
Executed by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (47)
  • Self test (5)
42558
1121 return
executed 370017 times by 435 tests: return ppPrev;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
ppPrev;
executed 370017 times by 435 tests: return ppPrev;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
370017
1122}-
1123static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){-
1124 WhereLoop **ppPrev, *p;-
1125 WhereInfo *pWInfo = pBuilder->pWInfo;-
1126 sqlite3 *db = pWInfo->pParse->db;-
1127 int rc;-
1128-
1129-
1130 if( pBuilder->iPlanLimit==0
pBuilder->iPlanLimit==0Description
TRUEnever evaluated
FALSEevaluated 447219 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
0-447219
1131 ;-
1132 if( pBuilder->pOrSet
pBuilder->pOrSetDescription
TRUEnever evaluated
FALSEnever evaluated
) pBuilder->pOrSet->n = 0;
never executed: pBuilder->pOrSet->n = 0;
0
1133 return
never executed: return 101;
101;
never executed: return 101;
0
1134 }-
1135 pBuilder->iPlanLimit--;-
1136-
1137-
1138-
1139-
1140 if( pBuilder->pOrSet!=0
pBuilder->pOrSet!=0Description
TRUEevaluated 61533 times by 2 tests
Evaluated by:
  • Self test (34)
  • Self test (438)
FALSEevaluated 385686 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
61533-385686
1141 if( pTemplate->nLTerm
pTemplate->nLTermDescription
TRUEevaluated 30341 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 31192 times by 2 tests
Evaluated by:
  • Self test (34)
  • Self test (438)
){
30341-31192
1142-
1143-
1144-
1145-
1146 whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,-
1147 pTemplate->nOut);-
1148-
1149-
1150-
1151-
1152-
1153-
1154 }
executed 30341 times by 1 test: end of block
Executed by:
  • Self test (438)
30341
1155 return
executed 61533 times by 2 tests: return 0;
Executed by:
  • Self test (34)
  • Self test (438)
0;
executed 61533 times by 2 tests: return 0;
Executed by:
  • Self test (34)
  • Self test (438)
61533
1156 }-
1157-
1158-
1159-
1160 whereLoopAdjustCost(pWInfo->pLoops, pTemplate);-
1161 ppPrev = whereLoopFindLesser(&pWInfo->pLoops, pTemplate);-
1162-
1163 if( ppPrev==0
ppPrev==0Description
TRUEevaluated 22320 times by 10 tests
Evaluated by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
FALSEevaluated 363366 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
){
22320-363366
1164 return
executed 22320 times by 10 tests: return 0;
Executed by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
0;
executed 22320 times by 10 tests: return 0;
Executed by:
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
22320
1165 }else{-
1166 p = *ppPrev;-
1167 }
executed 363366 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
363366
1168 if( p==0
p==0Description
TRUEevaluated 314649 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 48717 times by 1 test
Evaluated by:
  • Self test (438)
){
48717-314649
1169-
1170 *ppPrev = p = sqlite3DbMallocRawNN(db, sizeof(WhereLoop));-
1171 if( p==0
p==0Description
TRUEevaluated 59 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 314590 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
) return
executed 59 times by 1 test: return 7;
Executed by:
  • Self test (438)
7;
executed 59 times by 1 test: return 7;
Executed by:
  • Self test (438)
59-314590
1172 whereLoopInit(p);-
1173 p->pNextLoop = 0;-
1174 }
executed 314590 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
else{
314590
1175-
1176-
1177-
1178 WhereLoop **ppTail = &p->pNextLoop;-
1179 WhereLoop *pToDel;-
1180 while( *
*ppTailDescription
TRUEevaluated 6656 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 45298 times by 1 test
Evaluated by:
  • Self test (438)
ppTail
*ppTailDescription
TRUEevaluated 6656 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 45298 times by 1 test
Evaluated by:
  • Self test (438)
){
6656-45298
1181 ppTail = whereLoopFindLesser(ppTail, pTemplate);-
1182 if( ppTail==0
ppTail==0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 6651 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 5 times by 1 test: break;
Executed by:
  • Self test (438)
5-6651
1183 pToDel = *ppTail;-
1184 if( pToDel==0
pToDel==0Description
TRUEevaluated 3414 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 3237 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 3414 times by 1 test: break;
Executed by:
  • Self test (438)
3237-3414
1185 *ppTail = pToDel->pNextLoop;-
1186-
1187-
1188-
1189-
1190-
1191-
1192 whereLoopDelete(db, pToDel);-
1193 }
executed 3237 times by 1 test: end of block
Executed by:
  • Self test (438)
3237
1194 }
executed 48717 times by 1 test: end of block
Executed by:
  • Self test (438)
48717
1195 rc = whereLoopXfer(db, p, pTemplate);-
1196 if( (
(p->wsFlags & 0x00000400)==0Description
TRUEevaluated 351525 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 11782 times by 1 test
Evaluated by:
  • Self test (438)
p->wsFlags & 0x00000400)==0
(p->wsFlags & 0x00000400)==0Description
TRUEevaluated 351525 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 11782 times by 1 test
Evaluated by:
  • Self test (438)
){
11782-351525
1197 Index *pIndex = p->u.btree.pIndex;-
1198 if( pIndex
pIndexDescription
TRUEevaluated 298457 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 53068 times by 33 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (42)
  • Self test (438)
  • Self test (44)
  • Self test (46)
  • Self test (47)
  • Self test (48)
  • Self test (5)
  • Self test (57)
  • Self test (58)
  • Self test (72)
  • Self test (73)
  • Self test (91)
  • ...
&& pIndex->tnum==0
pIndex->tnum==0Description
TRUEevaluated 251433 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
FALSEevaluated 47024 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (47)
){
47024-298457
1199 p->u.btree.pIndex = 0;-
1200 }
executed 251433 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
251433
1201 }
executed 351525 times by 435 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
351525
1202 return
executed 363307 times by 435 tests: return rc;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
rc;
executed 363307 times by 435 tests: return rc;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
363307
1203}-
1204static void whereLoopOutputAdjust(-
1205 WhereClause *pWC,-
1206 WhereLoop *pLoop,-
1207 LogEst nRow-
1208){-
1209 WhereTerm *pTerm, *pX;-
1210 Bitmask notAllowed = ~(pLoop->prereq|pLoop->maskSelf);-
1211 int i, j, k;-
1212 LogEst iReduce = 0;-
1213-
1214 -
1215 ((void) (0))-
1216 ;-
1217 for(i=pWC->nTerm, pTerm=pWC->a; i>0
i>0Description
TRUEevaluated 531583 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
FALSEevaluated 311256 times by 435 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (11)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (12)
  • Self test (120)
  • Self test (121)
  • ...
; i--, pTerm++){
311256-531583
1218 if( (
(pTerm->wtFlags & 0x02)!=0Description
TRUEevaluated 61528 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 470055 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
pTerm->wtFlags & 0x02)!=0
(pTerm->wtFlags & 0x02)!=0Description
TRUEevaluated 61528 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 470055 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
) break;
executed 61528 times by 1 test: break;
Executed by:
  • Self test (438)
61528-470055
1219 if( (
(pTerm->prereq...->maskSelf)==0Description
TRUEevaluated 106662 times by 4 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (438)
  • Self test (47)
FALSEevaluated 363393 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
pTerm->prereqAll & pLoop->maskSelf)==0
(pTerm->prereq...->maskSelf)==0Description
TRUEevaluated 106662 times by 4 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (438)
  • Self test (47)
FALSEevaluated 363393 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
) continue;
executed 106662 times by 4 tests: continue;
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (438)
  • Self test (47)
106662-363393
1220 if( (
(pTerm->prereq...notAllowed)!=0Description
TRUEevaluated 22004 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 341389 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
pTerm->prereqAll & notAllowed)!=0
(pTerm->prereq...notAllowed)!=0Description
TRUEevaluated 22004 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 341389 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
) continue;
executed 22004 times by 1 test: continue;
Executed by:
  • Self test (438)
22004-341389
1221 for(j=pLoop->nLTerm-1; j>=0
j>=0Description
TRUEevaluated 173165 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 250069 times by 366 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (106)
  • Self test (107)
  • Self test (108)
  • Self test (109)
  • Self test (110)
  • Self test (111)
  • Self test (112)
  • Self test (113)
  • Self test (114)
  • Self test (115)
  • Self test (116)
  • Self test (117)
  • Self test (118)
  • Self test (119)
  • Self test (120)
  • Self test (121)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
; j--){
173165-250069
1222 pX = pLoop->aLTerm[j];-
1223 if( pX==0
pX==0Description
TRUEevaluated 113 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 173052 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 113 times by 1 test: continue;
Executed by:
  • Self test (438)
113-173052
1224 if( pX==pTerm
pX==pTermDescription
TRUEevaluated 69579 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 103473 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 69579 times by 1 test: break;
Executed by:
  • Self test (438)
69579-103473
1225 if( pX->iParent>=0
pX->iParent>=0Description
TRUEevaluated 51307 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 52166 times by 1 test
Evaluated by:
  • Self test (438)
&& (
(&pWC->a[pX->iParent])==pTermDescription
TRUEevaluated 21741 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 29566 times by 1 test
Evaluated by:
  • Self test (438)
&pWC->a[pX->iParent])==pTerm
(&pWC->a[pX->iParent])==pTermDescription
TRUEevaluated 21741 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 29566 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 21741 times by 1 test: break;
Executed by:
  • Self test (438)
21741-52166
1226 }