diff options
author | drh <drh@noemail.net> | 2014-01-18 15:22:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-01-18 15:22:53 +0000 |
commit | 75303a2c683fff538603e9f8a69263d2db4c0c5f (patch) | |
tree | 885037151fb27b44c0edd4c4a57bab02ac1e27a1 /src | |
parent | ebbf08a012317c757808ae48e85ffd93a0a9953c (diff) | |
download | sqlite-75303a2c683fff538603e9f8a69263d2db4c0c5f.tar.gz sqlite-75303a2c683fff538603e9f8a69263d2db4c0c5f.zip |
Add asserts() for a couple of unreachable conditions. Add the Mandelbrot Set
query as a test case.
FossilOrigin-Name: 2ad4583c0cc7988f0dfe78fd0a2eb0fdb92d835a
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 2 | ||||
-rw-r--r-- | src/vdbe.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c index 0614be1cf..5f11dec42 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1584,7 +1584,7 @@ int sqlite3FindInIndex(Parse *pParse, Expr *pX, int *prNotFound){ iCol = (i16)pExpr->iColumn; /* Code an OP_VerifyCookie and OP_TableLock for <table>. */ - if( pTab->pSchema ){ + if( ALWAYS(pTab->pSchema) ){ iDb = sqlite3SchemaToIndex(db, pTab->pSchema); sqlite3CodeVerifySchema(pParse, iDb); sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName); diff --git a/src/vdbe.c b/src/vdbe.c index 9af4a62d7..86aae3c65 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -3390,7 +3390,8 @@ case OP_SwapCursors: { p->apCsr[pOp->p1] = p->apCsr[pOp->p2]; p->apCsr[pOp->p2] = pTmp; - rc = sqlite3BtreeClearTable(pTmp->pBt, MASTER_ROOT + !pTmp->isTable, 0); + assert( pTmp->isTable ); + rc = sqlite3BtreeClearTable(pTmp->pBt, MASTER_ROOT, 0); break; } #endif /* ifndef SQLITE_OMIT_CTE */ |