Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/sqlite/src/src/dbpage.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | - | |||||||||||||||||||
4 | typedef struct DbpageTable DbpageTable; | - | ||||||||||||||||||
5 | typedef struct DbpageCursor DbpageCursor; | - | ||||||||||||||||||
6 | - | |||||||||||||||||||
7 | struct DbpageCursor { | - | ||||||||||||||||||
8 | sqlite3_vtab_cursor base; | - | ||||||||||||||||||
9 | int pgno; | - | ||||||||||||||||||
10 | int mxPgno; | - | ||||||||||||||||||
11 | Pager *pPager; | - | ||||||||||||||||||
12 | DbPage *pPage1; | - | ||||||||||||||||||
13 | int iDb; | - | ||||||||||||||||||
14 | int szPage; | - | ||||||||||||||||||
15 | }; | - | ||||||||||||||||||
16 | - | |||||||||||||||||||
17 | struct DbpageTable { | - | ||||||||||||||||||
18 | sqlite3_vtab base; | - | ||||||||||||||||||
19 | sqlite3 *db; | - | ||||||||||||||||||
20 | }; | - | ||||||||||||||||||
21 | static int dbpageConnect( | - | ||||||||||||||||||
22 | sqlite3 *db, | - | ||||||||||||||||||
23 | void *pAux, | - | ||||||||||||||||||
24 | int argc, const char *const*argv, | - | ||||||||||||||||||
25 | sqlite3_vtab **ppVtab, | - | ||||||||||||||||||
26 | char **pzErr | - | ||||||||||||||||||
27 | ){ | - | ||||||||||||||||||
28 | DbpageTable *pTab = 0; | - | ||||||||||||||||||
29 | int rc = 0; | - | ||||||||||||||||||
30 | - | |||||||||||||||||||
31 | rc = sqlite3_declare_vtab(db, | - | ||||||||||||||||||
32 | "CREATE TABLE x(pgno INTEGER PRIMARY KEY, data BLOB, schema HIDDEN)"); | - | ||||||||||||||||||
33 | if( rc==0
| 0-5 | ||||||||||||||||||
34 | pTab = (DbpageTable *)sqlite3_malloc64(sizeof(DbpageTable)); | - | ||||||||||||||||||
35 | if( pTab==0
never executed: rc = 7; | 0-5 | ||||||||||||||||||
36 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
37 | - | |||||||||||||||||||
38 | - | |||||||||||||||||||
39 | ((void) (0)) | - | ||||||||||||||||||
40 | ; | - | ||||||||||||||||||
41 | if( rc==0
| 0-5 | ||||||||||||||||||
42 | memset(pTab, 0, sizeof(DbpageTable)); | - | ||||||||||||||||||
43 | pTab->db = db; | - | ||||||||||||||||||
44 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
45 | - | |||||||||||||||||||
46 | *ppVtab = (sqlite3_vtab*)pTab; | - | ||||||||||||||||||
47 | return executed 5 times by 1 test: rc;return rc; Executed by:
executed 5 times by 1 test: return rc; Executed by:
| 5 | ||||||||||||||||||
48 | } | - | ||||||||||||||||||
49 | - | |||||||||||||||||||
50 | - | |||||||||||||||||||
51 | - | |||||||||||||||||||
52 | - | |||||||||||||||||||
53 | static int dbpageDisconnect(sqlite3_vtab *pVtab){ | - | ||||||||||||||||||
54 | sqlite3_free(pVtab); | - | ||||||||||||||||||
55 | return executed 5 times by 1 test: 0;return 0; Executed by:
executed 5 times by 1 test: return 0; Executed by:
| 5 | ||||||||||||||||||
56 | } | - | ||||||||||||||||||
57 | static int dbpageBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ | - | ||||||||||||||||||
58 | int i; | - | ||||||||||||||||||
59 | int iPlan = 0; | - | ||||||||||||||||||
60 | - | |||||||||||||||||||
61 | - | |||||||||||||||||||
62 | - | |||||||||||||||||||
63 | - | |||||||||||||||||||
64 | - | |||||||||||||||||||
65 | for(i=0; i<pIdxInfo->nConstraint
| 11-21 | ||||||||||||||||||
66 | struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i]; | - | ||||||||||||||||||
67 | if( p->iColumn!=2
executed 13 times by 1 test: continue; Executed by:
| 8-13 | ||||||||||||||||||
68 | if( p->op!=2
never executed: continue; | 0-8 | ||||||||||||||||||
69 | if( !p->usable
| 1-7 | ||||||||||||||||||
70 | - | |||||||||||||||||||
71 | pIdxInfo->estimatedRows = 0x7fffffff; | - | ||||||||||||||||||
72 | return executed 1 time by 1 test: 0;return 0; Executed by:
executed 1 time by 1 test: return 0; Executed by:
| 1 | ||||||||||||||||||
73 | } | - | ||||||||||||||||||
74 | iPlan = 2; | - | ||||||||||||||||||
75 | pIdxInfo->aConstraintUsage[i].argvIndex = 1; | - | ||||||||||||||||||
76 | pIdxInfo->aConstraintUsage[i].omit = 1; | - | ||||||||||||||||||
77 | break; executed 7 times by 1 test: break; Executed by:
| 7 | ||||||||||||||||||
78 | } | - | ||||||||||||||||||
79 | - | |||||||||||||||||||
80 | - | |||||||||||||||||||
81 | - | |||||||||||||||||||
82 | - | |||||||||||||||||||
83 | - | |||||||||||||||||||
84 | pIdxInfo->estimatedCost = 1.0e6; | - | ||||||||||||||||||
85 | - | |||||||||||||||||||
86 | - | |||||||||||||||||||
87 | for(i=0; i<pIdxInfo->nConstraint
| 3-20 | ||||||||||||||||||
88 | struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i]; | - | ||||||||||||||||||
89 | if( p->usable
| 0-20 | ||||||||||||||||||
90 | pIdxInfo->estimatedRows = 1; | - | ||||||||||||||||||
91 | pIdxInfo->idxFlags = 1; | - | ||||||||||||||||||
92 | pIdxInfo->estimatedCost = 1.0; | - | ||||||||||||||||||
93 | pIdxInfo->aConstraintUsage[i].argvIndex = iPlan
| 4-11 | ||||||||||||||||||
94 | pIdxInfo->aConstraintUsage[i].omit = 1; | - | ||||||||||||||||||
95 | iPlan |= 1; | - | ||||||||||||||||||
96 | break; executed 15 times by 1 test: break; Executed by:
| 15 | ||||||||||||||||||
97 | } | - | ||||||||||||||||||
98 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
99 | pIdxInfo->idxNum = iPlan; | - | ||||||||||||||||||
100 | - | |||||||||||||||||||
101 | if( pIdxInfo->nOrderBy>=1
| 2-16 | ||||||||||||||||||
102 | && pIdxInfo->aOrderBy[0].iColumn<=0
| 0-2 | ||||||||||||||||||
103 | && pIdxInfo->aOrderBy[0].desc==0
| 0-2 | ||||||||||||||||||
104 | ){ | - | ||||||||||||||||||
105 | pIdxInfo->orderByConsumed = 1; | - | ||||||||||||||||||
106 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||
107 | return executed 18 times by 1 test: 0;return 0; Executed by:
executed 18 times by 1 test: return 0; Executed by:
| 18 | ||||||||||||||||||
108 | } | - | ||||||||||||||||||
109 | - | |||||||||||||||||||
110 | - | |||||||||||||||||||
111 | - | |||||||||||||||||||
112 | - | |||||||||||||||||||
113 | static int dbpageOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){ | - | ||||||||||||||||||
114 | DbpageCursor *pCsr; | - | ||||||||||||||||||
115 | - | |||||||||||||||||||
116 | pCsr = (DbpageCursor *)sqlite3_malloc64(sizeof(DbpageCursor)); | - | ||||||||||||||||||
117 | if( pCsr==0
| 0-18 | ||||||||||||||||||
118 | return never executed: 7;return 7; never executed: return 7; | 0 | ||||||||||||||||||
119 | }else{ | - | ||||||||||||||||||
120 | memset(pCsr, 0, sizeof(DbpageCursor)); | - | ||||||||||||||||||
121 | pCsr->base.pVtab = pVTab; | - | ||||||||||||||||||
122 | pCsr->pgno = -1; | - | ||||||||||||||||||
123 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||
124 | - | |||||||||||||||||||
125 | *ppCursor = (sqlite3_vtab_cursor *)pCsr; | - | ||||||||||||||||||
126 | return executed 18 times by 1 test: 0;return 0; Executed by:
executed 18 times by 1 test: return 0; Executed by:
| 18 | ||||||||||||||||||
127 | } | - | ||||||||||||||||||
128 | - | |||||||||||||||||||
129 | - | |||||||||||||||||||
130 | - | |||||||||||||||||||
131 | - | |||||||||||||||||||
132 | static int dbpageClose(sqlite3_vtab_cursor *pCursor){ | - | ||||||||||||||||||
133 | DbpageCursor *pCsr = (DbpageCursor *)pCursor; | - | ||||||||||||||||||
134 | if( pCsr->pPage1
executed 18 times by 1 test: sqlite3PagerUnrefPageOne(pCsr->pPage1); Executed by:
| 0-18 | ||||||||||||||||||
135 | sqlite3_free(pCsr); | - | ||||||||||||||||||
136 | return executed 18 times by 1 test: 0;return 0; Executed by:
executed 18 times by 1 test: return 0; Executed by:
| 18 | ||||||||||||||||||
137 | } | - | ||||||||||||||||||
138 | - | |||||||||||||||||||
139 | - | |||||||||||||||||||
140 | - | |||||||||||||||||||
141 | - | |||||||||||||||||||
142 | static int dbpageNext(sqlite3_vtab_cursor *pCursor){ | - | ||||||||||||||||||
143 | int rc = 0; | - | ||||||||||||||||||
144 | DbpageCursor *pCsr = (DbpageCursor *)pCursor; | - | ||||||||||||||||||
145 | pCsr->pgno++; | - | ||||||||||||||||||
146 | return executed 16 times by 1 test: rc;return rc; Executed by:
executed 16 times by 1 test: return rc; Executed by:
| 16 | ||||||||||||||||||
147 | } | - | ||||||||||||||||||
148 | - | |||||||||||||||||||
149 | static int dbpageEof(sqlite3_vtab_cursor *pCursor){ | - | ||||||||||||||||||
150 | DbpageCursor *pCsr = (DbpageCursor *)pCursor; | - | ||||||||||||||||||
151 | return executed 35 times by 1 test: pCsr->pgno > pCsr->mxPgno;return pCsr->pgno > pCsr->mxPgno; Executed by:
executed 35 times by 1 test: return pCsr->pgno > pCsr->mxPgno; Executed by:
| 35 | ||||||||||||||||||
152 | } | - | ||||||||||||||||||
153 | static int dbpageFilter( | - | ||||||||||||||||||
154 | sqlite3_vtab_cursor *pCursor, | - | ||||||||||||||||||
155 | int idxNum, const char *idxStr, | - | ||||||||||||||||||
156 | int argc, sqlite3_value **argv | - | ||||||||||||||||||
157 | ){ | - | ||||||||||||||||||
158 | DbpageCursor *pCsr = (DbpageCursor *)pCursor; | - | ||||||||||||||||||
159 | DbpageTable *pTab = (DbpageTable *)pCursor->pVtab; | - | ||||||||||||||||||
160 | int rc; | - | ||||||||||||||||||
161 | sqlite3 *db = pTab->db; | - | ||||||||||||||||||
162 | Btree *pBt; | - | ||||||||||||||||||
163 | - | |||||||||||||||||||
164 | - | |||||||||||||||||||
165 | pCsr->pgno = 1; | - | ||||||||||||||||||
166 | pCsr->mxPgno = 0; | - | ||||||||||||||||||
167 | - | |||||||||||||||||||
168 | if( idxNum & 2
| 8-11 | ||||||||||||||||||
169 | const char *zSchema; | - | ||||||||||||||||||
170 | - | |||||||||||||||||||
171 | ((void) (0)) | - | ||||||||||||||||||
172 | ; | - | ||||||||||||||||||
173 | zSchema = (const char*)sqlite3_value_text(argv[0]); | - | ||||||||||||||||||
174 | pCsr->iDb = sqlite3FindDbName(db, zSchema); | - | ||||||||||||||||||
175 | if( pCsr->iDb<0
never executed: 0;return 0; never executed: return 0; | 0-8 | ||||||||||||||||||
176 | } executed 8 times by 1 test: else{end of block Executed by:
| 8 | ||||||||||||||||||
177 | pCsr->iDb = 0; | - | ||||||||||||||||||
178 | } executed 11 times by 1 test: end of block Executed by:
| 11 | ||||||||||||||||||
179 | pBt = db->aDb[pCsr->iDb].pBt; | - | ||||||||||||||||||
180 | if( pBt==0
never executed: 0;return 0; never executed: return 0; | 0-19 | ||||||||||||||||||
181 | pCsr->pPager = sqlite3BtreePager(pBt); | - | ||||||||||||||||||
182 | pCsr->szPage = sqlite3BtreeGetPageSize(pBt); | - | ||||||||||||||||||
183 | pCsr->mxPgno = sqlite3BtreeLastPage(pBt); | - | ||||||||||||||||||
184 | if( idxNum & 1
| 3-16 | ||||||||||||||||||
185 | - | |||||||||||||||||||
186 | ((void) (0)) | - | ||||||||||||||||||
187 | ; | - | ||||||||||||||||||
188 | pCsr->pgno = sqlite3_value_int(argv[idxNum>>1]); | - | ||||||||||||||||||
189 | if( pCsr->pgno<1
| 1-15 | ||||||||||||||||||
190 | pCsr->pgno = 1; | - | ||||||||||||||||||
191 | pCsr->mxPgno = 0; | - | ||||||||||||||||||
192 | } executed 2 times by 1 test: else{end of block Executed by:
| 2 | ||||||||||||||||||
193 | pCsr->mxPgno = pCsr->pgno; | - | ||||||||||||||||||
194 | } executed 14 times by 1 test: end of block Executed by:
| 14 | ||||||||||||||||||
195 | }else{ | - | ||||||||||||||||||
196 | - | |||||||||||||||||||
197 | ((void) (0)) | - | ||||||||||||||||||
198 | ; | - | ||||||||||||||||||
199 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||
200 | if( pCsr->pPage1
executed 1 time by 1 test: sqlite3PagerUnrefPageOne(pCsr->pPage1); Executed by:
| 1-18 | ||||||||||||||||||
201 | rc = sqlite3PagerGet(pCsr->pPager, 1, &pCsr->pPage1, 0); | - | ||||||||||||||||||
202 | return executed 19 times by 1 test: rc;return rc; Executed by:
executed 19 times by 1 test: return rc; Executed by:
| 19 | ||||||||||||||||||
203 | } | - | ||||||||||||||||||
204 | - | |||||||||||||||||||
205 | static int dbpageColumn( | - | ||||||||||||||||||
206 | sqlite3_vtab_cursor *pCursor, | - | ||||||||||||||||||
207 | sqlite3_context *ctx, | - | ||||||||||||||||||
208 | int i | - | ||||||||||||||||||
209 | ){ | - | ||||||||||||||||||
210 | DbpageCursor *pCsr = (DbpageCursor *)pCursor; | - | ||||||||||||||||||
211 | int rc = 0; | - | ||||||||||||||||||
212 | switch( i ){ | - | ||||||||||||||||||
213 | case executed 22 times by 1 test: 0:case 0: Executed by:
executed 22 times by 1 test: {case 0: Executed by:
| 22 | ||||||||||||||||||
214 | sqlite3_result_int(ctx, pCsr->pgno); | - | ||||||||||||||||||
215 | break; executed 22 times by 1 test: break; Executed by:
| 22 | ||||||||||||||||||
216 | } | - | ||||||||||||||||||
217 | case executed 16 times by 1 test: 1:case 1: Executed by:
executed 16 times by 1 test: {case 1: Executed by:
| 16 | ||||||||||||||||||
218 | DbPage *pDbPage = 0; | - | ||||||||||||||||||
219 | rc = sqlite3PagerGet(pCsr->pPager, pCsr->pgno, (DbPage**)&pDbPage, 0); | - | ||||||||||||||||||
220 | if( rc==0
| 0-16 | ||||||||||||||||||
221 | sqlite3_result_blob(ctx, sqlite3PagerGetData(pDbPage), pCsr->szPage, | - | ||||||||||||||||||
222 | ((sqlite3_destructor_type)-1)); | - | ||||||||||||||||||
223 | } executed 16 times by 1 test: end of block Executed by:
| 16 | ||||||||||||||||||
224 | sqlite3PagerUnref(pDbPage); | - | ||||||||||||||||||
225 | break; executed 16 times by 1 test: break; Executed by:
| 16 | ||||||||||||||||||
226 | } | - | ||||||||||||||||||
227 | default executed 10 times by 1 test: :default: Executed by:
executed 10 times by 1 test: {default: Executed by:
| 10 | ||||||||||||||||||
228 | sqlite3 *db = sqlite3_context_db_handle(ctx); | - | ||||||||||||||||||
229 | sqlite3_result_text(ctx, db->aDb[pCsr->iDb].zDbSName, -1, ((sqlite3_destructor_type)0)); | - | ||||||||||||||||||
230 | break; executed 10 times by 1 test: break; Executed by:
| 10 | ||||||||||||||||||
231 | } | - | ||||||||||||||||||
232 | } | - | ||||||||||||||||||
233 | return executed 48 times by 1 test: 0;return 0; Executed by:
executed 48 times by 1 test: return 0; Executed by:
| 48 | ||||||||||||||||||
234 | } | - | ||||||||||||||||||
235 | - | |||||||||||||||||||
236 | static int dbpageRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){ | - | ||||||||||||||||||
237 | DbpageCursor *pCsr = (DbpageCursor *)pCursor; | - | ||||||||||||||||||
238 | *pRowid = pCsr->pgno; | - | ||||||||||||||||||
239 | return executed 16 times by 1 test: 0;return 0; Executed by:
executed 16 times by 1 test: return 0; Executed by:
| 16 | ||||||||||||||||||
240 | } | - | ||||||||||||||||||
241 | - | |||||||||||||||||||
242 | static int dbpageUpdate( | - | ||||||||||||||||||
243 | sqlite3_vtab *pVtab, | - | ||||||||||||||||||
244 | int argc, | - | ||||||||||||||||||
245 | sqlite3_value **argv, | - | ||||||||||||||||||
246 | sqlite_int64 *pRowid | - | ||||||||||||||||||
247 | ){ | - | ||||||||||||||||||
248 | DbpageTable *pTab = (DbpageTable *)pVtab; | - | ||||||||||||||||||
249 | Pgno pgno; | - | ||||||||||||||||||
250 | DbPage *pDbPage = 0; | - | ||||||||||||||||||
251 | int rc = 0; | - | ||||||||||||||||||
252 | char *zErr = 0; | - | ||||||||||||||||||
253 | const char *zSchema; | - | ||||||||||||||||||
254 | int iDb; | - | ||||||||||||||||||
255 | Btree *pBt; | - | ||||||||||||||||||
256 | Pager *pPager; | - | ||||||||||||||||||
257 | int szPage; | - | ||||||||||||||||||
258 | - | |||||||||||||||||||
259 | if( argc==1
| 0-8 | ||||||||||||||||||
260 | zErr = "cannot delete"; | - | ||||||||||||||||||
261 | goto never executed: update_fail;goto update_fail; never executed: goto update_fail; | 0 | ||||||||||||||||||
262 | } | - | ||||||||||||||||||
263 | pgno = sqlite3_value_int(argv[0]); | - | ||||||||||||||||||
264 | if( (
| 0-8 | ||||||||||||||||||
265 | zErr = "cannot insert"; | - | ||||||||||||||||||
266 | goto never executed: update_fail;goto update_fail; never executed: goto update_fail; | 0 | ||||||||||||||||||
267 | } | - | ||||||||||||||||||
268 | zSchema = (const char*)sqlite3_value_text(argv[4]); | - | ||||||||||||||||||
269 | iDb = zSchema
| 0-8 | ||||||||||||||||||
270 | if( iDb<0
| 0-8 | ||||||||||||||||||
271 | zErr = "no such schema"; | - | ||||||||||||||||||
272 | goto never executed: update_fail;goto update_fail; never executed: goto update_fail; | 0 | ||||||||||||||||||
273 | } | - | ||||||||||||||||||
274 | pBt = pTab->db->aDb[iDb].pBt; | - | ||||||||||||||||||
275 | if( pgno<1
| 0-8 | ||||||||||||||||||
276 | zErr = "bad page number"; | - | ||||||||||||||||||
277 | goto never executed: update_fail;goto update_fail; never executed: goto update_fail; | 0 | ||||||||||||||||||
278 | } | - | ||||||||||||||||||
279 | szPage = sqlite3BtreeGetPageSize(pBt); | - | ||||||||||||||||||
280 | if( sqlite3_value_type(argv[3])!=4
| 0-8 | ||||||||||||||||||
281 | || sqlite3_value_bytes(argv[3])!=szPage
| 0-8 | ||||||||||||||||||
282 | ){ | - | ||||||||||||||||||
283 | zErr = "bad page value"; | - | ||||||||||||||||||
284 | goto never executed: update_fail;goto update_fail; never executed: goto update_fail; | 0 | ||||||||||||||||||
285 | } | - | ||||||||||||||||||
286 | pPager = sqlite3BtreePager(pBt); | - | ||||||||||||||||||
287 | rc = sqlite3PagerGet(pPager, pgno, (DbPage**)&pDbPage, 0); | - | ||||||||||||||||||
288 | if( rc==0
| 0-8 | ||||||||||||||||||
289 | rc = sqlite3PagerWrite(pDbPage); | - | ||||||||||||||||||
290 | if( rc==0
| 0-8 | ||||||||||||||||||
291 | memcpy(sqlite3PagerGetData(pDbPage), | - | ||||||||||||||||||
292 | sqlite3_value_blob(argv[3]), | - | ||||||||||||||||||
293 | szPage); | - | ||||||||||||||||||
294 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||
295 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||
296 | sqlite3PagerUnref(pDbPage); | - | ||||||||||||||||||
297 | return executed 8 times by 1 test: rc;return rc; Executed by:
executed 8 times by 1 test: return rc; Executed by:
| 8 | ||||||||||||||||||
298 | - | |||||||||||||||||||
299 | update_fail: | - | ||||||||||||||||||
300 | sqlite3_free(pVtab->zErrMsg); | - | ||||||||||||||||||
301 | pVtab->zErrMsg = sqlite3_mprintf("%s", zErr); | - | ||||||||||||||||||
302 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||
303 | } | - | ||||||||||||||||||
304 | - | |||||||||||||||||||
305 | - | |||||||||||||||||||
306 | - | |||||||||||||||||||
307 | - | |||||||||||||||||||
308 | - | |||||||||||||||||||
309 | static int dbpageBegin(sqlite3_vtab *pVtab){ | - | ||||||||||||||||||
310 | DbpageTable *pTab = (DbpageTable *)pVtab; | - | ||||||||||||||||||
311 | sqlite3 *db = pTab->db; | - | ||||||||||||||||||
312 | int i; | - | ||||||||||||||||||
313 | for(i=0; i<db->nDb
| 8-20 | ||||||||||||||||||
314 | Btree *pBt = db->aDb[i].pBt; | - | ||||||||||||||||||
315 | if( pBt
executed 19 times by 1 test: sqlite3BtreeBeginTrans(pBt, 1, 0); Executed by:
| 1-19 | ||||||||||||||||||
316 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||
317 | return executed 8 times by 1 test: 0;return 0; Executed by:
executed 8 times by 1 test: return 0; Executed by:
| 8 | ||||||||||||||||||
318 | } | - | ||||||||||||||||||
319 | - | |||||||||||||||||||
320 | - | |||||||||||||||||||
321 | - | |||||||||||||||||||
322 | - | |||||||||||||||||||
323 | - | |||||||||||||||||||
324 | int sqlite3DbpageRegister(sqlite3 *db){ | - | ||||||||||||||||||
325 | static sqlite3_module dbpage_module = { | - | ||||||||||||||||||
326 | 0, | - | ||||||||||||||||||
327 | dbpageConnect, | - | ||||||||||||||||||
328 | dbpageConnect, | - | ||||||||||||||||||
329 | dbpageBestIndex, | - | ||||||||||||||||||
330 | dbpageDisconnect, | - | ||||||||||||||||||
331 | dbpageDisconnect, | - | ||||||||||||||||||
332 | dbpageOpen, | - | ||||||||||||||||||
333 | dbpageClose, | - | ||||||||||||||||||
334 | dbpageFilter, | - | ||||||||||||||||||
335 | dbpageNext, | - | ||||||||||||||||||
336 | dbpageEof, | - | ||||||||||||||||||
337 | dbpageColumn, | - | ||||||||||||||||||
338 | dbpageRowid, | - | ||||||||||||||||||
339 | dbpageUpdate, | - | ||||||||||||||||||
340 | dbpageBegin, | - | ||||||||||||||||||
341 | 0, | - | ||||||||||||||||||
342 | 0, | - | ||||||||||||||||||
343 | 0, | - | ||||||||||||||||||
344 | 0, | - | ||||||||||||||||||
345 | 0, | - | ||||||||||||||||||
346 | 0, | - | ||||||||||||||||||
347 | 0, | - | ||||||||||||||||||
348 | 0, | - | ||||||||||||||||||
349 | }; | - | ||||||||||||||||||
350 | return executed 31552 times by 438 tests: sqlite3_create_module(db, "sqlite_dbpage", &dbpage_module, 0);return sqlite3_create_module(db, "sqlite_dbpage", &dbpage_module, 0); Executed by:
executed 31552 times by 438 tests: return sqlite3_create_module(db, "sqlite_dbpage", &dbpage_module, 0); Executed by:
| 31552 | ||||||||||||||||||
351 | } | - | ||||||||||||||||||
Switch to Source code | Preprocessed file |