OpenCoverage

btree.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/sqlite/src/src/btree.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6static const char zMagicHeader[] = "SQLite format 3";-
7BtShared * sqlite3SharedCacheList = 0;-
8int sqlite3_enable_shared_cache(int enable){-
9 sqlite3Config.sharedCacheEnabled = enable;-
10 return
executed 114 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 114 times by 1 test: return 0;
Executed by:
  • Self test (438)
114
11}-
12static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){-
13 BtShared *pBt = p->pBt;-
14 BtLock *pIter;-
15-
16 -
17 ((void) (0))-
18 ;-
19 -
20 ((void) (0))-
21 ;-
22 -
23 ((void) (0))-
24 ;-
25 -
26 ((void) (0))-
27 ;-
28-
29-
30-
31-
32-
33 -
34 ((void) (0))-
35 ;-
36 -
37 ((void) (0))-
38 ;-
39-
40-
41 if( !p->sharable
!p->sharableDescription
TRUEevaluated 895956 times by 436 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 7439 times by 1 test
Evaluated by:
  • Self test (438)
){
7439-895956
42 return
executed 895956 times by 436 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 895956 times by 436 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)
  • ...
895956
43 }-
44-
45-
46-
47-
48 if( pBt->pWriter!=p
pBt->pWriter!=pDescription
TRUEevaluated 5667 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1772 times by 1 test
Evaluated by:
  • Self test (438)
&& (
(pBt->btsFlags & 0x0040)!=0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5661 times by 1 test
Evaluated by:
  • Self test (438)
pBt->btsFlags & 0x0040)!=0
(pBt->btsFlags & 0x0040)!=0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5661 times by 1 test
Evaluated by:
  • Self test (438)
){
6-5667
49 ;-
50 return
executed 6 times by 1 test: return (6 | (1<<8));
Executed by:
  • Self test (438)
(6 | (1<<8));
executed 6 times by 1 test: return (6 | (1<<8));
Executed by:
  • Self test (438)
6
51 }-
52-
53 for(pIter=pBt->pLock; pIter
pIterDescription
TRUEevaluated 6163 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7378 times by 1 test
Evaluated by:
  • Self test (438)
; pIter=pIter->pNext){
6163-7378
54 -
55 ((void) (0))-
56 ;-
57 -
58 ((void) (0))-
59 ;-
60 if( pIter->pBtree!=p
pIter->pBtree!=pDescription
TRUEevaluated 1877 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4286 times by 1 test
Evaluated by:
  • Self test (438)
&& pIter->iTable==iTab
pIter->iTable==iTabDescription
TRUEevaluated 742 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1135 times by 1 test
Evaluated by:
  • Self test (438)
&& pIter->eLock!=eLock
pIter->eLock!=eLockDescription
TRUEevaluated 55 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 687 times by 1 test
Evaluated by:
  • Self test (438)
){
55-4286
61 ;-
62 if( eLock==2
eLock==2Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 37 times by 1 test
Evaluated by:
  • Self test (438)
){
18-37
63 -
64 ((void) (0))-
65 ;-
66 pBt->btsFlags |= 0x0080;-
67 }
executed 18 times by 1 test: end of block
Executed by:
  • Self test (438)
18
68 return
executed 55 times by 1 test: return (6 | (1<<8));
Executed by:
  • Self test (438)
(6 | (1<<8));
executed 55 times by 1 test: return (6 | (1<<8));
Executed by:
  • Self test (438)
55
69 }-
70 }
executed 6108 times by 1 test: end of block
Executed by:
  • Self test (438)
6108
71 return
executed 7378 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 7378 times by 1 test: return 0;
Executed by:
  • Self test (438)
7378
72}-
73static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){-
74 BtShared *pBt = p->pBt;-
75 BtLock *pLock = 0;-
76 BtLock *pIter;-
77-
78 -
79 ((void) (0))-
80 ;-
81 -
82 ((void) (0))-
83 ;-
84 -
85 ((void) (0))-
86 ;-
87-
88-
89-
90-
91-
92 -
93 ((void) (0))-
94 ;-
95-
96-
97-
98 -
99 ((void) (0))-
100 ;-
101 -
102 ((void) (0))-
103 ;-
104-
105-
106 for(pIter=pBt->pLock; pIter
pIterDescription
TRUEevaluated 2383 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 713 times by 1 test
Evaluated by:
  • Self test (438)
; pIter=pIter->pNext){
713-2383
107 if( pIter->iTable==iTable
pIter->iTable==iTableDescription
TRUEevaluated 1104 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1279 times by 1 test
Evaluated by:
  • Self test (438)
&& pIter->pBtree==p
pIter->pBtree==pDescription
TRUEevaluated 1073 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 31 times by 1 test
Evaluated by:
  • Self test (438)
){
31-1279
108 pLock = pIter;-
109 break;
executed 1073 times by 1 test: break;
Executed by:
  • Self test (438)
1073
110 }-
111 }
executed 1310 times by 1 test: end of block
Executed by:
  • Self test (438)
1310
112-
113-
114-
115-
116 if( !pLock
!pLockDescription
TRUEevaluated 713 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1073 times by 1 test
Evaluated by:
  • Self test (438)
){
713-1073
117 pLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));-
118 if( !pLock
!pLockDescription
TRUEnever evaluated
FALSEevaluated 713 times by 1 test
Evaluated by:
  • Self test (438)
){
0-713
119 return
never executed: return 7;
7;
never executed: return 7;
0
120 }-
121 pLock->iTable = iTable;-
122 pLock->pBtree = p;-
123 pLock->pNext = pBt->pLock;-
124 pBt->pLock = pLock;-
125 }
executed 713 times by 1 test: end of block
Executed by:
  • Self test (438)
713
126-
127-
128-
129-
130-
131 -
132 ((void) (0))-
133 ;-
134 if( eLock>pLock->eLock
eLock>pLock->eLockDescription
TRUEevaluated 926 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 860 times by 1 test
Evaluated by:
  • Self test (438)
){
860-926
135 pLock->eLock = eLock;-
136 }
executed 926 times by 1 test: end of block
Executed by:
  • Self test (438)
926
137-
138 return
executed 1786 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 1786 times by 1 test: return 0;
Executed by:
  • Self test (438)
1786
139}-
140static void clearAllSharedCacheTableLocks(Btree *p){-
141 BtShared *pBt = p->pBt;-
142 BtLock **ppIter = &pBt->pLock;-
143-
144 -
145 ((void) (0))-
146 ;-
147 -
148 ((void) (0))-
149 ;-
150 -
151 ((void) (0))-
152 ;-
153-
154 while( *
*ppIterDescription
TRUEevaluated 2515 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 260919 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)
  • ...
ppIter
*ppIterDescription
TRUEevaluated 2515 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 260919 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)
  • ...
){
2515-260919
155 BtLock *pLock = *ppIter;-
156 -
157 ((void) (0))-
158 ;-
159 -
160 ((void) (0))-
161 ;-
162 if( pLock->pBtree==p
pLock->pBtree==pDescription
TRUEevaluated 1900 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 615 times by 1 test
Evaluated by:
  • Self test (438)
){
615-1900
163 *ppIter = pLock->pNext;-
164 -
165 ((void) (0))-
166 ;-
167 if( pLock->iTable!=1
pLock->iTable!=1Description
TRUEevaluated 713 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1187 times by 1 test
Evaluated by:
  • Self test (438)
){
713-1187
168 sqlite3_free(pLock);-
169 }
executed 713 times by 1 test: end of block
Executed by:
  • Self test (438)
713
170 }
executed 1900 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
1900
171 ppIter = &pLock->pNext;-
172 }
executed 615 times by 1 test: end of block
Executed by:
  • Self test (438)
615
173 }-
174-
175 -
176 ((void) (0))-
177 ;-
178 if( pBt->pWriter==p
pBt->pWriter==pDescription
TRUEevaluated 162461 times by 62 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (14)
  • Self test (15)
  • Self test (18)
  • Self test (19)
  • Self test (2)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (3)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (38)
  • ...
FALSEevaluated 98458 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)
  • ...
){
98458-162461
179 pBt->pWriter = 0;-
180 pBt->btsFlags &= ~(0x0040|0x0080);-
181 }
executed 162461 times by 62 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (14)
  • Self test (15)
  • Self test (18)
  • Self test (19)
  • Self test (2)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (3)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (38)
  • ...
else if( pBt->nTransaction==2
pBt->nTransaction==2Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 98388 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)
  • ...
){
70-162461
182 pBt->btsFlags &= ~0x0080;-
183 }
executed 70 times by 1 test: end of block
Executed by:
  • Self test (438)
70
184}
executed 260919 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)
  • ...
260919
185-
186-
187-
188-
189static void downgradeAllSharedCacheTableLocks(Btree *p){-
190 BtShared *pBt = p->pBt;-
191 if( pBt->pWriter==p
pBt->pWriter==pDescription
TRUEevaluated 1106 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 144045 times by 1 test
Evaluated by:
  • Self test (438)
){
1106-144045
192 BtLock *pLock;-
193 pBt->pWriter = 0;-
194 pBt->btsFlags &= ~(0x0040|0x0080);-
195 for(pLock=pBt->pLock; pLock
pLockDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1106 times by 1 test
Evaluated by:
  • Self test (438)
; pLock=pLock->pNext){
2-1106
196 -
197 ((void) (0))-
198 ;-
199 pLock->eLock = 1;-
200 }
executed 2 times by 1 test: end of block
Executed by:
  • Self test (438)
2
201 }
executed 1106 times by 1 test: end of block
Executed by:
  • Self test (438)
1106
202}
executed 145151 times by 1 test: end of block
Executed by:
  • Self test (438)
145151
203-
204-
205-
206static void releasePage(MemPage *pPage);-
207static void releasePageOne(MemPage *pPage);-
208static void releasePageNotNull(MemPage *pPage);-
209static void invalidateAllOverflowCache(BtShared *pBt){-
210 BtCursor *p;-
211 -
212 ((void) (0))-
213 ;-
214 for(p=pBt->pCursor; p
pDescription
TRUEevaluated 448 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 15011 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
; p=p->pNext){
448-15011
215 (p->curFlags &= ~0x04);-
216 }
executed 448 times by 1 test: end of block
Executed by:
  • Self test (438)
448
217}
executed 15011 times by 4 tests: end of block
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
15011
218static void invalidateIncrblobCursors(-
219 Btree *pBtree,-
220 Pgno pgnoRoot,-
221 i64 iRow,-
222 int isClearTable-
223){-
224 BtCursor *p;-
225 if( pBtree->hasIncrblobCur==0
pBtree->hasIncrblobCur==0Description
TRUEevaluated 7100521 times by 391 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • ...
FALSEevaluated 225 times by 1 test
Evaluated by:
  • Self test (438)
) return;
executed 7100521 times by 391 tests: return;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • ...
225-7100521
226 -
227 ((void) (0))-
228 ;-
229 pBtree->hasIncrblobCur = 0;-
230 for(p=pBtree->pBt->pCursor; p
pDescription
TRUEevaluated 12324 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 225 times by 1 test
Evaluated by:
  • Self test (438)
; p=p->pNext){
225-12324
231 if( (
(p->curFlags & 0x10)!=0Description
TRUEevaluated 11981 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 343 times by 1 test
Evaluated by:
  • Self test (438)
p->curFlags & 0x10)!=0
(p->curFlags & 0x10)!=0Description
TRUEevaluated 11981 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 343 times by 1 test
Evaluated by:
  • Self test (438)
){
343-11981
232 pBtree->hasIncrblobCur = 1;-
233 if( p->pgnoRoot==pgnoRoot
p->pgnoRoot==pgnoRootDescription
TRUEevaluated 11971 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test (438)
&& (isClearTable
isClearTableDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 11899 times by 1 test
Evaluated by:
  • Self test (438)
|| p->info.nKey==iRow
p->info.nKey==iRowDescription
TRUEevaluated 45 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 11854 times by 1 test
Evaluated by:
  • Self test (438)
) ){
10-11971
234 p->eState = 1;-
235 }
executed 117 times by 1 test: end of block
Executed by:
  • Self test (438)
117
236 }
executed 11981 times by 1 test: end of block
Executed by:
  • Self test (438)
11981
237 }
executed 12324 times by 1 test: end of block
Executed by:
  • Self test (438)
12324
238}
executed 225 times by 1 test: end of block
Executed by:
  • Self test (438)
225
239static int btreeSetHasContent(BtShared *pBt, Pgno pgno){-
240 int rc = 0;-
241 if( !pBt->pHasContent
!pBt->pHasContentDescription
TRUEevaluated 3112 times by 15 tests
Evaluated by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
FALSEevaluated 264587 times by 15 tests
Evaluated by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
){
3112-264587
242 -
243 ((void) (0))-
244 ;-
245 pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);-
246 if( !pBt->pHasContent
!pBt->pHasContentDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 3111 times by 15 tests
Evaluated by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
){
1-3111
247 rc = 7;-
248 }
executed 1 time by 1 test: end of block
Executed by:
  • Self test (438)
1
249 }
executed 3112 times by 15 tests: end of block
Executed by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
3112
250 if( rc==0
rc==0Description
TRUEevaluated 267698 times by 15 tests
Evaluated by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
&& pgno<=sqlite3BitvecSize(pBt->pHasContent)
pgno<=sqlite3B...->pHasContent)Description
TRUEevaluated 241569 times by 15 tests
Evaluated by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
FALSEevaluated 26129 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (54)
){
1-267698
251 rc = sqlite3BitvecSet(pBt->pHasContent, pgno);-
252 }
executed 241569 times by 15 tests: end of block
Executed by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
241569
253 return
executed 267699 times by 15 tests: return rc;
Executed by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
rc;
executed 267699 times by 15 tests: return rc;
Executed by:
  • Self test
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (8)
267699
254}-
255static int btreeGetHasContent(BtShared *pBt, Pgno pgno){-
256 Bitvec *p = pBt->pHasContent;-
257 return
executed 148719 times by 11 tests: return (p && (pgno>sqlite3BitvecSize(p) || sqlite3BitvecTest(p, pgno)));
Executed by:
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (54)
  • Self test (6)
  • Self test (8)
(p
pDescription
TRUEevaluated 119937 times by 11 tests
Evaluated by:
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (54)
  • Self test (6)
  • Self test (8)
FALSEevaluated 28782 times by 1 test
Evaluated by:
  • Self test (438)
&& (pgno>sqlite3BitvecSize(p)
pgno>sqlite3BitvecSize(p)Description
TRUEevaluated 25284 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 94653 times by 11 tests
Evaluated by:
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (54)
  • Self test (6)
  • Self test (8)
|| sqlite3BitvecTest(p, pgno)
sqlite3BitvecTest(p, pgno)Description
TRUEevaluated 92949 times by 11 tests
Evaluated by:
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (54)
  • Self test (6)
  • Self test (8)
FALSEevaluated 1704 times by 1 test
Evaluated by:
  • Self test (438)
));
executed 148719 times by 11 tests: return (p && (pgno>sqlite3BitvecSize(p) || sqlite3BitvecTest(p, pgno)));
Executed by:
  • Self test (14)
  • Self test (16)
  • Self test (18)
  • Self test (20)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (54)
  • Self test (6)
  • Self test (8)
1704-148719
258}-
259-
260-
261-
262-
263-
264static void btreeClearHasContent(BtShared *pBt){-
265 sqlite3BitvecDestroy(pBt->pHasContent);-
266 pBt->pHasContent = 0;-
267}
executed 163567 times by 62 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (14)
  • Self test (15)
  • Self test (18)
  • Self test (19)
  • Self test (2)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (3)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (38)
  • ...
163567
268-
269-
270-
271-
272static void btreeReleaseAllCursorPages(BtCursor *pCur){-
273 int i;-
274 if( pCur->iPage>=0
pCur->iPage>=0Description
TRUEevaluated 2150169 times by 434 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 5508367 times by 42 tests
Evaluated by:
  • 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 (43)
  • Self test (438)
  • Self test (45)
  • Self test (47)
  • Self test (53)
  • Self test (64)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • ...
){
2150169-5508367
275 for(i=0; i<pCur->iPage
i<pCur->iPageDescription
TRUEevaluated 2465930 times by 108 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (14)
  • Self test (16)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (353)
  • Self test (354)
  • Self test (355)
  • Self test (356)
  • Self test (357)
  • Self test (358)
  • Self test (359)
  • Self test (360)
  • Self test (361)
  • Self test (362)
  • ...
FALSEevaluated 2150169 times by 434 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++){
2150169-2465930
276 releasePageNotNull(pCur->apPage[i]);-
277 }
executed 2465930 times by 108 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (14)
  • Self test (16)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (32)
  • Self test (33)
  • Self test (353)
  • Self test (354)
  • Self test (355)
  • Self test (356)
  • Self test (357)
  • Self test (358)
  • Self test (359)
  • Self test (360)
  • Self test (361)
  • Self test (362)
  • ...
2465930
278 releasePageNotNull(pCur->pPage);-
279 pCur->iPage = -1;-
280 }
executed 2150169 times by 434 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)
  • ...
2150169
281}
executed 7658536 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)
  • ...
7658536
282static int saveCursorKey(BtCursor *pCur){-
283 int rc = 0;-
284 -
285 ((void) (0))-
286 ;-
287 -
288 ((void) (0))-
289 ;-
290 -
291 ((void) (0))-
292 ;-
293-
294 if( pCur->curIntKey
pCur->curIntKeyDescription
TRUEevaluated 176149 times by 17 tests
Evaluated by:
  • Self test (100)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 1717 times by 1 test
Evaluated by:
  • Self test (438)
){
1717-176149
295-
296 pCur->nKey = sqlite3BtreeIntegerKey(pCur);-
297 }
executed 176149 times by 17 tests: end of block
Executed by:
  • Self test (100)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
else{
176149
298-
299 void *pKey;-
300 pCur->nKey = sqlite3BtreePayloadSize(pCur);-
301 pKey = sqlite3Malloc( pCur->nKey );-
302 if( pKey
pKeyDescription
TRUEevaluated 1717 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
){
0-1717
303 rc = sqlite3BtreePayload(pCur, 0, (int)pCur->nKey, pKey);-
304 if( rc==0
rc==0Description
TRUEevaluated 1717 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
){
0-1717
305 pCur->pKey = pKey;-
306 }
executed 1717 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
1717
307 sqlite3_free(pKey);-
308 }
never executed: end of block
0
309 }else{-
310 rc = 7;-
311 }
never executed: end of block
0
312 }-
313 -
314 ((void) (0))-
315 ;-
316 return
executed 177866 times by 17 tests: return rc;
Executed by:
  • Self test (100)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
rc;
executed 177866 times by 17 tests: return rc;
Executed by:
  • Self test (100)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
177866
317}-
318static int saveCursorPosition(BtCursor *pCur){-
319 int rc;-
320-
321 -
322 ((void) (0))-
323 ;-
324 -
325 ((void) (0))-
326 ;-
327 -
328 ((void) (0))-
329 ;-
330-
331 if( pCur->eState==2
pCur->eState==2Description
TRUEevaluated 15237 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 26005 times by 13 tests
Evaluated by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
){
15237-26005
332 pCur->eState = 0;-
333 }
executed 15237 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
15237
334 pCur->skipNext = 0;-
335 }
executed 26005 times by 13 tests: end of block
Executed by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
26005
336-
337 rc = saveCursorKey(pCur);-
338 if( rc==0
rc==0Description
TRUEevaluated 41242 times by 13 tests
Evaluated by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEnever evaluated
){
0-41242
339 btreeReleaseAllCursorPages(pCur);-
340 pCur->eState = 3;-
341 }
executed 41242 times by 13 tests: end of block
Executed by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
41242
342-
343 pCur->curFlags &= ~(0x02|0x04|0x08);-
344 return
executed 41242 times by 13 tests: return rc;
Executed by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
rc;
executed 41242 times by 13 tests: return rc;
Executed by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
41242
345}-
346-
347-
348static int __attribute__((noinline)) saveCursorsOnList(BtCursor*,Pgno,BtCursor*);-
349static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){-
350 BtCursor *p;-
351 -
352 ((void) (0))-
353 ;-
354 -
355 ((void) (0))-
356 ;-
357 for(p=pBt->pCursor; p
pDescription
TRUEevaluated 1517187 times by 18 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 160273 times by 71 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (102)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (24)
  • Self test (25)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (35)
  • Self test (36)
  • Self test (37)
  • Self test (38)
  • Self test (39)
  • Self test (40)
  • Self test (41)
  • Self test (42)
  • ...
; p=p->pNext){
160273-1517187
358 if( p!=pExcept
p!=pExceptDescription
TRUEevaluated 924161 times by 18 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 593026 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
&& (0==iRoot
0==iRootDescription
TRUEevaluated 334 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 923827 times by 18 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
|| p->pgnoRoot==iRoot
p->pgnoRoot==iRootDescription
TRUEevaluated 802236 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 121591 times by 6 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
) ) break;
executed 802570 times by 15 tests: break;
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
334-924161
359 }
executed 714617 times by 18 tests: end of block
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
714617
360 if( p
pDescription
TRUEevaluated 802570 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 160273 times by 71 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (102)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (24)
  • Self test (25)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (35)
  • Self test (36)
  • Self test (37)
  • Self test (38)
  • Self test (39)
  • Self test (40)
  • Self test (41)
  • Self test (42)
  • ...
) return
executed 802570 times by 15 tests: return saveCursorsOnList(p, iRoot, pExcept);
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
saveCursorsOnList(p, iRoot, pExcept);
executed 802570 times by 15 tests: return saveCursorsOnList(p, iRoot, pExcept);
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
160273-802570
361 if( pExcept
pExceptDescription
TRUEevaluated 604 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 159669 times by 71 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (102)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (24)
  • Self test (25)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (35)
  • Self test (36)
  • Self test (37)
  • Self test (38)
  • Self test (39)
  • Self test (40)
  • Self test (41)
  • Self test (42)
  • ...
) pExcept->curFlags &= ~0x20;
executed 604 times by 1 test: pExcept->curFlags &= ~0x20;
Executed by:
  • Self test (438)
604-159669
362 return
executed 160273 times by 71 tests: return 0;
Executed by:
  • Self test
  • Self test (101)
  • Self test (102)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (24)
  • Self test (25)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (35)
  • Self test (36)
  • Self test (37)
  • Self test (38)
  • Self test (39)
  • Self test (40)
  • Self test (41)
  • Self test (42)
  • ...
0;
executed 160273 times by 71 tests: return 0;
Executed by:
  • Self test
  • Self test (101)
  • Self test (102)
  • Self test (103)
  • Self test (104)
  • Self test (105)
  • Self test (24)
  • Self test (25)
  • Self test (26)
  • Self test (27)
  • Self test (28)
  • Self test (29)
  • Self test (30)
  • Self test (31)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (35)
  • Self test (36)
  • Self test (37)
  • Self test (38)
  • Self test (39)
  • Self test (40)
  • Self test (41)
  • Self test (42)
  • ...
160273
363}-
364-
365-
366-
367-
368-
369-
370static int __attribute__((noinline)) saveCursorsOnList(-
371 BtCursor *p,-
372 Pgno iRoot,-
373 BtCursor *pExcept-
374){-
375 do{-
376 if( p!=pExcept
p!=pExceptDescription
TRUEevaluated 7358596 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 136491 times by 1 test
Evaluated by:
  • Self test (438)
&& (0==iRoot
0==iRootDescription
TRUEevaluated 536 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7358060 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
|| p->pgnoRoot==iRoot
p->pgnoRoot==iRootDescription
TRUEevaluated 5605600 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 1752460 times by 1 test
Evaluated by:
  • Self test (438)
) ){
536-7358596
377 if( p->eState==0
p->eState==0Description
TRUEevaluated 25799 times by 13 tests
Evaluated by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 5580337 times by 5 tests
Evaluated by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
|| p->eState==2
p->eState==2Description
TRUEevaluated 15237 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5565100 times by 5 tests
Evaluated by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
){
15237-5580337
378 int rc = saveCursorPosition(p);-
379 if( 0!=rc
0!=rcDescription
TRUEnever evaluated
FALSEevaluated 41036 times by 13 tests
Evaluated by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
){
0-41036
380 return
never executed: return rc;
rc;
never executed: return rc;
0
381 }-
382 }
executed 41036 times by 13 tests: end of block
Executed by:
  • Self test (100)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
else{
41036
383 ;-
384 btreeReleaseAllCursorPages(p);-
385 }
executed 5565100 times by 5 tests: end of block
Executed by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
5565100
386 }-
387 p = p->pNext;-
388 }
executed 7495087 times by 15 tests: end of block
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
while( p
pDescription
TRUEevaluated 6692517 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 802570 times by 15 tests
Evaluated by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
);
802570-7495087
389 return
executed 802570 times by 15 tests: return 0;
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
0;
executed 802570 times by 15 tests: return 0;
Executed by:
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
802570
390}-
391-
392-
393-
394-
395void sqlite3BtreeClearCursor(BtCursor *pCur){-
396 -
397 ((void) (0))-
398 ;-
399 sqlite3_free(pCur->pKey);-
400 pCur->pKey = 0;-
401 pCur->eState = 1;-
402}
executed 42078 times by 1 test: end of block
Executed by:
  • Self test (438)
42078
403-
404-
405-
406-
407-
408-
409static int btreeMoveto(-
410 BtCursor *pCur,-
411 const void *pKey,-
412 i64 nKey,-
413 int bias,-
414 int *pRes-
415){-
416 int rc;-
417 UnpackedRecord *pIdxKey;-
418-
419 if( pKey
pKeyDescription
TRUEevaluated 49445 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 137562 times by 5 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
){
49445-137562
420 -
421 ((void) (0))-
422 ;-
423 pIdxKey = sqlite3VdbeAllocUnpackedRecord(pCur->pKeyInfo);-
424 if( pIdxKey==0
pIdxKey==0Description
TRUEnever evaluated
FALSEevaluated 49445 times by 1 test
Evaluated by:
  • Self test (438)
) return
never executed: return 7;
7;
never executed: return 7;
0-49445
425 sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey);-
426 if( pIdxKey->nField==0
pIdxKey->nField==0Description
TRUEnever evaluated
FALSEevaluated 49445 times by 1 test
Evaluated by:
  • Self test (438)
){
0-49445
427 rc = sqlite3CorruptError(806);-
428 goto
never executed: goto moveto_done;
moveto_done;
never executed: goto moveto_done;
0
429 }-
430 }
executed 49445 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
49445
431 pIdxKey = 0;-
432 }
executed 137562 times by 5 tests: end of block
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
137562
433 rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);-
434moveto_done:
code before this statement executed 187007 times by 5 tests: moveto_done:
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
187007
435 if( pIdxKey
pIdxKeyDescription
TRUEevaluated 49445 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 137562 times by 5 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
){
49445-137562
436 sqlite3DbFree(pCur->pKeyInfo->db, pIdxKey);-
437 }
executed 49445 times by 1 test: end of block
Executed by:
  • Self test (438)
49445
438 return
executed 187007 times by 5 tests: return rc;
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
rc;
executed 187007 times by 5 tests: return rc;
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
187007
439}-
440static int btreeRestoreCursorPosition(BtCursor *pCur){-
441 int rc;-
442 int skipNext;-
443 -
444 ((void) (0))-
445 ;-
446 -
447 ((void) (0))-
448 ;-
449 if( pCur->eState==4
pCur->eState==4Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 137954 times by 5 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
){
4-137954
450 return
executed 4 times by 1 test: return pCur->skipNext;
Executed by:
  • Self test (438)
pCur->skipNext;
executed 4 times by 1 test: return pCur->skipNext;
Executed by:
  • Self test (438)
4
451 }-
452 pCur->eState = 1;-
453 rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);-
454 if( rc==0
rc==0Description
TRUEevaluated 137954 times by 5 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
FALSEnever evaluated
){
0-137954
455 sqlite3_free(pCur->pKey);-
456 pCur->pKey = 0;-
457 -
458 ((void) (0))-
459 ;-
460 pCur->skipNext |= skipNext;-
461 if( pCur->skipNext
pCur->skipNextDescription
TRUEevaluated 136623 times by 5 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
FALSEevaluated 1331 times by 1 test
Evaluated by:
  • Self test (438)
&& pCur->eState==0
pCur->eState==0Description
TRUEevaluated 135827 times by 5 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
FALSEevaluated 796 times by 3 tests
Evaluated by:
  • Self test (24)
  • Self test (28)
  • Self test (438)
){
796-136623
462 pCur->eState = 2;-
463 }
executed 135827 times by 5 tests: end of block
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
135827
464 }
executed 137954 times by 5 tests: end of block
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
137954
465 return
executed 137954 times by 5 tests: return rc;
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
rc;
executed 137954 times by 5 tests: return rc;
Executed by:
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
137954
466}-
467int sqlite3BtreeCursorHasMoved(BtCursor *pCur){-
468 -
469 ((void) (0))-
470 -
471 ;-
472 -
473 ((void) (0))-
474 ;-
475 -
476 ((void) (0))-
477 ;-
478 return
executed 38716744 times by 434 tests: return 0 != *(u8*)pCur;
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 != *(u8*)pCur;
executed 38716744 times by 434 tests: return 0 != *(u8*)pCur;
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)
  • ...
38716744
479}-
480-
481-
482-
483-
484-
485-
486BtCursor *sqlite3BtreeFakeValidCursor(void){-
487 static u8 fakeCursor = 0;-
488 -
489 ((void) (0))-
490 ;-
491 return
executed 58178 times by 1 test: return (BtCursor*)&fakeCursor;
Executed by:
  • Self test (438)
(BtCursor*)&fakeCursor;
executed 58178 times by 1 test: return (BtCursor*)&fakeCursor;
Executed by:
  • Self test (438)
58178
492}-
493int sqlite3BtreeCursorRestore(BtCursor *pCur, int *pDifferentRow){-
494 int rc;-
495-
496 -
497 ((void) (0))-
498 ;-
499 -
500 ((void) (0))-
501 ;-
502 rc = (pCur->eState>=3
pCur->eState>=3Description
TRUEevaluated 50 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1606 times by 1 test
Evaluated by:
  • Self test (438)
? btreeRestoreCursorPosition(pCur) : 0);
50-1606
503 if( rc
rcDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1655 times by 1 test
Evaluated by:
  • Self test (438)
){
1-1655
504 *pDifferentRow = 1;-
505 return
executed 1 time by 1 test: return rc;
Executed by:
  • Self test (438)
rc;
executed 1 time by 1 test: return rc;
Executed by:
  • Self test (438)
1
506 }-
507 if( pCur->eState!=0
pCur->eState!=0Description
TRUEevaluated 1631 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 24 times by 1 test
Evaluated by:
  • Self test (438)
){
24-1631
508 *pDifferentRow = 1;-
509 }
executed 1631 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
1631
510 -
511 ((void) (0))-
512 ;-
513 *pDifferentRow = 0;-
514 }
executed 24 times by 1 test: end of block
Executed by:
  • Self test (438)
24
515 return
executed 1655 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 1655 times by 1 test: return 0;
Executed by:
  • Self test (438)
1655
516}-
517void sqlite3BtreeCursorHintFlags(BtCursor *pCur, unsigned x){-
518 -
519 ((void) (0))-
520 ;-
521 pCur->hints = x;-
522}
executed 1856225 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)
  • ...
1856225
523static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){-
524 int nPagesPerMapPage;-
525 Pgno iPtrMap, ret;-
526 -
527 ((void) (0))-
528 ;-
529 if( pgno<2
pgno<2Description
TRUEevaluated 15391 times by 14 tests
Evaluated by:
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • Self test (74)
FALSEevaluated 2199107 times by 15 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • Self test (74)
) return
executed 15391 times by 14 tests: return 0;
Executed by:
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • Self test (74)
0;
executed 15391 times by 14 tests: return 0;
Executed by:
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • Self test (74)
15391-2199107
530 nPagesPerMapPage = (pBt->usableSize/5)+1;-
531 iPtrMap = (pgno-2)/nPagesPerMapPage;-
532 ret = (iPtrMap*nPagesPerMapPage) + 2;-
533 if( ret==((Pgno)((sqlite3PendingByte/((pBt)->pageSize))+1))
ret==((Pgno)((...pageSize))+1))Description
TRUEevaluated 98669 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (71)
FALSEevaluated 2100438 times by 14 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (74)
){
98669-2100438
534 ret++;-
535 }
executed 98669 times by 2 tests: end of block
Executed by:
  • Self test (438)
  • Self test (71)
98669
536 return
executed 2199107 times by 15 tests: return ret;
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • Self test (74)
ret;
executed 2199107 times by 15 tests: return ret;
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
  • Self test (74)
2199107
537}-
538static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){-
539 DbPage *pDbPage;-
540 u8 *pPtrmap;-
541 Pgno iPtrmap;-
542 int offset;-
543 int rc;-
544-
545 if( *
*pRCDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 243598 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
pRC
*pRCDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 243598 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
) return;
executed 5 times by 1 test: return;
Executed by:
  • Self test (438)
5-243598
546-
547 -
548 ((void) (0))-
549 ;-
550-
551 -
552 ((void) (0))-
553 ;-
554-
555 -
556 ((void) (0))-
557 ;-
558 if( key==0
key==0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 243597 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
1-243597
559 *pRC = sqlite3CorruptError(986);-
560 return;
executed 1 time by 1 test: return;
Executed by:
  • Self test (438)
1
561 }-
562 iPtrmap = ptrmapPageno(pBt, key);-
563 rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);-
564 if( rc!=0
rc!=0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 243589 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
8-243589
565 *pRC = rc;-
566 return;
executed 8 times by 1 test: return;
Executed by:
  • Self test (438)
8
567 }-
568 offset = (5*(key-iPtrmap-1));-
569 if( offset<0
offset<0Description
TRUEnever evaluated
FALSEevaluated 243589 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
0-243589
570 *pRC = sqlite3CorruptError(997);-
571 goto
never executed: goto ptrmap_exit;
ptrmap_exit;
never executed: goto ptrmap_exit;
0
572 }-
573 -
574 ((void) (0))-
575 ;-
576 pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);-
577-
578 if( eType!=pPtrmap[offset]
eType!=pPtrmap[offset]Description
TRUEevaluated 108050 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
FALSEevaluated 135539 times by 3 tests
Evaluated by:
  • Self test (32)
  • Self test (33)
  • Self test (438)
|| sqlite3Get4byte(&pPtrmap[offset+1])!=parent
sqlite3Get4byt...et+1])!=parentDescription
TRUEevaluated 126480 times by 3 tests
Evaluated by:
  • Self test (32)
  • Self test (33)
  • Self test (438)
FALSEevaluated 9059 times by 3 tests
Evaluated by:
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
9059-135539
579 ;-
580 *pRC= rc = sqlite3PagerWrite(pDbPage);-
581 if( rc==0
rc==0Description
TRUEevaluated 234500 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
FALSEevaluated 30 times by 1 test
Evaluated by:
  • Self test (438)
){
30-234500
582 pPtrmap[offset] = eType;-
583 sqlite3Put4byte(&pPtrmap[offset+1], parent);-
584 }
executed 234500 times by 4 tests: end of block
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
234500
585 }
executed 234530 times by 4 tests: end of block
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
234530
586-
587ptrmap_exit:
code before this statement executed 243589 times by 4 tests: ptrmap_exit:
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
243589
588 sqlite3PagerUnref(pDbPage);-
589}
executed 243589 times by 4 tests: end of block
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
243589
590static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){-
591 DbPage *pDbPage;-
592 int iPtrmap;-
593 u8 *pPtrmap;-
594 int offset;-
595 int rc;-
596-
597 -
598 ((void) (0))-
599 ;-
600-
601 iPtrmap = ptrmapPageno(pBt, key);-
602 rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);-
603 if( rc!=0
rc!=0Description
TRUEnever evaluated
FALSEevaluated 298203 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
0-298203
604 return
never executed: return rc;
rc;
never executed: return rc;
0
605 }-
606 pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);-
607-
608 offset = (5*(key-iPtrmap-1));-
609 if( offset<0
offset<0Description
TRUEnever evaluated
FALSEevaluated 298203 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
0-298203
610 sqlite3PagerUnref(pDbPage);-
611 return
never executed: return sqlite3CorruptError(1042);
sqlite3CorruptError(1042);
never executed: return sqlite3CorruptError(1042);
0
612 }-
613 -
614 ((void) (0))-
615 ;-
616 -
617 ((void) (0))-
618 ;-
619 *pEType = pPtrmap[offset];-
620 if( pPgno
pPgnoDescription
TRUEevaluated 290806 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
FALSEevaluated 7397 times by 1 test
Evaluated by:
  • Self test (438)
) *
executed 290806 times by 4 tests: *pPgno = sqlite3Get4byte(&pPtrmap[offset+1]);
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
pPgno = sqlite3Get4byte(&pPtrmap[offset+1]);
executed 290806 times by 4 tests: *pPgno = sqlite3Get4byte(&pPtrmap[offset+1]);
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
7397-290806
621-
622 sqlite3PagerUnref(pDbPage);-
623 if( *
*pEType<1Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 298189 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
pEType<1
*pEType<1Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 298189 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
|| *
*pEType>5Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 298175 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
pEType>5
*pEType>5Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 298175 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
) return
executed 28 times by 1 test: return sqlite3CorruptError(1050);
Executed by:
  • Self test (438)
sqlite3CorruptError(1050);
executed 28 times by 1 test: return sqlite3CorruptError(1050);
Executed by:
  • Self test (438)
14-298189
624 return
executed 298175 times by 4 tests: return 0;
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
0;
executed 298175 times by 4 tests: return 0;
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
298175
625}-
626static __attribute__((noinline)) void btreeParseCellAdjustSizeForOverflow(-
627 MemPage *pPage,-
628 u8 *pCell,-
629 CellInfo *pInfo-
630){-
631 int minLocal;-
632 int maxLocal;-
633 int surplus;-
634-
635 minLocal = pPage->minLocal;-
636 maxLocal = pPage->maxLocal;-
637 surplus = minLocal + (pInfo->nPayload - minLocal)%(pPage->pBt->usableSize-4);-
638 ;-
639 ;-
640 if( surplus <= maxLocal
surplus <= maxLocalDescription
TRUEevaluated 234484 times by 6 tests
Evaluated by:
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (65)
  • Self test (75)
  • Self test (76)
FALSEevaluated 1988974 times by 363 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
){
234484-1988974
641 pInfo->nLocal = (u16)surplus;-
642 }
executed 234484 times by 6 tests: end of block
Executed by:
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (65)
  • Self test (75)
  • Self test (76)
else{
234484
643 pInfo->nLocal = (u16)minLocal;-
644 }
executed 1988974 times by 363 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
1988974
645 pInfo->nSize = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell) + 4;-
646}
executed 2223458 times by 366 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
2223458
647static void btreeParseCellPtrNoPayload(-
648 MemPage *pPage,-
649 u8 *pCell,-
650 CellInfo *pInfo-
651){-
652 -
653 ((void) (0))-
654 ;-
655 -
656 ((void) (0))-
657 ;-
658 -
659 ((void) (0))-
660 ;-
661-
662 (void)(pPage);-
663-
664 pInfo->nSize = 4 + sqlite3GetVarint(&pCell[4], (u64*)&pInfo->nKey);-
665 pInfo->nPayload = 0;-
666 pInfo->nLocal = 0;-
667 pInfo->pPayload = 0;-
668 return;
executed 1045684 times by 11 tests: return;
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (74)
1045684
669}-
670static void btreeParseCellPtr(-
671 MemPage *pPage,-
672 u8 *pCell,-
673 CellInfo *pInfo-
674){-
675 u8 *pIter;-
676 u32 nPayload;-
677 u64 iKey;-
678-
679 -
680 ((void) (0))-
681 ;-
682 -
683 ((void) (0))-
684 ;-
685 -
686 ((void) (0))-
687 ;-
688 -
689 ((void) (0))-
690 ;-
691 pIter = pCell;-
692-
693-
694-
695-
696-
697-
698-
699 nPayload = *pIter;-
700 if( nPayload>=0x80
nPayload>=0x80Description
TRUEevaluated 6147891 times by 371 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
FALSEevaluated 21728801 times by 434 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)
  • ...
){
6147891-21728801
701 u8 *pEnd = &pIter[8];-
702 nPayload &= 0x7f;-
703 do{-
704 nPayload = (nPayload<<7) | (*++pIter & 0x7f);-
705 }
executed 6149960 times by 371 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
while( (*
(*pIter)>=0x80Description
TRUEevaluated 2069 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 6147891 times by 371 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
pIter)>=0x80
(*pIter)>=0x80Description
TRUEevaluated 2069 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 6147891 times by 371 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
&& pIter<pEnd
pIter<pEndDescription
TRUEevaluated 2069 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
);
0-6149960
706 }
executed 6147891 times by 371 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
6147891
707 pIter++;-
708-
709-
710-
711-
712-
713-
714-
715 iKey = *pIter;-
716 if( iKey>=0x80
iKey>=0x80Description
TRUEevaluated 20725710 times by 8 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (74)
FALSEevaluated 7150982 times by 434 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)
  • ...
){
7150982-20725710
717 u8 *pEnd = &pIter[7];-
718 iKey &= 0x7f;-
719 while(1){-
720 iKey = (iKey<<7) | (*++pIter & 0x7f);-
721 if( (*
(*pIter)<0x80Description
TRUEevaluated 20690487 times by 8 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (74)
FALSEevaluated 8785356 times by 1 test
Evaluated by:
  • Self test (438)
pIter)<0x80
(*pIter)<0x80Description
TRUEevaluated 20690487 times by 8 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (74)
FALSEevaluated 8785356 times by 1 test
Evaluated by:
  • Self test (438)
) break;
executed 20690487 times by 8 tests: break;
Executed by:
  • Self test
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (74)
8785356-20690487
722 if( pIter>=pEnd
pIter>=pEndDescription
TRUEevaluated 35223 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 8750133 times by 1 test
Evaluated by:
  • Self test (438)
){
35223-8750133
723 iKey = (iKey<<8) | *++pIter;-
724 break;
executed 35223 times by 1 test: break;
Executed by:
  • Self test (438)
35223
725 }-
726 }
executed 8750133 times by 1 test: end of block
Executed by:
  • Self test (438)
8750133
727 }
executed 20725710 times by 8 tests: end of block
Executed by:
  • Self test
  • Self test (101)
  • Self test (34)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (74)
20725710
728 pIter++;-
729-
730 pInfo->nKey = *(i64*)&iKey;-
731 pInfo->nPayload = nPayload;-
732 pInfo->pPayload = pIter;-
733 ;-
734 ;-
735 if( nPayload<=pPage->maxLocal
nPayload<=pPage->maxLocalDescription
TRUEevaluated 27198955 times by 434 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 677737 times by 12 tests
Evaluated by:
  • Self test (101)
  • Self test (2)
  • Self test (3)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (5)
  • Self test (65)
  • Self test (75)
  • Self test (76)
){
677737-27198955
736-
737-
738-
739 pInfo->nSize = nPayload + (u16)(pIter - pCell);-
740 if( pInfo->nSize<4
pInfo->nSize<4Description
TRUEevaluated 82184 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 27116771 times by 434 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)
  • ...
) pInfo->nSize = 4;
executed 82184 times by 1 test: pInfo->nSize = 4;
Executed by:
  • Self test (438)
82184-27116771
741 pInfo->nLocal = (u16)nPayload;-
742 }
executed 27198955 times by 434 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{
27198955
743 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);-
744 }
executed 677737 times by 12 tests: end of block
Executed by:
  • Self test (101)
  • Self test (2)
  • Self test (3)
  • Self test (32)
  • Self test (33)
  • Self test (34)
  • Self test (4)
  • Self test (438)
  • Self test (5)
  • Self test (65)
  • Self test (75)
  • Self test (76)
677737
745}-
746static void btreeParseCellPtrIndex(-
747 MemPage *pPage,-
748 u8 *pCell,-
749 CellInfo *pInfo-
750){-
751 u8 *pIter;-
752 u32 nPayload;-
753-
754 -
755 ((void) (0))-
756 ;-
757 -
758 ((void) (0))-
759 ;-
760 -
761 ((void) (0))-
762 ;-
763 pIter = pCell + pPage->childPtrSize;-
764 nPayload = *pIter;-
765 if( nPayload>=0x80
nPayload>=0x80Description
TRUEevaluated 1656399 times by 364 tests
Evaluated by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
FALSEevaluated 3905391 times by 7 tests
Evaluated by:
  • Self test
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (57)
  • Self test (58)
){
1656399-3905391
766 u8 *pEnd = &pIter[8];-
767 nPayload &= 0x7f;-
768 do{-
769 nPayload = (nPayload<<7) | (*++pIter & 0x7f);-
770 }
executed 1656970 times by 364 tests: end of block
Executed by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
while( *(
*(pIter)>=0x80Description
TRUEevaluated 571 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1656399 times by 364 tests
Evaluated by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
pIter)>=0x80
*(pIter)>=0x80Description
TRUEevaluated 571 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1656399 times by 364 tests
Evaluated by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
&& pIter<pEnd
pIter<pEndDescription
TRUEevaluated 571 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
);
0-1656970
771 }
executed 1656399 times by 364 tests: end of block
Executed by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
1656399
772 pIter++;-
773 pInfo->nKey = nPayload;-
774 pInfo->nPayload = nPayload;-
775 pInfo->pPayload = pIter;-
776 ;-
777 ;-
778 if( nPayload<=pPage->maxLocal
nPayload<=pPage->maxLocalDescription
TRUEevaluated 4016069 times by 12 tests
Evaluated by:
  • Self test
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
FALSEevaluated 1545721 times by 360 tests
Evaluated by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
){
1545721-4016069
779-
780-
781-
782 pInfo->nSize = nPayload + (u16)(pIter - pCell);-
783 if( pInfo->nSize<4
pInfo->nSize<4Description
TRUEevaluated 1330 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4014739 times by 12 tests
Evaluated by:
  • Self test
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
) pInfo->nSize = 4;
executed 1330 times by 1 test: pInfo->nSize = 4;
Executed by:
  • Self test (438)
1330-4014739
784 pInfo->nLocal = (u16)nPayload;-
785 }
executed 4016069 times by 12 tests: end of block
Executed by:
  • Self test
  • Self test (43)
  • Self test (438)
  • Self test (45)
  • Self test (53)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (68)
  • Self test (69)
  • Self test (70)
  • Self test (71)
else{
4016069
786 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);-
787 }
executed 1545721 times by 360 tests: end of block
Executed by:
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • Self test (127)
  • ...
1545721
788}-
789static void btreeParseCell(-
790 MemPage *pPage,-
791 int iCell,-
792 CellInfo *pInfo-
793){-
794 pPage->xParseCell(pPage, ((pPage)->aData + ((pPage)->maskPage & __builtin_bswap16(*(u16*)(&(pPage)->aCellIdx[2*(iCell)])))), pInfo);-
795}
executed 25531974 times by 434 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)
  • ...
25531974
796static u16 cellSizePtr(MemPage *pPage, u8 *pCell){-
797 u8 *pIter = pCell + pPage->childPtrSize;-
798 u8 *pEnd;-
799 u32 nSize;-
800 nSize = *pIter;-
801 if( nSize>=0x80
nSize>=0x80Description
TRUEevaluated 2437989 times by 332 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • ...
FALSEevaluated 6690991 times by 9 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (57)
  • Self test (58)
){
2437989-6690991
802 pEnd = &pIter[8];-
803 nSize &= 0x7f;-
804 do{-
805 nSize = (nSize<<7) | (*++pIter & 0x7f);-
806 }
executed 2438917 times by 332 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • ...
while( *(
*(pIter)>=0x80Description
TRUEevaluated 928 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2437989 times by 332 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • ...
pIter)>=0x80
*(pIter)>=0x80Description
TRUEevaluated 928 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2437989 times by 332 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • ...
&& pIter<pEnd
pIter<pEndDescription
TRUEevaluated 928 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
);
0-2438917
807 }
executed 2437989 times by 332 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • ...
2437989
808 pIter++;-
809 if( pPage->intKey
pPage->intKeyDescription
TRUEevaluated 3577329 times by 26 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • ...
FALSEevaluated 5551651 times by 324 tests
Evaluated by:
  • Self test (10)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • ...
){
3577329-5551651
810-
811-
812-
813 pEnd = &pIter[9];-
814 while( (*
(*pIter++)&0x80Description
TRUEevaluated 4429659 times by 6 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
FALSEevaluated 3577132 times by 26 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • ...
pIter++)&0x80
(*pIter++)&0x80Description
TRUEevaluated 4429659 times by 6 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
FALSEevaluated 3577132 times by 26 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • ...
&& pIter<pEnd
pIter<pEndDescription
TRUEevaluated 4429462 times by 6 tests
Evaluated by:
  • Self test
  • Self test (101)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
FALSEevaluated 197 times by 1 test
Evaluated by:
  • Self test (438)
);
executed 4429462 times by 6 tests: ;
Executed by:
  • Self test
  • Self test (101)
  • Self test (438)
  • Self test (57)
  • Self test (58)
  • Self test (64)
197-4429659
815 }
executed 3577329 times by 26 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (32)
  • Self test (33)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • ...
3577329
816 ;-
817 ;-
818 if( nSize<=pPage->maxLocal
nSize<=pPage->maxLocalDescription
TRUEevaluated 8883528 times by 25 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • Self test (9)
FALSEevaluated 245452 times by 325 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • ...
){
245452-8883528
819 nSize += (u32)(pIter - pCell);-
820 if( nSize<4
nSize<4Description
TRUEevaluated 894 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 8882634 times by 25 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • Self test (9)
) nSize = 4;
executed 894 times by 1 test: nSize = 4;
Executed by:
  • Self test (438)
894-8882634
821 }
executed 8883528 times by 25 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (13)
  • Self test (14)
  • Self test (15)
  • Self test (17)
  • Self test (18)
  • Self test (19)
  • Self test (21)
  • Self test (22)
  • Self test (23)
  • Self test (24)
  • Self test (28)
  • Self test (40)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (6)
  • Self test (64)
  • Self test (7)
  • Self test (9)
else{
8883528
822 int minLocal = pPage->minLocal;-
823 nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);-
824 ;-
825 ;-
826 if( nSize>pPage->maxLocal
nSize>pPage->maxLocalDescription
TRUEevaluated 180983 times by 324 tests
Evaluated by:
  • Self test (10)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • ...
FALSEevaluated 64469 times by 2 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
){
64469-180983
827 nSize = minLocal;-
828 }
executed 180983 times by 324 tests: end of block
Executed by:
  • Self test (10)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • ...
180983
829 nSize += 4 + (u16)(pIter - pCell);-
830 }
executed 245452 times by 325 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • ...
245452
831 -
832 ((void) (0))-
833 ;-
834 return
executed 9128980 times by 339 tests: return (u16)nSize;
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
(u16)nSize;
executed 9128980 times by 339 tests: return (u16)nSize;
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • Self test (12)
  • Self test (13)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
9128980
835}-
836static u16 cellSizePtrNoPayload(MemPage *pPage, u8 *pCell){-
837 u8 *pIter = pCell + 4;-
838 u8 *pEnd;-
839 (void)(pPage);-
840-
841-
842 -
843 ((void) (0))-
844 ;-
845 pEnd = pIter + 9;-
846 while( (*
(*pIter++)&0x80Description
TRUEevaluated 2538083 times by 4 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (64)
  • Self test (74)
FALSEevaluated 2375987 times by 9 tests
Evaluated by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (74)
pIter++)&0x80
(*pIter++)&0x80Description
TRUEevaluated 2538083 times by 4 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (64)
  • Self test (74)
FALSEevaluated 2375987 times by 9 tests
Evaluated by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (74)
&& pIter<pEnd
pIter<pEndDescription
TRUEevaluated 2538054 times by 4 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (64)
  • Self test (74)
FALSEevaluated 29 times by 1 test
Evaluated by:
  • Self test (438)
);
executed 2538054 times by 4 tests: ;
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (64)
  • Self test (74)
29-2538083
847 -
848 ((void) (0))-
849 ;-
850 return
executed 2376016 times by 9 tests: return (u16)(pIter - pCell);
Executed by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (74)
(u16)(pIter - pCell);
executed 2376016 times by 9 tests: return (u16)(pIter - pCell);
Executed by:
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (64)
  • Self test (65)
  • Self test (66)
  • Self test (67)
  • Self test (74)
2376016
851}-
852static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){-
853 CellInfo info;-
854 if( *
*pRCDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 795784 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
pRC
*pRCDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 795784 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
) return;
executed 4 times by 1 test: return;
Executed by:
  • Self test (438)
4-795784
855 -
856 ((void) (0))-
857 ;-
858 pPage->xParseCell(pPage, pCell, &info);-
859 if( info.nLocal<info.nPayload
info.nLocal<info.nPayloadDescription
TRUEevaluated 34050 times by 3 tests
Evaluated by:
  • Self test (32)
  • Self test (33)
  • Self test (438)
FALSEevaluated 761734 times by 4 tests
Evaluated by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
){
34050-761734
860 Pgno ovfl = sqlite3Get4byte(&pCell[info.nSize-4]);-
861 ptrmapPut(pPage->pBt, ovfl, 3, pPage->pgno, pRC);-
862 }
executed 34050 times by 3 tests: end of block
Executed by:
  • Self test (32)
  • Self test (33)
  • Self test (438)
34050
863}
executed 795784 times by 4 tests: end of block
Executed by:
  • Self test
  • Self test (32)
  • Self test (33)
  • Self test (438)
795784
864static int defragmentPage(MemPage *pPage, int nMaxFrag){-
865 int i;-
866 int pc;-
867 int hdr;-
868 int size;-
869 int usableSize;-
870 int cellOffset;-
871 int cbrk;-
872 int nCell;-
873 unsigned char *data;-
874 unsigned char *temp;-
875 unsigned char *src;-
876 int iCellFirst;-
877 int iCellLast;-
878-
879 -
880 ((void) (0))-
881 ;-
882 -
883 ((void) (0))-
884 ;-
885 -
886 ((void) (0))-
887 ;-
888 -
889 ((void) (0))-
890 ;-
891 -
892 ((void) (0))-
893 ;-
894 temp = 0;-
895 src = data = pPage->aData;-
896 hdr = pPage->hdrOffset;-
897 cellOffset = pPage->cellOffset;-
898 nCell = pPage->nCell;-
899 -
900 ((void) (0))-
901 ;-
902 iCellFirst = cellOffset + 2*nCell;-
903 usableSize = pPage->pBt->usableSize;-
904-
905-
906-
907-
908-
909-
910 if( (
(int)data[hdr+7]<=nMaxFragDescription
TRUEevaluated 26211 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 2533 times by 1 test
Evaluated by:
  • Self test (438)
int)data[hdr+7]<=nMaxFrag
(int)data[hdr+7]<=nMaxFragDescription
TRUEevaluated 26211 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 2533 times by 1 test
Evaluated by:
  • Self test (438)
){
2533-26211
911 int iFree = ((&data[hdr+1])[0]<<8 | (&data[hdr+1])[1]);-
912 if( iFree
iFreeDescription
TRUEevaluated 26210 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
){
1-26210
913 int iFree2 = ((&data[iFree])[0]<<8 | (&data[iFree])[1]);-
914-
915-
916-
917-
918-
919-
920-
921 -
922 ((void) (0))-
923 ;-
924 -
925 ((void) (0))-
926 ;-
927 -
928 ((void) (0))-
929 ;-
930-
931 if( 0==iFree2
0==iFree2Description
TRUEevaluated 24334 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 1876 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (54)
|| (data[iFree2]==0
data[iFree2]==0Description
TRUEevaluated 1681 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (54)
FALSEevaluated 195 times by 1 test
Evaluated by:
  • Self test (438)
&& data[iFree2+1]==0
data[iFree2+1]==0Description
TRUEevaluated 1680 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (54)
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
) ){
1-24334
932 u8 *pEnd = &data[cellOffset + nCell*2];-
933 u8 *pAddr;-
934 int sz2 = 0;-
935 int sz = ((&data[iFree+2])[0]<<8 | (&data[iFree+2])[1]);-
936 int top = ((&data[hdr+5])[0]<<8 | (&data[hdr+5])[1]);-
937 if( top>=iFree
top>=iFreeDescription
TRUEnever evaluated
FALSEevaluated 26014 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
){
0-26014
938 return
never executed: return sqlite3CorruptError(1435);
sqlite3CorruptError(1435);
never executed: return sqlite3CorruptError(1435);
0
939 }-
940 if( iFree2
iFree2Description
TRUEevaluated 1680 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (54)
FALSEevaluated 24334 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
){
1680-24334
941 -
942 ((void) (0))-
943 ;-
944 sz2 = ((&data[iFree2+2])[0]<<8 | (&data[iFree2+2])[1]);-
945 -
946 ((void) (0))-
947 ;-
948 memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));-
949 sz += sz2;-
950 }
executed 1680 times by 2 tests: end of block
Executed by:
  • Self test (438)
  • Self test (54)
1680
951 cbrk = top+sz;-
952 -
953 ((void) (0))-
954 ;-
955 memmove(&data[cbrk], &data[top], iFree-top);-
956 for(pAddr=&data[cellOffset]; pAddr<pEnd
pAddr<pEndDescription
TRUEevaluated 507323 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 26014 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
; pAddr+=2){
26014-507323
957 pc = ((pAddr)[0]<<8 | (pAddr)[1]);-
958 if( pc<iFree
pc<iFreeDescription
TRUEevaluated 280058 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 227265 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
){ ((pAddr)[0] = (u8)((pc+sz)>>8), (pAddr)[1] = (u8)(pc+sz)); }
executed 280058 times by 3 tests: end of block
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
227265-280058
959 else if( pc<iFree2
pc<iFree2Description
TRUEevaluated 14302 times by 2 tests
Evaluated by:
  • Self test (438)
  • Self test (54)
FALSEevaluated 212963 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
){ ((pAddr)[0] = (u8)((pc+sz2)>>8), (pAddr)[1] = (u8)(pc+sz2)); }
executed 14302 times by 2 tests: end of block
Executed by:
  • Self test (438)
  • Self test (54)
14302-212963
960 }
executed 507323 times by 3 tests: end of block
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
507323
961 goto
executed 26014 times by 3 tests: goto defragment_out;
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
defragment_out;
executed 26014 times by 3 tests: goto defragment_out;
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
26014
962 }-
963 }
executed 196 times by 1 test: end of block
Executed by:
  • Self test (438)
196
964 }
executed 197 times by 1 test: end of block
Executed by:
  • Self test (438)
197
965-
966 cbrk = usableSize;-
967 iCellLast = usableSize - 4;-
968 for(i=0; i<nCell
i<nCellDescription
TRUEevaluated 171575 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 2730 times by 1 test
Evaluated by:
  • Self test (438)
; i++){
2730-171575
969 u8 *pAddr;-
970 pAddr = &data[cellOffset + i*2];-
971 pc = ((pAddr)[0]<<8 | (pAddr)[1]);-
972 ;-
973 ;-
974-
975-
976-
977 if( pc<iCellFirst
pc<iCellFirstDescription
TRUEnever evaluated
FALSEevaluated 171575 times by 1 test
Evaluated by:
  • Self test (438)
|| pc>iCellLast
pc>iCellLastDescription
TRUEnever evaluated
FALSEevaluated 171575 times by 1 test
Evaluated by:
  • Self test (438)
){
0-171575
978 return
never executed: return sqlite3CorruptError(1469);
sqlite3CorruptError(1469);
never executed: return sqlite3CorruptError(1469);
0
979 }-
980 -
981 ((void) (0))-
982 ;-
983 size = pPage->xCellSize(pPage, &src[pc]);-
984 cbrk -= size;-
985 if( cbrk<iCellFirst
cbrk<iCellFirstDescription
TRUEnever evaluated
FALSEevaluated 171575 times by 1 test
Evaluated by:
  • Self test (438)
|| pc+size>usableSize
pc+size>usableSizeDescription
TRUEnever evaluated
FALSEevaluated 171575 times by 1 test
Evaluated by:
  • Self test (438)
){
0-171575
986 return
never executed: return sqlite3CorruptError(1475);
sqlite3CorruptError(1475);
never executed: return sqlite3CorruptError(1475);
0
987 }-
988 -
989 ((void) (0))-
990 ;-
991 ;-
992 ;-
993 ((pAddr)[0] = (u8)((cbrk)>>8), (pAddr)[1] = (u8)(cbrk));-
994 if( temp==0
temp==0Description
TRUEevaluated 8557 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 163018 times by 1 test
Evaluated by:
  • Self test (438)
){
8557-163018
995 int x;-
996 if( cbrk==pc
cbrk==pcDescription
TRUEevaluated 6636 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1921 times by 1 test
Evaluated by:
  • Self test (438)
) continue;
executed 6636 times by 1 test: continue;
Executed by:
  • Self test (438)
1921-6636
997 temp = sqlite3PagerTempSpace(pPage->pBt->pPager);-
998 x = ((&data[hdr+5])[0]<<8 | (&data[hdr+5])[1]);-
999 memcpy(&temp[x], &data[x], (cbrk+size) - x);-
1000 src = temp;-
1001 }
executed 1921 times by 1 test: end of block
Executed by:
  • Self test (438)
1921
1002 memcpy(&data[cbrk], &src[pc], size);-
1003 }
executed 164939 times by 1 test: end of block
Executed by:
  • Self test (438)
164939
1004 data[hdr+7] = 0;-
1005-
1006 defragment_out:
code before this statement executed 2730 times by 1 test: defragment_out:
Executed by:
  • Self test (438)
2730
1007 if( data[hdr+7]+cbrk-iCellFirst!=pPage->nFree
data[hdr+7]+cb...!=pPage->nFreeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 28743 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
){
1-28743
1008 return
executed 1 time by 1 test: return sqlite3CorruptError(1495);
Executed by:
  • Self test (438)
sqlite3CorruptError(1495);
executed 1 time by 1 test: return sqlite3CorruptError(1495);
Executed by:
  • Self test (438)
1
1009 }-
1010 -
1011 ((void) (0))-
1012 ;-
1013 ((&data[hdr+5])[0] = (u8)((cbrk)>>8), (&data[hdr+5])[1] = (u8)(cbrk));-
1014 data[hdr+1] = 0;-
1015 data[hdr+2] = 0;-
1016 memset(&data[iCellFirst], 0, cbrk-iCellFirst);-
1017 -
1018 ((void) (0))-
1019 ;-
1020 return
executed 28743 times by 3 tests: return 0;
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
0;
executed 28743 times by 3 tests: return 0;
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
28743
1021}-
1022static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){-
1023 const int hdr = pPg->hdrOffset;-
1024 u8 * const aData = pPg->aData;-
1025 int iAddr = hdr + 1;-
1026 int pc = ((&aData[iAddr])[0]<<8 | (&aData[iAddr])[1]);-
1027 int x;-
1028 int usableSize = pPg->pBt->usableSize;-
1029 int size;-
1030-
1031 -
1032 ((void) (0))-
1033 ;-
1034 while( pc<=usableSize-4
pc<=usableSize-4Description
TRUEevaluated 3835600 times by 355 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
FALSEnever evaluated
){
0-3835600
1035-
1036-
1037-
1038 size = ((&aData[pc+2])[0]<<8 | (&aData[pc+2])[1]);-
1039 if( (
(x = size - nByte)>=0Description
TRUEevaluated 3537663 times by 354 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
FALSEevaluated 297937 times by 20 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
x = size - nByte)>=0
(x = size - nByte)>=0Description
TRUEevaluated 3537663 times by 354 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
FALSEevaluated 297937 times by 20 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
){
297937-3537663
1040 ;-
1041 ;-
1042 if( size+pc > usableSize
size+pc > usableSizeDescription
TRUEnever evaluated
FALSEevaluated 3537663 times by 354 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
){
0-3537663
1043 *pRc = sqlite3CorruptError(1539);-
1044 return
never executed: return 0;
0;
never executed: return 0;
0
1045 }else if( x<4
x<4Description
TRUEevaluated 1076151 times by 334 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (12)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • ...
FALSEevaluated 2461512 times by 337 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • ...
){
1076151-2461512
1046-
1047-
1048 if( aData[hdr+7]>57
aData[hdr+7]>57Description
TRUEevaluated 51 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 1076100 times by 334 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (12)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • ...
) return
executed 51 times by 1 test: return 0;
Executed by:
  • Self test (438)
0;
executed 51 times by 1 test: return 0;
Executed by:
  • Self test (438)
51-1076100
1049-
1050-
1051-
1052 memcpy(&aData[iAddr], &aData[pc], 2);-
1053 aData[hdr+7] += (u8)x;-
1054 }
executed 1076100 times by 334 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (12)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • ...
else{
1076100
1055-
1056-
1057 ((&aData[pc+2])[0] = (u8)((x)>>8), (&aData[pc+2])[1] = (u8)(x));-
1058 }
executed 2461512 times by 337 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • ...
2461512
1059 return
executed 3537612 times by 354 tests: return &aData[pc + x];
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
&aData[pc + x];
executed 3537612 times by 354 tests: return &aData[pc + x];
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
3537612
1060 }-
1061 iAddr = pc;-
1062 pc = ((&aData[pc])[0]<<8 | (&aData[pc])[1]);-
1063 if( pc<iAddr+size
pc<iAddr+sizeDescription
TRUEevaluated 164660 times by 20 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
FALSEevaluated 133277 times by 6 tests
Evaluated by:
  • Self test
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
) break;
executed 164660 times by 20 tests: break;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
133277-164660
1064 }
executed 133277 times by 6 tests: end of block
Executed by:
  • Self test
  • Self test (438)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
133277
1065 if( pc
pcDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 164659 times by 20 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
){
1-164659
1066 *pRc = sqlite3CorruptError(1562);-
1067 }
executed 1 time by 1 test: end of block
Executed by:
  • Self test (438)
1
1068-
1069 return
executed 164660 times by 20 tests: return 0;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
0;
executed 164660 times by 20 tests: return 0;
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
164660
1070}-
1071static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){-
1072 const int hdr = pPage->hdrOffset;-
1073 u8 * const data = pPage->aData;-
1074 int top;-
1075 int rc = 0;-
1076 int gap;-
1077-
1078 -
1079 ((void) (0))-
1080 ;-
1081 -
1082 ((void) (0))-
1083 ;-
1084 -
1085 ((void) (0))-
1086 ;-
1087 -
1088 ((void) (0))-
1089 ;-
1090 -
1091 ((void) (0))-
1092 ;-
1093 -
1094 ((void) (0))-
1095 ;-
1096 -
1097 ((void) (0))-
1098 ;-
1099-
1100 -
1101 ((void) (0))-
1102 ;-
1103 gap = pPage->cellOffset + 2*pPage->nCell;-
1104 -
1105 ((void) (0))-
1106 ;-
1107-
1108-
1109-
1110-
1111-
1112 top = ((&data[hdr+5])[0]<<8 | (&data[hdr+5])[1]);-
1113 -
1114 ((void) (0))-
1115 ;-
1116 if( gap>top
gap>topDescription
TRUEevaluated 613 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 8529244 times by 388 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • ...
){
613-8529244
1117 if( top==0
top==0Description
TRUEevaluated 613 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
&& pPage->pBt->usableSize==65536
pPage->pBt->usableSize==65536Description
TRUEevaluated 613 times by 1 test
Evaluated by:
  • Self test (438)
FALSEnever evaluated
){
0-613
1118 top = 65536;-
1119 }
executed 613 times by 1 test: end of block
Executed by:
  • Self test (438)
else{
613
1120 return
never executed: return sqlite3CorruptError(1610);
sqlite3CorruptError(1610);
never executed: return sqlite3CorruptError(1610);
0
1121 }-
1122 }-
1123-
1124-
1125-
1126-
1127-
1128 ;-
1129 ;-
1130 ;-
1131 if( (data[hdr+2]
data[hdr+2]Description
TRUEevaluated 1424964 times by 352 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
FALSEevaluated 7104893 times by 385 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (12)
  • 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 (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
|| data[hdr+1]
data[hdr+1]Description
TRUEevaluated 1188 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 7103705 times by 385 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (12)
  • 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 (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
) && gap+2<=top
gap+2<=topDescription
TRUEevaluated 1425421 times by 352 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
FALSEevaluated 731 times by 1 test
Evaluated by:
  • Self test (438)
){
731-7104893
1132 u8 *pSpace = pageFindSlot(pPage, nByte, &rc);-
1133 if( pSpace
pSpaceDescription
TRUEevaluated 1377911 times by 351 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
FALSEevaluated 47510 times by 20 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
){
47510-1377911
1134 -
1135 ((void) (0))-
1136 ;-
1137 *pIdx = (int)(pSpace - data);-
1138 return
executed 1377911 times by 351 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
0;
executed 1377911 times by 351 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (11)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
1377911
1139 }else if( rc
rcDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 47509 times by 20 tests
Evaluated by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
){
1-47509
1140 return
executed 1 time by 1 test: return rc;
Executed by:
  • Self test (438)
rc;
executed 1 time by 1 test: return rc;
Executed by:
  • Self test (438)
1
1141 }-
1142 }
executed 47509 times by 20 tests: end of block
Executed by:
  • Self test
  • Self test (100)
  • Self test (101)
  • Self test (32)
  • Self test (33)
  • Self test (438)
  • Self test (47)
  • Self test (54)
  • Self test (57)
  • Self test (58)
  • Self test (64)
  • Self test (91)
  • Self test (92)
  • Self test (93)
  • Self test (94)
  • Self test (95)
  • Self test (96)
  • Self test (97)
  • Self test (98)
  • Self test (99)
47509
1143-
1144-
1145-
1146-
1147 ;-
1148 if( gap+2+nByte>top
gap+2+nByte>topDescription
TRUEevaluated 27708 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
FALSEevaluated 7124237 times by 385 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (12)
  • 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 (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
){
27708-7124237
1149 -
1150 ((void) (0))-
1151 ;-
1152 rc = defragmentPage(pPage, ((4)<(pPage->nFree - (2+nByte))?(4):(pPage->nFree - (2+nByte))));-
1153 if( rc
rcDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 27707 times by 3 tests
Evaluated by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
) return
executed 1 time by 1 test: return rc;
Executed by:
  • Self test (438)
rc;
executed 1 time by 1 test: return rc;
Executed by:
  • Self test (438)
1-27707
1154 top = (((((int)((&data[hdr+5])[0]<<8 | (&data[hdr+5])[1]))-1)&0xffff)+1);-
1155 -
1156 ((void) (0))-
1157 ;-
1158 }
executed 27707 times by 3 tests: end of block
Executed by:
  • Self test (101)
  • Self test (438)
  • Self test (54)
27707
1159 top -= nByte;-
1160 ((&data[hdr+5])[0] = (u8)((top)>>8), (&data[hdr+5])[1] = (u8)(top));-
1161 -
1162 ((void) (0))-
1163 ;-
1164 *pIdx = top;-
1165 return
executed 7151944 times by 385 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (12)
  • 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 (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
0;
executed 7151944 times by 385 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • Self test (105)
  • Self test (11)
  • Self test (12)
  • 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 (13)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • ...
7151944
1166}-
1167static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){-
1168 u16 iPtr;-
1169 u16 iFreeBlk;-
1170 u8 hdr;-
1171 u8 nFrag = 0;-
1172 u16 iOrigSize = iSize;-
1173 u16 x;-
1174 u32 iEnd = iStart + iSize;-
1175 unsigned char *data = pPage->aData;-
1176-
1177 -
1178 ((void) (0))-
1179 ;-
1180 -
1181 ((void) (0))-
1182 ;-
1183 -
1184 ((void) (0))-
1185 ;-
1186 -
1187 ((void) (0))-
1188 ;-
1189 -
1190 ((void) (0))-
1191 ;-
1192 -
1193 ((void) (0))-
1194 ;-
1195 -
1196 ((void) (0))-
1197 ;-
1198-
1199-
1200-
1201-
1202 hdr = pPage->hdrOffset;-
1203 iPtr = hdr + 1;-
1204 if( data[iPtr+1]==0
data[iPtr+1]==0Description
TRUEevaluated 2670733 times by 364 tests
Evaluated by:
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • ...
FALSEevaluated 1918126 times by 333 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • ...
&& data[iPtr]==0
data[iPtr]==0Description
TRUEevaluated 2668083 times by 364 tests
Evaluated by:
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • ...
FALSEevaluated 2650 times by 1 test
Evaluated by:
  • Self test (438)
){
2650-2670733
1205 iFreeBlk = 0;-
1206 }
executed 2668083 times by 364 tests: end of block
Executed by:
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • ...
else{
2668083
1207 while( (
(iFreeBlk = ((...])[1]))<iStartDescription
TRUEevaluated 2761655 times by 326 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
FALSEevaluated 1552911 times by 315 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (14)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • Self test (155)
  • Self test (156)
  • Self test (157)
  • Self test (158)
  • Self test (159)
  • Self test (16)
  • Self test (160)
  • Self test (161)
  • Self test (162)
  • Self test (163)
  • ...
iFreeBlk = ((&data[iPtr])[0]<<8 | (&data[iPtr])[1]))<iStart
(iFreeBlk = ((...])[1]))<iStartDescription
TRUEevaluated 2761655 times by 326 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
FALSEevaluated 1552911 times by 315 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (14)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • Self test (155)
  • Self test (156)
  • Self test (157)
  • Self test (158)
  • Self test (159)
  • Self test (16)
  • Self test (160)
  • Self test (161)
  • Self test (162)
  • Self test (163)
  • ...
){
1552911-2761655
1208 if( iFreeBlk<iPtr+4
iFreeBlk<iPtr+4Description
TRUEevaluated 367865 times by 325 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
FALSEevaluated 2393790 times by 326 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
){
367865-2393790
1209 if( iFreeBlk==0
iFreeBlk==0Description
TRUEevaluated 367865 times by 325 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
FALSEnever evaluated
) break;
executed 367865 times by 325 tests: break;
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
0-367865
1210 return
never executed: return sqlite3CorruptError(1700);
sqlite3CorruptError(1700);
never executed: return sqlite3CorruptError(1700);
0
1211 }-
1212 iPtr = iFreeBlk;-
1213 }
executed 2393790 times by 326 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
2393790
1214 if( iFreeBlk>pPage->pBt->usableSize-4
iFreeBlk>pPage...->usableSize-4Description
TRUEnever evaluated
FALSEevaluated 1920776 times by 333 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • ...
){
0-1920776
1215 return
never executed: return sqlite3CorruptError(1705);
sqlite3CorruptError(1705);
never executed: return sqlite3CorruptError(1705);
0
1216 }-
1217 -
1218 ((void) (0))-
1219 ;-
1220-
1221-
1222-
1223-
1224-
1225-
1226-
1227 if( iFreeBlk
iFreeBlkDescription
TRUEevaluated 1552911 times by 315 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (14)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • Self test (155)
  • Self test (156)
  • Self test (157)
  • Self test (158)
  • Self test (159)
  • Self test (16)
  • Self test (160)
  • Self test (161)
  • Self test (162)
  • Self test (163)
  • ...
FALSEevaluated 367865 times by 325 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
&& iEnd+3>=iFreeBlk
iEnd+3>=iFreeBlkDescription
TRUEevaluated 905117 times by 286 tests
Evaluated by:
  • Self test (10)
  • Self test (12)
  • Self test (14)
  • Self test (15)
  • Self test (16)
  • Self test (170)
  • Self test (171)
  • Self test (172)
  • Self test (173)
  • Self test (174)
  • Self test (175)
  • Self test (176)
  • Self test (177)
  • Self test (178)
  • Self test (179)
  • Self test (18)
  • Self test (180)
  • Self test (181)
  • Self test (182)
  • Self test (183)
  • Self test (184)
  • Self test (185)
  • Self test (186)
  • Self test (187)
  • Self test (188)
  • ...
FALSEevaluated 647794 times by 312 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (14)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • Self test (155)
  • Self test (156)
  • Self test (157)
  • Self test (158)
  • Self test (159)
  • Self test (16)
  • Self test (160)
  • Self test (161)
  • Self test (162)
  • Self test (163)
  • ...
){
367865-1552911
1228 nFrag = iFreeBlk - iEnd;-
1229 if( iEnd>iFreeBlk
iEnd>iFreeBlkDescription
TRUEnever evaluated
FALSEevaluated 905117 times by 286 tests
Evaluated by:
  • Self test (10)
  • Self test (12)
  • Self test (14)
  • Self test (15)
  • Self test (16)
  • Self test (170)
  • Self test (171)
  • Self test (172)
  • Self test (173)
  • Self test (174)
  • Self test (175)
  • Self test (176)
  • Self test (177)
  • Self test (178)
  • Self test (179)
  • Self test (18)
  • Self test (180)
  • Self test (181)
  • Self test (182)
  • Self test (183)
  • Self test (184)
  • Self test (185)
  • Self test (186)
  • Self test (187)
  • Self test (188)
  • ...
) return
never executed: return sqlite3CorruptError(1717);
sqlite3CorruptError(1717);
never executed: return sqlite3CorruptError(1717);
0-905117
1230 iEnd = iFreeBlk + ((&data[iFreeBlk+2])[0]<<8 | (&data[iFreeBlk+2])[1]);-
1231 if( iEnd > pPage->pBt->usableSize
iEnd > pPage->pBt->usableSizeDescription
TRUEnever evaluated
FALSEevaluated 905117 times by 286 tests
Evaluated by:
  • Self test (10)
  • Self test (12)
  • Self test (14)
  • Self test (15)
  • Self test (16)
  • Self test (170)
  • Self test (171)
  • Self test (172)
  • Self test (173)
  • Self test (174)
  • Self test (175)
  • Self test (176)
  • Self test (177)
  • Self test (178)
  • Self test (179)
  • Self test (18)
  • Self test (180)
  • Self test (181)
  • Self test (182)
  • Self test (183)
  • Self test (184)
  • Self test (185)
  • Self test (186)
  • Self test (187)
  • Self test (188)
  • ...
){
0-905117
1232 return
never executed: return sqlite3CorruptError(1720);
sqlite3CorruptError(1720);
never executed: return sqlite3CorruptError(1720);
0
1233 }-
1234 iSize = iEnd - iStart;-
1235 iFreeBlk = ((&data[iFreeBlk])[0]<<8 | (&data[iFreeBlk])[1]);-
1236 }
executed 905117 times by 286 tests: end of block
Executed by:
  • Self test (10)
  • Self test (12)
  • Self test (14)
  • Self test (15)
  • Self test (16)
  • Self test (170)
  • Self test (171)
  • Self test (172)
  • Self test (173)
  • Self test (174)
  • Self test (175)
  • Self test (176)
  • Self test (177)
  • Self test (178)
  • Self test (179)
  • Self test (18)
  • Self test (180)
  • Self test (181)
  • Self test (182)
  • Self test (183)
  • Self test (184)
  • Self test (185)
  • Self test (186)
  • Self test (187)
  • Self test (188)
  • ...
905117
1237-
1238-
1239-
1240-
1241-
1242 if( iPtr>hdr+1
iPtr>hdr+1Description
TRUEevaluated 992089 times by 326 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
FALSEevaluated 928687 times by 315 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (14)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (15)
  • Self test (150)
  • Self test (151)
  • Self test (152)
  • Self test (153)
  • Self test (154)
  • Self test (155)
  • Self test (156)
  • Self test (157)
  • Self test (158)
  • Self test (159)
  • Self test (16)
  • Self test (160)
  • Self test (161)
  • Self test (162)
  • Self test (163)
  • ...
){
928687-992089
1243 int iPtrEnd = iPtr + ((&data[iPtr+2])[0]<<8 | (&data[iPtr+2])[1]);-
1244 if( iPtrEnd+3>=iStart
iPtrEnd+3>=iStartDescription
TRUEevaluated 395365 times by 322 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (150)
  • Self test (151)
  • ...
FALSEevaluated 596724 times by 324 tests
Evaluated by:
  • Self test (10)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • ...
){
395365-596724
1245 if( iPtrEnd>iStart
iPtrEnd>iStartDescription
TRUEnever evaluated
FALSEevaluated 395365 times by 322 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (150)
  • Self test (151)
  • ...
) return
never executed: return sqlite3CorruptError(1733);
sqlite3CorruptError(1733);
never executed: return sqlite3CorruptError(1733);
0-395365
1246 nFrag += iStart - iPtrEnd;-
1247 iSize = iEnd - iPtr;-
1248 iStart = iPtr;-
1249 }
executed 395365 times by 322 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • Self test (149)
  • Self test (150)
  • Self test (151)
  • ...
395365
1250 }
executed 992089 times by 326 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • Self test (148)
  • ...
992089
1251 if( nFrag>data[hdr+7]
nFrag>data[hdr+7]Description
TRUEnever evaluated
FALSEevaluated 1920776 times by 333 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • ...
) return
never executed: return sqlite3CorruptError(1739);
sqlite3CorruptError(1739);
never executed: return sqlite3CorruptError(1739);
0-1920776
1252 data[hdr+7] -= nFrag;-
1253 }
executed 1920776 times by 333 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • Self test (12)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • Self test (142)
  • Self test (143)
  • Self test (144)
  • Self test (145)
  • Self test (146)
  • Self test (147)
  • ...
1920776
1254 x = ((&data[hdr+5])[0]<<8 | (&data[hdr+5])[1]);-
1255 if( iStart<=x
iStart<=xDescription
TRUEevaluated 2035555 times by 348 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (104)
  • Self test (12)
  • 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)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • ...
FALSEevaluated 2553304 times by 357 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • ...
){
2035555-2553304
1256-
1257-
1258-
1259 if( iStart<x
iStart<xDescription
TRUEnever evaluated
FALSEevaluated 2035555 times by 348 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (104)
  • Self test (12)
  • 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)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • ...
|| iPtr!=hdr+1
iPtr!=hdr+1Description
TRUEnever evaluated
FALSEevaluated 2035555 times by 348 tests
Evaluated by:
  • Self test (10)
  • Self test (101)
  • Self test (104)
  • Self test (12)
  • 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)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • ...
) return
never executed: return sqlite3CorruptError(1747);
sqlite3CorruptError(1747);
never executed: return sqlite3CorruptError(1747);
0-2035555
1260 ((&data[hdr+1])[0] = (u8)((iFreeBlk)>>8), (&data[hdr+1])[1] = (u8)(iFreeBlk));-
1261 ((&data[hdr+5])[0] = (u8)((iEnd)>>8), (&data[hdr+5])[1] = (u8)(iEnd));-
1262 }
executed 2035555 times by 348 tests: end of block
Executed by:
  • Self test (10)
  • Self test (101)
  • Self test (104)
  • Self test (12)
  • 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)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • Self test (136)
  • Self test (137)
  • Self test (138)
  • Self test (139)
  • Self test (14)
  • Self test (140)
  • Self test (141)
  • ...
else{
2035555
1263-
1264 ((&data[iPtr])[0] = (u8)((iStart)>>8), (&data[iPtr])[1] = (u8)(iStart));-
1265 }
executed 2553304 times by 357 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • Self test (135)
  • ...
2553304
1266 if( pPage->pBt->btsFlags & 0x000c
pPage->pBt->btsFlags & 0x000cDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 4588858 times by 367 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • ...
){
1-4588858
1267-
1268-
1269 memset(&data[iStart], 0, iSize);-
1270 }
executed 1 time by 1 test: end of block
Executed by:
  • Self test (438)
1
1271 ((&data[iStart])[0] = (u8)((iFreeBlk)>>8), (&data[iStart])[1] = (u8)(iFreeBlk));-
1272 ((&data[iStart+2])[0] = (u8)((iSize)>>8), (&data[iStart+2])[1] = (u8)(iSize));-
1273 pPage->nFree += iOrigSize;-
1274 return
executed 4588859 times by 367 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • ...
0;
executed 4588859 times by 367 tests: return 0;
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • Self test (101)
  • Self test (104)
  • 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)
  • Self test (128)
  • Self test (129)
  • Self test (130)
  • Self test (131)
  • Self test (132)
  • Self test (133)
  • Self test (134)
  • ...
4588859
1275}-
1276static int decodeFlags(MemPage *pPage, int flagByte){-
1277 BtShared *pBt;-
1278-
1279 -
1280 ((void) (0))-
1281 ;-
1282 -
1283 ((void) (0))-
1284 ;-
1285 pPage->leaf = (u8)(flagByte>>3); -
1286 ((void) (0))-
1287 ;-
1288 flagByte &= ~0x08;-
1289 pPage->childPtrSize = 4-4*pPage->leaf;-
1290 pPage->xCellSize = cellSizePtr;-
1291 pBt = pPage->pBt;-
1292 if( flagByte==(0x04 | 0x01)
flagByte==(0x04 | 0x01)Description
TRUEevaluated 3511427 times by 434 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 2380545 times by 391 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • ...
){
2380545-3511427
1293-
1294-
1295 -
1296 ((void) (0))-
1297 ;-
1298-
1299-
1300 -
1301 ((void) (0))-
1302 ;-
1303 pPage->intKey = 1;-
1304 if( pPage->leaf
pPage->leafDescription
TRUEevaluated 3455885 times by 434 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 55542 times by 365 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • ...
){
55542-3455885
1305 pPage->intKeyLeaf = 1;-
1306 pPage->xParseCell = btreeParseCellPtr;-
1307 }
executed 3455885 times by 434 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{
3455885
1308 pPage->intKeyLeaf = 0;-
1309 pPage->xCellSize = cellSizePtrNoPayload;-
1310 pPage->xParseCell = btreeParseCellPtrNoPayload;-
1311 }
executed 55542 times by 365 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (101)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • ...
55542
1312 pPage->maxLocal = pBt->maxLeaf;-
1313 pPage->minLocal = pBt->minLeaf;-
1314 }
executed 3511427 times by 434 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( flagByte==0x02
flagByte==0x02Description
TRUEevaluated 2380522 times by 391 tests
Evaluated by:
  • Self test
  • Self test (10)
  • Self test (100)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • ...
FALSEevaluated 23 times by 1 test
Evaluated by:
  • Self test (438)
){
23-3511427
1315-
1316-
1317 -
1318 ((void) (0))-
1319 ;-
1320-
1321-
1322 -
1323 ((void) (0))-
1324 ;-
1325 pPage->intKey = 0;-
1326 pPage->intKeyLeaf = 0;-
1327 pPage->xParseCell = btreeParseCellPtrIndex;-
1328 pPage->maxLocal = pBt->maxLocal;-
1329 pPage->minLocal = pBt->minLocal;-
1330 }
executed 2380522 times by 391 tests: end of block
Executed by:
  • Self test
  • Self test (10)
  • Self test (100)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • ...
else{
2380522
1331-
1332-
1333 return
executed 23 times by 1 test: return sqlite3CorruptError(1820);
Executed by:
  • Self test (438)
sqlite3CorruptError(1820);
executed 23 times by 1 test: return sqlite3CorruptError(1820);
Executed by:
  • Self test (438)
23
1334 }-
1335 pPage->max1bytePayload = pBt->max1bytePayload;-
1336 return
executed 5891949 times by 434 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 5891949 times by 434 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)
  • ...
5891949
1337}-
1338static int btreeInitPage(MemPage *pPage){-
1339 int pc;-
1340 u8 hdr;-
1341 u8 *data;-
1342 BtShared *pBt;-
1343 int usableSize;-
1344 u16 cellOffset;-
1345 int nFree;-
1346 int top;-
1347 int iCellFirst;-
1348 int iCellLast;-
1349-
1350 -
1351 ((void) (0))-
1352 ;-
1353 -
1354 ((void) (0))-
1355 ;-
1356 -
1357 ((void) (0))-
1358 ;-
1359 -
1360 ((void) (0))-
1361 ;-
1362 -
1363 ((void) (0))-
1364 ;-
1365 -
1366 ((void) (0))-
1367 ;-
1368 -
1369 ((void) (0))-
1370 ;-
1371-
1372 pBt = pPage->pBt;-
1373 hdr = pPage->hdrOffset;-
1374 data = pPage->aData;-
1375-
1376-
1377 if( decodeFlags(pPage, data[hdr])
decodeFlags(pPage, data[hdr])Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5092751 times by 434 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)
  • ...
){
23-5092751
1378 return
executed 23 times by 1 test: return sqlite3CorruptError(1861);
Executed by:
  • Self test (438)
sqlite3CorruptError(1861);
executed 23 times by 1 test: return sqlite3CorruptError(1861);
Executed by:
  • Self test (438)
23
1379 }-
1380 -
1381 ((void) (0))-
1382 ;-
1383 pPage->maskPage = (u16)(pBt->pageSize - 1);-
1384 pPage->nOverflow = 0;-
1385 usableSize = pBt->usableSize;-
1386 pPage->cellOffset = cellOffset = hdr + 8 + pPage->childPtrSize;-
1387 pPage->aDataEnd = &data[usableSize];-
1388 pPage->aCellIdx = &data[cellOffset];-
1389 pPage->aDataOfst = &data[pPage->childPtrSize];-
1390-
1391-
1392-
1393 top = (((((int)((&data[hdr+5])[0]<<8 | (&data[hdr+5])[1]))-1)&0xffff)+1);-
1394-
1395-
1396 pPage->nCell = ((&data[hdr+3])[0]<<8 | (&data[hdr+3])[1]);-
1397 if( pPage->nCell>((pBt->pageSize-8)/6)
pPage->nCell>(...pageSize-8)/6)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test (438)
FALSEevaluated 5092747 times by 434 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)
  • ...
){
4-5092747
1398-
1399 return
executed 4 times by 1 test: return sqlite3CorruptError(1880);
Executed by:
  • Self test (438)
sqlite3CorruptError(1880);
executed 4 times by 1 test: return sqlite3CorruptError(1880);
Executed by:
  • Self test (438)
4
1400 }-
1401 ;-
1402-
1403-
1404-
1405-
1406 -
1407 ((void) (0))-
1408 ;-
1409 iCellFirst = cellOffset + 2*pPage->nCell;-
1410 iCellLast = usableSize - 4;-
1411 if( pBt->db->flags & 0x00200000
pBt->db->flags & 0x00200000Description
TRUEnever evaluated
FALSEevaluated 5092747 times by 434 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-5092747
1412 int i;-
1413 int sz;-
1414-
1415 if( !pPage->leaf
!pPage->leafDescription
TRUEnever evaluated
FALSEnever evaluated
) iCellLast--;
never executed: iCellLast--;
0
1416 for(i=0; i<pPage->nCell
i<pPage->nCellDescription
TRUEnever evaluated
FALSEnever evaluated
; i++){
0
1417 pc = __builtin_bswap16(*(u16*)(&data[cellOffset+i*2]));-
1418 ;-
1419 ;-
1420 if( pc<iCellFirst
pc<iCellFirstDescription
TRUEnever evaluated
FALSEnever evaluated
|| pc>iCellLast
pc>iCellLastDescription
TRUEnever evaluated
FALSEnever evaluated
){
0
1421 return
never executed: return sqlite3CorruptError(1908);
sqlite3CorruptError(1908);
never executed: return sqlite3CorruptError(1908);
0
1422 }-
1423 sz = pPage->xCellSize(pPage, &data[pc]);-
1424 ;-
1425 if( pc+sz>usableSize
pc+sz>usableSizeDescription
TRUEnever evaluated
FALSEnever evaluated
){
0
1426 return
never executed: return sqlite3CorruptError(1913);
sqlite3CorruptError(1913);
never executed: return sqlite3CorruptError(1913);
0
1427 }-
1428 }
never executed: end of block
0
1429 if( !pPage->leaf
!pPage->leafDescription
TRUEnever evaluated
FALSEnever evaluated
) iCellLast++;
never executed: iCellLast++;
0
1430 }
never executed: end of block
0
1431-
1432-
1433-
1434-
1435-
1436 pc = ((&data[hdr+1])[0]<<8 | (&data[hdr+1])[1]);-
1437 nFree = data[hdr+7] + top;-
1438 if( pc>0
pc>0Description
TRUEevaluated 524028 times by 370 tests
Evaluated by:
  • Self test
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self test (124)
  • Self test (125)
  • Self test (126)
  • ...
FALSEevaluated 4568719 times by 434 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)
  • ...
){
524028-4568719
1439 u32 next, size;-
1440 if( pc<iCellFirst
pc<iCellFirstDescription
TRUEnever evaluated
FALSEevaluated 524028 times by 370 tests
Evaluated by:
  • Self test
  • Self test (10)
  • 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)
  • Self test (122)
  • Self test (123)
  • Self tes