| Line | Source | Count |
| 1 | static int resolveAttachExpr(NameContext *pName, Expr *pExpr) | - |
| 2 | { | - |
| 3 | int rc = 0; | - |
| 4 | if( pExpr| TRUE | evaluated 3458 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 1978 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 1978-3458 |
| 5 | if( pExpr->op!=59| TRUE | evaluated 1669 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 1789 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 1669-1789 |
| 6 | rc = sqlite3ResolveExprNames(pName, pExpr); | - |
| 7 | }executed 1669 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
else{ | 1669 |
| 8 | pExpr->op = 106; | - |
| 9 | }executed 1789 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1789 |
| 10 | } | - |
| 11 | returnexecuted 5436 times by 12 tests: return rc;Executed by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
rc;executed 5436 times by 12 tests: return rc;Executed by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 5436 |
| 12 | } | - |
| 13 | static void attachFunc( | - |
| 14 | sqlite3_context *context, | - |
| 15 | int NotUsed, | - |
| 16 | sqlite3_value **argv | - |
| 17 | ){ | - |
| 18 | int i; | - |
| 19 | int rc = 0; | - |
| 20 | sqlite3 *db = sqlite3_context_db_handle(context); | - |
| 21 | const char *zName; | - |
| 22 | const char *zFile; | - |
| 23 | char *zPath = 0; | - |
| 24 | char *zErr = 0; | - |
| 25 | unsigned int flags; | - |
| 26 | Db *aNew; | - |
| 27 | Db *pNew; | - |
| 28 | char *zErrDyn = 0; | - |
| 29 | sqlite3_vfs *pVfs; | - |
| 30 | | - |
| 31 | (void)(NotUsed); | - |
| 32 | zFile = (const char *)sqlite3_value_text(argv[0]); | - |
| 33 | zName = (const char *)sqlite3_value_text(argv[1]); | - |
| 34 | if( zFile==0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 1642 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
) zFile = "";executed 2 times by 1 test: zFile = ""; | 2-1642 |
| 35 | if( zName==0| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 1640 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
) zName = "";executed 4 times by 1 test: zName = ""; | 4-1640 |
| 36 | | - |
| 37 | | - |
| 38 | | - |
| 39 | | - |
| 40 | | - |
| 41 | | - |
| 42 | | - |
| 43 | if( (| TRUE | never evaluated | | FALSE | evaluated 1644 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
0)| TRUE | never evaluated | | FALSE | evaluated 1644 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | pVfs = sqlite3_vfs_find("memdb"); dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 48 | if( pVfs==0 ) return; dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 49 | pNew = &db->aDb[db->init.iDb]; dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 50 | if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 51 | pNew->pBt = 0; dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 52 | pNew->pSchema = 0; dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 53 | rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } | - |
| 54 | } dead code: { pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; pNew = &db->aDb[db->init.iDb]; if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); pNew->pBt = 0; pNew->pSchema = 0; rc = sqlite3BtreeOpen(pVfs, "x", db, &pNew->pBt, 0, 0x00000100); } else{ | - |
| 55 | if( db->nDb>=db->aLimit[7]+2| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 1641 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 3-1641 |
| 56 | zErrDyn = sqlite3MPrintf(db, "too many attached databases - max %d", | - |
| 57 | db->aLimit[7] | - |
| 58 | ); | - |
| 59 | gotoexecuted 3 times by 1 test: goto attach_error; attach_error;executed 3 times by 1 test: goto attach_error; | 3 |
| 60 | } | - |
| 61 | for(i=0; i<db->nDb| TRUE | evaluated 3503 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 1633 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
; i++){ | 1633-3503 |
| 62 | char *z = db->aDb[i].zDbSName; | - |
| 63 | | - |
| 64 | ((void) (0)) | - |
| 65 | ; | - |
| 66 | if( sqlite3StrICmp(z, zName)==0| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 3495 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 8-3495 |
| 67 | zErrDyn = sqlite3MPrintf(db, "database %s is already in use", zName); | - |
| 68 | gotoexecuted 8 times by 1 test: goto attach_error; attach_error;executed 8 times by 1 test: goto attach_error; | 8 |
| 69 | } | - |
| 70 | }executed 3495 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 3495 |
| 71 | | - |
| 72 | | - |
| 73 | | - |
| 74 | | - |
| 75 | if( db->aDb==db->aDbStatic| TRUE | evaluated 1537 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 96 times by 1 test |
){ | 96-1537 |
| 76 | aNew = sqlite3DbMallocRawNN(db, sizeof(db->aDb[0])*3 ); | - |
| 77 | if( aNew==0| TRUE | never evaluated | | FALSE | evaluated 1537 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
) return;never executed: return; | 0-1537 |
| 78 | memcpy(aNew, db->aDb, sizeof(db->aDb[0])*2); | - |
| 79 | }executed 1537 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
else{ | 1537 |
| 80 | aNew = sqlite3DbRealloc(db, db->aDb, sizeof(db->aDb[0])*(db->nDb+1) ); | - |
| 81 | if( aNew==0| TRUE | never evaluated | | FALSE | evaluated 96 times by 1 test |
) return;never executed: return; | 0-96 |
| 82 | }executed 96 times by 1 test: end of block | 96 |
| 83 | db->aDb = aNew; | - |
| 84 | pNew = &db->aDb[db->nDb]; | - |
| 85 | memset(pNew, 0, sizeof(*pNew)); | - |
| 86 | | - |
| 87 | | - |
| 88 | | - |
| 89 | | - |
| 90 | | - |
| 91 | flags = db->openFlags; | - |
| 92 | rc = sqlite3ParseUri(db->pVfs->zName, zFile, &flags, &pVfs, &zPath, &zErr); | - |
| 93 | if( rc!=0| TRUE | never evaluated | | FALSE | evaluated 1633 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 0-1633 |
| 94 | if( rc==7| TRUE | never evaluated | | FALSE | never evaluated |
) sqlite3OomFault(db);never executed: sqlite3OomFault(db); | 0 |
| 95 | sqlite3_result_error(context, zErr, -1); | - |
| 96 | sqlite3_free(zErr); | - |
| 97 | return; never executed: return; | 0 |
| 98 | } | - |
| 99 | | - |
| 100 | ((void) (0)) | - |
| 101 | ; | - |
| 102 | flags |= 0x00000100; | - |
| 103 | rc = sqlite3BtreeOpen(pVfs, zPath, db, &pNew->pBt, 0, flags); | - |
| 104 | sqlite3_free( zPath ); | - |
| 105 | db->nDb++; | - |
| 106 | }executed 1633 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1633 |
| 107 | db->noSharedCache = 0; | - |
| 108 | if( rc==19| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 1630 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 3-1630 |
| 109 | rc = 1; | - |
| 110 | zErrDyn = sqlite3MPrintf(db, "database is already attached"); | - |
| 111 | }executed 3 times by 1 test: end of block else if( rc==0| TRUE | evaluated 1628 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 2 times by 1 test |
){ | 2-1628 |
| 112 | Pager *pPager; | - |
| 113 | pNew->pSchema = sqlite3SchemaGet(db, pNew->pBt); | - |
| 114 | if( !pNew->pSchema| TRUE | never evaluated | | FALSE | evaluated 1628 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 0-1628 |
| 115 | rc = 7; | - |
| 116 | } never executed: end of block else if( pNew->pSchema->file_format| TRUE | evaluated 25 times by 1 test | | FALSE | evaluated 1603 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
&& pNew->pSchema->enc!=((db)->enc)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 24 times by 1 test |
){ | 0-1603 |
| 117 | zErrDyn = sqlite3MPrintf(db, | - |
| 118 | "attached databases must use the same text encoding as main database"); | - |
| 119 | rc = 1; | - |
| 120 | }executed 1 time by 1 test: end of block | 1 |
| 121 | sqlite3BtreeEnter(pNew->pBt); | - |
| 122 | pPager = sqlite3BtreePager(pNew->pBt); | - |
| 123 | sqlite3PagerLockingMode(pPager, db->dfltLockMode); | - |
| 124 | sqlite3BtreeSecureDelete(pNew->pBt, | - |
| 125 | sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) ); | - |
| 126 | | - |
| 127 | sqlite3BtreeSetPagerFlags(pNew->pBt, | - |
| 128 | 0x03 | (db->flags & 0x38)); | - |
| 129 | | - |
| 130 | sqlite3BtreeLeave(pNew->pBt); | - |
| 131 | }executed 1628 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1628 |
| 132 | pNew->safety_level = 2 +1; | - |
| 133 | if( !(0)| TRUE | evaluated 1633 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | never evaluated |
) pNew->zDbSName = sqlite3DbStrDup(db, zName);executed 1633 times by 12 tests: pNew->zDbSName = sqlite3DbStrDup(db, zName);Executed by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 0-1633 |
| 134 | if( rc==0| TRUE | evaluated 1627 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 6 times by 1 test |
&& pNew->zDbSName==0| TRUE | never evaluated | | FALSE | evaluated 1627 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 0-1627 |
| 135 | rc = 7; | - |
| 136 | } never executed: end of block | 0 |
| 137 | if( rc==0| TRUE | evaluated 1627 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 6 times by 1 test |
){ | 6-1627 |
| 138 | sqlite3BtreeEnterAll(db); | - |
| 139 | db->init.iDb = 0; | - |
| 140 | db->mDbFlags &= ~(0x0008); | - |
| 141 | rc = sqlite3Init(db, &zErrDyn); | - |
| 142 | sqlite3BtreeLeaveAll(db); | - |
| 143 | | - |
| 144 | ((void) (0)) | - |
| 145 | ; | - |
| 146 | }executed 1627 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1627 |
| 147 | if( rc| TRUE | evaluated 9 times by 1 test | | FALSE | evaluated 1624 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 9-1624 |
| 148 | if( !(0)| TRUE | evaluated 9 times by 1 test | | FALSE | never evaluated |
){ | 0-9 |
| 149 | int iDb = db->nDb - 1; | - |
| 150 | | - |
| 151 | ((void) (0)) | - |
| 152 | ; | - |
| 153 | if( db->aDb[iDb].pBt| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 5 times by 1 test |
){ | 4-5 |
| 154 | sqlite3BtreeClose(db->aDb[iDb].pBt); | - |
| 155 | db->aDb[iDb].pBt = 0; | - |
| 156 | db->aDb[iDb].pSchema = 0; | - |
| 157 | }executed 4 times by 1 test: end of block | 4 |
| 158 | sqlite3ResetAllSchemasOfConnection(db); | - |
| 159 | db->nDb = iDb; | - |
| 160 | if( rc==7| TRUE | never evaluated | | FALSE | evaluated 9 times by 1 test |
|| rc==(10 | (12<<8))| TRUE | never evaluated | | FALSE | evaluated 9 times by 1 test |
){ | 0-9 |
| 161 | sqlite3OomFault(db); | - |
| 162 | sqlite3DbFree(db, zErrDyn); | - |
| 163 | zErrDyn = sqlite3MPrintf(db, "out of memory"); | - |
| 164 | } never executed: end of block else if( zErrDyn==0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 7 times by 1 test |
){ | 0-7 |
| 165 | zErrDyn = sqlite3MPrintf(db, "unable to open database: %s", zFile); | - |
| 166 | }executed 2 times by 1 test: end of block | 2 |
| 167 | }executed 9 times by 1 test: end of block | 9 |
| 168 | gotoexecuted 9 times by 1 test: goto attach_error; attach_error;executed 9 times by 1 test: goto attach_error; | 9 |
| 169 | } | - |
| 170 | | - |
| 171 | return;executed 1624 times by 12 tests: return;Executed by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1624 |
| 172 | | - |
| 173 | attach_error: | - |
| 174 | | - |
| 175 | if( zErrDyn| TRUE | evaluated 20 times by 1 test | | FALSE | never evaluated |
){ | 0-20 |
| 176 | sqlite3_result_error(context, zErrDyn, -1); | - |
| 177 | sqlite3DbFree(db, zErrDyn); | - |
| 178 | }executed 20 times by 1 test: end of block | 20 |
| 179 | if( rc| TRUE | evaluated 9 times by 1 test | | FALSE | evaluated 11 times by 1 test |
) sqlite3_result_error_code(context, rc);executed 9 times by 1 test: sqlite3_result_error_code(context, rc); | 9-11 |
| 180 | }executed 20 times by 1 test: end of block | 20 |
| 181 | static void detachFunc( | - |
| 182 | sqlite3_context *context, | - |
| 183 | int NotUsed, | - |
| 184 | sqlite3_value **argv | - |
| 185 | ){ | - |
| 186 | const char *zName = (const char *)sqlite3_value_text(argv[0]); | - |
| 187 | sqlite3 *db = sqlite3_context_db_handle(context); | - |
| 188 | int i; | - |
| 189 | Db *pDb = 0; | - |
| 190 | char zErr[128]; | - |
| 191 | | - |
| 192 | (void)(NotUsed); | - |
| 193 | | - |
| 194 | if( zName==0| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 158 times by 1 test |
) zName = "";executed 3 times by 1 test: zName = ""; | 3-158 |
| 195 | for(i=0; i<db->nDb| TRUE | evaluated 546 times by 1 test | | FALSE | evaluated 4 times by 1 test |
; i++){ | 4-546 |
| 196 | pDb = &db->aDb[i]; | - |
| 197 | if( pDb->pBt==0| TRUE | evaluated 117 times by 1 test | | FALSE | evaluated 429 times by 1 test |
) continue;executed 117 times by 1 test: continue; | 117-429 |
| 198 | if( sqlite3StrICmp(pDb->zDbSName, zName)==0| TRUE | evaluated 157 times by 1 test | | FALSE | evaluated 272 times by 1 test |
) break;executed 157 times by 1 test: break; | 157-272 |
| 199 | }executed 272 times by 1 test: end of block | 272 |
| 200 | | - |
| 201 | if( i>=db->nDb| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 157 times by 1 test |
){ | 4-157 |
| 202 | sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName); | - |
| 203 | gotoexecuted 4 times by 1 test: goto detach_error; detach_error;executed 4 times by 1 test: goto detach_error; | 4 |
| 204 | } | - |
| 205 | if( i<2| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 155 times by 1 test |
){ | 2-155 |
| 206 | sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName); | - |
| 207 | gotoexecuted 2 times by 1 test: goto detach_error; detach_error;executed 2 times by 1 test: goto detach_error; | 2 |
| 208 | } | - |
| 209 | if( sqlite3BtreeIsInReadTrans(pDb->pBt)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 154 times by 1 test |
|| sqlite3BtreeIsInBackup(pDb->pBt)| TRUE | never evaluated | | FALSE | evaluated 154 times by 1 test |
){ | 0-154 |
| 210 | sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName); | - |
| 211 | gotoexecuted 1 time by 1 test: goto detach_error; detach_error;executed 1 time by 1 test: goto detach_error; | 1 |
| 212 | } | - |
| 213 | | - |
| 214 | sqlite3BtreeClose(pDb->pBt); | - |
| 215 | pDb->pBt = 0; | - |
| 216 | pDb->pSchema = 0; | - |
| 217 | sqlite3CollapseDatabaseArray(db); | - |
| 218 | return;executed 154 times by 1 test: return; | 154 |
| 219 | | - |
| 220 | detach_error: | - |
| 221 | sqlite3_result_error(context, zErr, -1); | - |
| 222 | }executed 7 times by 1 test: end of block | 7 |
| 223 | | - |
| 224 | | - |
| 225 | | - |
| 226 | | - |
| 227 | | - |
| 228 | static void codeAttach( | - |
| 229 | Parse *pParse, | - |
| 230 | int type, | - |
| 231 | FuncDef const *pFunc, | - |
| 232 | Expr *pAuthArg, | - |
| 233 | Expr *pFilename, | - |
| 234 | Expr *pDbname, | - |
| 235 | Expr *pKey | - |
| 236 | ){ | - |
| 237 | int rc; | - |
| 238 | NameContext sName; | - |
| 239 | Vdbe *v; | - |
| 240 | sqlite3* db = pParse->db; | - |
| 241 | int regArgs; | - |
| 242 | | - |
| 243 | if( pParse->nErr| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 1812 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
) gotoexecuted 1 time by 1 test: goto attach_end; attach_end;executed 1 time by 1 test: goto attach_end; | 1-1812 |
| 244 | memset(&sName, 0, sizeof(NameContext)); | - |
| 245 | sName.pParse = pParse; | - |
| 246 | | - |
| 247 | if( | - |
| 248 | 0!=(rc = resolveAttachExpr(&sName, pFilename))| TRUE | never evaluated | | FALSE | evaluated 1812 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
|| | 0-1812 |
| 249 | 0!=(rc = resolveAttachExpr(&sName, pDbname))| TRUE | never evaluated | | FALSE | evaluated 1812 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
|| | 0-1812 |
| 250 | 0!=(rc = resolveAttachExpr(&sName, pKey))| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 1810 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
| 2-1810 |
| 251 | ){ | - |
| 252 | gotoexecuted 2 times by 1 test: goto attach_end; attach_end;executed 2 times by 1 test: goto attach_end; | 2 |
| 253 | } | - |
| 254 | | - |
| 255 | | - |
| 256 | if( pAuthArg| TRUE | evaluated 1810 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | never evaluated |
){ | 0-1810 |
| 257 | char *zAuthArg; | - |
| 258 | if( pAuthArg->op==106| TRUE | evaluated 1770 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | evaluated 40 times by 1 test |
){ | 40-1770 |
| 259 | zAuthArg = pAuthArg->u.zToken; | - |
| 260 | }executed 1770 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
else{ | 1770 |
| 261 | zAuthArg = 0; | - |
| 262 | }executed 40 times by 1 test: end of block | 40 |
| 263 | rc = sqlite3AuthCheck(pParse, type, zAuthArg, 0, 0); | - |
| 264 | if(rc!=0| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 1806 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
|
){ | 4-1806 |
| 265 | gotoexecuted 4 times by 1 test: goto attach_end; attach_end;executed 4 times by 1 test: goto attach_end; | 4 |
| 266 | } | - |
| 267 | }executed 1806 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1806 |
| 268 | | - |
| 269 | | - |
| 270 | | - |
| 271 | v = sqlite3GetVdbe(pParse); | - |
| 272 | regArgs = sqlite3GetTempRange(pParse, 4); | - |
| 273 | sqlite3ExprCode(pParse, pFilename, regArgs); | - |
| 274 | sqlite3ExprCode(pParse, pDbname, regArgs+1); | - |
| 275 | sqlite3ExprCode(pParse, pKey, regArgs+2); | - |
| 276 | | - |
| 277 | | - |
| 278 | ((void) (0)) | - |
| 279 | ; | - |
| 280 | if( v| TRUE | evaluated 1806 times by 12 testsEvaluated by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| | FALSE | never evaluated |
){ | 0-1806 |
| 281 | sqlite3VdbeAddOp4(v, 63, 0, regArgs+3-pFunc->nArg, regArgs+3, | - |
| 282 | (char *)pFunc, (-8)); | - |
| 283 | | - |
| 284 | ((void) (0)) | - |
| 285 | ; | - |
| 286 | sqlite3VdbeChangeP5(v, (u8)(pFunc->nArg)); | - |
| 287 | | - |
| 288 | | - |
| 289 | | - |
| 290 | | - |
| 291 | | - |
| 292 | sqlite3VdbeAddOp1(v, 159, (type==24)); | - |
| 293 | }executed 1806 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1806 |
| 294 | | - |
| 295 | attach_end:code before this statement executed 1806 times by 12 tests: attach_end:Executed by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1806 |
| 296 | sqlite3ExprDelete(db, pFilename); | - |
| 297 | sqlite3ExprDelete(db, pDbname); | - |
| 298 | sqlite3ExprDelete(db, pKey); | - |
| 299 | }executed 1813 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1813 |
| 300 | | - |
| 301 | | - |
| 302 | | - |
| 303 | | - |
| 304 | | - |
| 305 | | - |
| 306 | void sqlite3Detach(Parse *pParse, Expr *pDbname){ | - |
| 307 | static const FuncDef detach_func = { | - |
| 308 | 1, | - |
| 309 | 1, | - |
| 310 | 0, | - |
| 311 | 0, | - |
| 312 | detachFunc, | - |
| 313 | 0, | - |
| 314 | 0, 0, | - |
| 315 | "sqlite_detach", | - |
| 316 | {0} | - |
| 317 | }; | - |
| 318 | codeAttach(pParse, 25, &detach_func, pDbname, 0, 0, pDbname); | - |
| 319 | }executed 167 times by 1 test: end of block | 167 |
| 320 | | - |
| 321 | | - |
| 322 | | - |
| 323 | | - |
| 324 | | - |
| 325 | | - |
| 326 | void sqlite3Attach(Parse *pParse, Expr *p, Expr *pDbname, Expr *pKey){ | - |
| 327 | static const FuncDef attach_func = { | - |
| 328 | 3, | - |
| 329 | 1, | - |
| 330 | 0, | - |
| 331 | 0, | - |
| 332 | attachFunc, | - |
| 333 | 0, | - |
| 334 | 0, 0, | - |
| 335 | "sqlite_attach", | - |
| 336 | {0} | - |
| 337 | }; | - |
| 338 | codeAttach(pParse, 24, &attach_func, p, p, pDbname, pKey); | - |
| 339 | }executed 1646 times by 12 tests: end of blockExecuted by:- Self test (27)
- Self test (34)
- Self test (4)
- Self test (438)
- Self test (5)
- Self test (77)
- Self test (78)
- Self test (79)
- Self test (80)
- Self test (81)
- Self test (82)
- Self test (83)
| 1646 |
| 340 | | - |
| 341 | | - |
| 342 | | - |
| 343 | | - |
| 344 | | - |
| 345 | | - |
| 346 | void sqlite3FixInit( | - |
| 347 | DbFixer *pFix, | - |
| 348 | Parse *pParse, | - |
| 349 | int iDb, | - |
| 350 | const char *zType, | - |
| 351 | const Token *pName | - |
| 352 | ){ | - |
| 353 | sqlite3 *db; | - |
| 354 | | - |
| 355 | db = pParse->db; | - |
| 356 | | - |
| 357 | ((void) (0)) | - |
| 358 | ; | - |
| 359 | pFix->pParse = pParse; | - |
| 360 | pFix->zDb = db->aDb[iDb].zDbSName; | - |
| 361 | pFix->pSchema = db->aDb[iDb].pSchema; | - |
| 362 | pFix->zType = zType; | - |
| 363 | pFix->pName = pName; | - |
| 364 | pFix->bVarOnly = (iDb==1); | - |
| 365 | }executed 29911 times by 24 tests: end of blockExecuted by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| 29911 |
| 366 | int sqlite3FixSrcList( | - |
| 367 | DbFixer *pFix, | - |
| 368 | SrcList *pList | - |
| 369 | ){ | - |
| 370 | int i; | - |
| 371 | const char *zDb; | - |
| 372 | struct SrcList_item *pItem; | - |
| 373 | | - |
| 374 | if( (| TRUE | never evaluated | | FALSE | evaluated 33186 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
pList==0)| TRUE | never evaluated | | FALSE | evaluated 33186 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
) returnnever executed: return 0; 0;never executed: return 0; | 0-33186 |
| 375 | zDb = pFix->zDb; | - |
| 376 | for(i=0, pItem=pList->a; i<pList->nSrc| TRUE | evaluated 23763 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| | FALSE | evaluated 33166 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
; i++, pItem++){ | 23763-33166 |
| 377 | if( pFix->bVarOnly==0| TRUE | evaluated 22586 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| | FALSE | evaluated 1177 times by 1 test |
){ | 1177-22586 |
| 378 | if( pItem->zDatabase| TRUE | evaluated 30 times by 1 test | | FALSE | evaluated 22556 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
&& sqlite3StrICmp(pItem->zDatabase, zDb)| TRUE | evaluated 14 times by 1 test | | FALSE | evaluated 16 times by 1 test |
){ | 14-22556 |
| 379 | sqlite3ErrorMsg(pFix->pParse, | - |
| 380 | "%s %T cannot reference objects in database %s", | - |
| 381 | pFix->zType, pFix->pName, pItem->zDatabase); | - |
| 382 | returnexecuted 14 times by 1 test: return 1; 1;executed 14 times by 1 test: return 1; | 14 |
| 383 | } | - |
| 384 | sqlite3DbFree(pFix->pParse->db, pItem->zDatabase); | - |
| 385 | pItem->zDatabase = 0; | - |
| 386 | pItem->pSchema = pFix->pSchema; | - |
| 387 | }executed 22572 times by 24 tests: end of blockExecuted by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| 22572 |
| 388 | | - |
| 389 | if( sqlite3FixSelect(pFix, pItem->pSelect)| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 23745 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
) returnexecuted 4 times by 1 test: return 1; 1;executed 4 times by 1 test: return 1; | 4-23745 |
| 390 | if( sqlite3FixExpr(pFix, pItem->pOn)| TRUE | never evaluated | | FALSE | evaluated 23745 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
) returnnever executed: return 1; 1;never executed: return 1; | 0-23745 |
| 391 | | - |
| 392 | if( pItem->fg.isTabFunc| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 23741 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
&& sqlite3FixExprList(pFix, pItem->u1.pFuncArg)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 2 times by 1 test |
){ | 2-23741 |
| 393 | returnexecuted 2 times by 1 test: return 1; 1;executed 2 times by 1 test: return 1; | 2 |
| 394 | } | - |
| 395 | }executed 23743 times by 24 tests: end of blockExecuted by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| 23743 |
| 396 | returnexecuted 33166 times by 24 tests: return 0;Executed by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
0;executed 33166 times by 24 tests: return 0;Executed by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| 33166 |
| 397 | } | - |
| 398 | | - |
| 399 | int sqlite3FixSelect( | - |
| 400 | DbFixer *pFix, | - |
| 401 | Select *pSelect | - |
| 402 | ){ | - |
| 403 | while( pSelect| TRUE | evaluated 17089 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 39921 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
){ | 17089-39921 |
| 404 | if( sqlite3FixExprList(pFix, pSelect->pEList)| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 17081 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 8-17081 |
| 405 | returnexecuted 8 times by 1 test: return 1; 1;executed 8 times by 1 test: return 1; | 8 |
| 406 | } | - |
| 407 | if( sqlite3FixSrcList(pFix, pSelect->pSrc)| TRUE | evaluated 18 times by 1 test | | FALSE | evaluated 17063 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 18-17063 |
| 408 | returnexecuted 18 times by 1 test: return 1; 1;executed 18 times by 1 test: return 1; | 18 |
| 409 | } | - |
| 410 | if( sqlite3FixExpr(pFix, pSelect->pWhere)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 17062 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 1-17062 |
| 411 | returnexecuted 1 time by 1 test: return 1; 1;executed 1 time by 1 test: return 1; | 1 |
| 412 | } | - |
| 413 | if( sqlite3FixExprList(pFix, pSelect->pGroupBy)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 17060 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 2-17060 |
| 414 | returnexecuted 2 times by 1 test: return 1; 1;executed 2 times by 1 test: return 1; | 2 |
| 415 | } | - |
| 416 | if( sqlite3FixExpr(pFix, pSelect->pHaving)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 17059 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 1-17059 |
| 417 | returnexecuted 1 time by 1 test: return 1; 1;executed 1 time by 1 test: return 1; | 1 |
| 418 | } | - |
| 419 | if( sqlite3FixExprList(pFix, pSelect->pOrderBy)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 17057 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 2-17057 |
| 420 | returnexecuted 2 times by 1 test: return 1; 1;executed 2 times by 1 test: return 1; | 2 |
| 421 | } | - |
| 422 | if( sqlite3FixExpr(pFix, pSelect->pLimit)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 17055 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 2-17055 |
| 423 | returnexecuted 2 times by 1 test: return 1; 1;executed 2 times by 1 test: return 1; | 2 |
| 424 | } | - |
| 425 | if( pSelect->pWith| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 17052 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 3-17052 |
| 426 | int i; | - |
| 427 | for(i=0; i<pSelect->pWith->nCte| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
; i++){ | 0-3 |
| 428 | if( sqlite3FixSelect(pFix, pSelect->pWith->a[i].pSelect)| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
){ | 0-3 |
| 429 | returnexecuted 3 times by 1 test: return 1; 1;executed 3 times by 1 test: return 1; | 3 |
| 430 | } | - |
| 431 | } never executed: end of block | 0 |
| 432 | } never executed: end of block | 0 |
| 433 | pSelect = pSelect->pPrior; | - |
| 434 | }executed 17052 times by 7 tests: end of blockExecuted by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 17052 |
| 435 | returnexecuted 39921 times by 24 tests: return 0;Executed by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
0;executed 39921 times by 24 tests: return 0;Executed by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| 39921 |
| 436 | } | - |
| 437 | int sqlite3FixExpr( | - |
| 438 | DbFixer *pFix, | - |
| 439 | Expr *pExpr | - |
| 440 | ){ | - |
| 441 | while( pExpr| TRUE | evaluated 101518 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 113695 times by 24 testsEvaluated by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
|
){ | 101518-113695 |
| 442 | if( pExpr->op==144| TRUE | evaluated 23 times by 1 test | | FALSE | evaluated 101495 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 23-101495 |
| 443 | if( pFix->pParse->db->init.busy| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 19 times by 1 test |
){ | 4-19 |
| 444 | pExpr->op = 110; | - |
| 445 | }executed 4 times by 1 test: end of block else{ | 4 |
| 446 | sqlite3ErrorMsg(pFix->pParse, "%s cannot use variables", pFix->zType); | - |
| 447 | returnexecuted 19 times by 1 test: return 1; 1;executed 19 times by 1 test: return 1; | 19 |
| 448 | } | - |
| 449 | } | - |
| 450 | if( (((| TRUE | evaluated 61625 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 39874 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
pExpr)->flags&(0x004000|0x800000))!=0)| TRUE | evaluated 61625 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 39874 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
) break;executed 61625 times by 7 tests: break;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 39874-61625 |
| 451 | if( (((| TRUE | evaluated 864 times by 1 test | | FALSE | evaluated 39010 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
pExpr)->flags&(0x000800))!=0)| TRUE | evaluated 864 times by 1 test | | FALSE | evaluated 39010 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 864-39010 |
| 452 | if( sqlite3FixSelect(pFix, pExpr->x.pSelect)| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 858 times by 1 test |
) returnexecuted 6 times by 1 test: return 1; 1;executed 6 times by 1 test: return 1; | 6-858 |
| 453 | }executed 858 times by 1 test: end of block else{ | 858 |
| 454 | if( sqlite3FixExprList(pFix, pExpr->x.pList)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 39009 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
) returnexecuted 1 time by 1 test: return 1; 1;executed 1 time by 1 test: return 1; | 1-39009 |
| 455 | }executed 39009 times by 7 tests: end of blockExecuted by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 39009 |
| 456 | if( sqlite3FixExpr(pFix, pExpr->pRight)| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 39859 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 8-39859 |
| 457 | returnexecuted 8 times by 1 test: return 1; 1;executed 8 times by 1 test: return 1; | 8 |
| 458 | } | - |
| 459 | pExpr = pExpr->pLeft; | - |
| 460 | }executed 39859 times by 7 tests: end of blockExecuted by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 39859 |
| 461 | returnexecuted 175320 times by 24 tests: return 0;Executed by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
0;executed 175320 times by 24 tests: return 0;Executed by:- Self test
- Self test (2)
- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (3)
- Self test (35)
- Self test (36)
- Self test (42)
- Self test (43)
- Self test (438)
- Self test (44)
- Self test (45)
- Self test (46)
- Self test (47)
- Self test (53)
- Self test (57)
- Self test (58)
- Self test (74)
- Self test (86)
- Self test (87)
- Self test (88)
| 175320 |
| 462 | } | - |
| 463 | int sqlite3FixExprList( | - |
| 464 | DbFixer *pFix, | - |
| 465 | ExprList *pList | - |
| 466 | ){ | - |
| 467 | int i; | - |
| 468 | struct ExprList_item *pItem; | - |
| 469 | if( pList==0| TRUE | evaluated 79932 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 21291 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
) returnexecuted 79932 times by 7 tests: return 0;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
0;executed 79932 times by 7 tests: return 0;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 21291-79932 |
| 470 | for(i=0, pItem=pList->a; i<pList->nExpr| TRUE | evaluated 40183 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 21274 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
; i++, pItem++){ | 21274-40183 |
| 471 | if( sqlite3FixExpr(pFix, pItem->pExpr)| TRUE | evaluated 17 times by 1 test | | FALSE | evaluated 40166 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 17-40166 |
| 472 | returnexecuted 17 times by 1 test: return 1; 1;executed 17 times by 1 test: return 1; | 17 |
| 473 | } | - |
| 474 | }executed 40166 times by 7 tests: end of blockExecuted by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 40166 |
| 475 | returnexecuted 21274 times by 7 tests: return 0;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
0;executed 21274 times by 7 tests: return 0;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 21274 |
| 476 | } | - |
| 477 | | - |
| 478 | | - |
| 479 | | - |
| 480 | int sqlite3FixTriggerStep( | - |
| 481 | DbFixer *pFix, | - |
| 482 | TriggerStep *pStep | - |
| 483 | ){ | - |
| 484 | while( pStep| TRUE | evaluated 10939 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| | FALSE | evaluated 9377 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 9377-10939 |
| 485 | if( sqlite3FixSelect(pFix, pStep->pSelect)| TRUE | evaluated 21 times by 1 test | | FALSE | evaluated 10918 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 21-10918 |
| 486 | returnexecuted 21 times by 1 test: return 1; 1;executed 21 times by 1 test: return 1; | 21 |
| 487 | } | - |
| 488 | if( sqlite3FixExpr(pFix, pStep->pWhere)| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 10915 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 3-10915 |
| 489 | returnexecuted 3 times by 1 test: return 1; 1;executed 3 times by 1 test: return 1; | 3 |
| 490 | } | - |
| 491 | if( sqlite3FixExprList(pFix, pStep->pExprList)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 10913 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 2-10913 |
| 492 | returnexecuted 2 times by 1 test: return 1; 1;executed 2 times by 1 test: return 1; | 2 |
| 493 | } | - |
| 494 | | - |
| 495 | if( pStep->pUpsert| TRUE | evaluated 42 times by 1 test | | FALSE | evaluated 10871 times by 7 testsEvaluated by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
|
){ | 42-10871 |
| 496 | Upsert *pUp = pStep->pUpsert; | - |
| 497 | if( sqlite3FixExprList(pFix, pUp->pUpsertTarget)| TRUE | never evaluated | | FALSE | evaluated 42 times by 1 test |
| 0-42 |
| 498 | || sqlite3FixExpr(pFix, pUp->pUpsertTargetWhere)| TRUE | never evaluated | | FALSE | evaluated 42 times by 1 test |
| 0-42 |
| 499 | || sqlite3FixExprList(pFix, pUp->pUpsertSet)| TRUE | never evaluated | | FALSE | evaluated 42 times by 1 test |
| 0-42 |
| 500 | || sqlite3FixExpr(pFix, pUp->pUpsertWhere)| TRUE | never evaluated | | FALSE | evaluated 42 times by 1 test |
| 0-42 |
| 501 | ){ | - |
| 502 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 503 | } | - |
| 504 | }executed 42 times by 1 test: end of block | 42 |
| 505 | | - |
| 506 | pStep = pStep->pNext; | - |
| 507 | }executed 10913 times by 7 tests: end of blockExecuted by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 10913 |
| 508 | returnexecuted 9377 times by 7 tests: return 0;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
0;executed 9377 times by 7 tests: return 0;Executed by:- Self test (24)
- Self test (26)
- Self test (27)
- Self test (28)
- Self test (29)
- Self test (438)
- Self test (47)
| 9377 |
| 509 | } | - |
| | |