Branch Coverage

delete.c
Criterion Covered Total %
branch 34 100 34.0


line true false branch
27 54 54 for(i=0; inSrc; i++){
42 0 50 if( pTab->readOnly ){
46 50 0 if( !viewOk && pTab->pSelect ){
0 50 if( !viewOk && pTab->pSelect ){
79 6 0 if( pParse->nErr || sqlite_malloc_failed ){
0 6 if( pParse->nErr || sqlite_malloc_failed ){
92 0 6 if( pTab==0 ) goto delete_from_cleanup;
97 6 0 row_triggers_exist = before_triggers || after_triggers;
0 6 row_triggers_exist = before_triggers || after_triggers;
99 0 6 if( sqliteIsReadOnly(pParse, pTab, before_triggers) ){
104 0 6 if( sqliteAuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
110 0 6 if( isView && sqliteViewGetColumnNames(pParse, pTab) ){
0 0 if( isView && sqliteViewGetColumnNames(pParse, pTab) ){
116 0 6 if( row_triggers_exist ){
124 6 0 if( pWhere ){
125 0 6 if( sqliteExprResolveIds(pParse, pTabList, 0, pWhere) ){
128 0 6 if( sqliteExprCheck(pParse, pWhere, 0, 0) ){
135 0 6 if( isView ){
142 0 6 if( v==0 ){
150 0 6 if( isView ){
159 0 6 if( db->flags & SQLITE_CountRows ){
167 0 6 if( pWhere==0 && !row_triggers_exist ){
0 0 if( pWhere==0 && !row_triggers_exist ){
168 0 0 if( db->flags & SQLITE_CountRows ){
173 0 0 if( !isView ){
183 0 0 if( !isView ){
185 0 0 for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
198 0 6 if( pWInfo==0 ) goto delete_from_cleanup;
203 0 6 if( db->flags & SQLITE_CountRows ){
213 0 6 if( row_triggers_exist ){
227 0 6 if( row_triggers_exist ){
230 0 0 if( !isView ){
239 0 0 if( !isView ){
243 0 0 sqliteCodeRowTrigger(pParse, TK_DELETE, 0, TK_BEFORE, pTab, -1,
248 6 0 if( !isView ){
260 6 0 if( !row_triggers_exist ){
271 0 6 if( row_triggers_exist ){
272 0 0 if( !isView ){
273 0 0 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
278 0 0 sqliteCodeRowTrigger(pParse, TK_DELETE, 0, TK_AFTER, pTab, -1,
289 6 0 if( !row_triggers_exist ){
290 0 6 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
303 0 6 if( db->flags & SQLITE_CountRows ){
346 6 0 sqliteVdbeAddOp(v, OP_Delete, iCur,
377 0 6 for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
379 0 0 if( aIdxUsed!=0 && aIdxUsed[i-1]==0 ) continue;
0 0 if( aIdxUsed!=0 && aIdxUsed[i-1]==0 ) continue;
381 0 0 for(j=0; jnColumn; j++){
383 0 0 if( idx==pTab->iPKey ){
390 0 0 if( db->file_format>=4 ) sqliteAddIdxKeyType(v, pIdx);