]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove unreachable branches.
authordrh <drh@noemail.net>
Tue, 1 Sep 2015 00:42:52 +0000 (00:42 +0000)
committerdrh <drh@noemail.net>
Tue, 1 Sep 2015 00:42:52 +0000 (00:42 +0000)
FossilOrigin-Name: fd4da2318cc032d7c355376e440d4a05d7ab8793

manifest
manifest.uuid
src/build.c
src/where.c

index ab89121f74c67cfda603c56dc4e8e97b9ca79542..a1b5d3fc232d9bc89737b77bfae472cf52eb3086 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sbug\sin\serror\sreporting\swhen\sa\sUNIQUE\sindex\son\sexpressions\sfails\sits\nuniqueness\stest.
-D 2015-08-31T23:09:42.268
+C Remove\sunreachable\sbranches.
+D 2015-09-01T00:42:52.453
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -282,7 +282,7 @@ F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
 F src/btree.c f48b3ef91676c06a90a8832987ecef6b94c931ee
 F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1
 F src/btreeInt.h 8177c9ab90d772d6d2c6c517e05bed774b7c92c0
-F src/build.c f85ede9d6dbf833f8f8d43bd78619c2a112ab161
+F src/build.c c6926497c50c8005c75d4ca476b254978d195a0d
 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0
 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f
 F src/ctime.c 5a0b735dc95604766f5dac73973658eef782ee8b
@@ -414,7 +414,7 @@ F src/vxworks.h c18586c8edc1bddbc15c004fa16aeb1e1342b4fb
 F src/wal.c 8cd07f1f99e1a81346db1c9da879bef6c6f97cf6
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c 2e14d17f592d176b6dc879c33fbdec4fbccaa2ba
-F src/where.c 04e0f87e4d82a85c283176958465bed6ea5434e0
+F src/where.c 567b96aa00e7a13ae379a48e10c2911087159e7d
 F src/whereInt.h 292d3ac90da4eab1e03ac8452f1add746bcafaa1
 F src/wherecode.c b0bf45ca49e62fde68ba2e2ad2939d9cdeb4e409
 F src/whereexpr.c 2473e4350e30f9b55d1c6a8f66ca23c689f23f1d
@@ -1381,7 +1381,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 487131303980f15dd5e1b6695b4f29efda229eb8
-R 9ef09a7ae54b897d1ff4fd4dfc1065a6
+P 5a2c0e90a1933545b4768d91d8f7c42c8f391019
+R 43c7fa01f20234523219b9eb18641ef8
 U drh
-Z 8fa9de950d104f084061f9372f8e6439
+Z e43aaed9b864f00cd6aff5655ab5ae6d
index 145029b629232c7ee2bdc976a1f69e8009ce421f..8be0526e030120e966d1fe9e228e2e0c8ad91039 100644 (file)
@@ -1 +1 @@
-5a2c0e90a1933545b4768d91d8f7c42c8f391019
\ No newline at end of file
+fd4da2318cc032d7c355376e440d4a05d7ab8793
\ No newline at end of file
index 0d5aa34fd13ab72c05c24d5c29dfbf4be86d62b7..e05b17b68e600694408d953f5fd505d2a52c39cf 100644 (file)
@@ -1310,7 +1310,8 @@ void sqlite3AddPrimaryKey(
     nTerm = pList->nExpr;
     for(i=0; i<nTerm; i++){
       Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[i].pExpr);
-      if( pCExpr && pCExpr->op==TK_ID ){
+      assert( pCExpr!=0 );
+      if( pCExpr->op==TK_ID ){
         const char *zCName = pCExpr->u.zToken;
         for(iCol=0; iCol<pTab->nCol; iCol++){
           if( sqlite3StrICmp(zCName, pTab->aCol[iCol].zName)==0 ){
@@ -3061,7 +3062,8 @@ Index *sqlite3CreateIndex(
   */
   for(i=0; i<pList->nExpr; i++){
     Expr *pExpr = pList->a[i].pExpr;
-    if( pExpr && pExpr->op==TK_COLLATE ){
+    assert( pExpr!=0 );
+    if( pExpr->op==TK_COLLATE ){
       nExtra += (1 + sqlite3Strlen30(pExpr->u.zToken));
     }
   }
@@ -3258,6 +3260,7 @@ Index *sqlite3CreateIndex(
   /* Link the new Index structure to its table and to the other
   ** in-memory database structures. 
   */
+  assert( pParse->nErr==0 );
   if( db->init.busy ){
     Index *p;
     assert( sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );
@@ -3287,7 +3290,7 @@ Index *sqlite3CreateIndex(
   ** has just been created, it contains no data and the index initialization
   ** step can be skipped.
   */
-  else if( pParse->nErr==0 && (HasRowid(pTab) || pTblName!=0) ){
+  else if( HasRowid(pTab) || pTblName!=0 ){
     Vdbe *v;
     char *zStmt;
     int iMem = ++pParse->nMem;
index 6dc326be0d4a611017877a75e764fc22205fb814..68abfdfe1c859fee4fa2c4a4880403dc7bb14b95 100644 (file)
@@ -180,7 +180,7 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
   while( pScan->iEquiv<=pScan->nEquiv ){
     iCur = pScan->aiCur[pScan->iEquiv-1];
     iColumn = pScan->aiColumn[pScan->iEquiv-1];
-    if( iColumn==(-2) && pScan->pIdxExpr==0 ) return 0;
+    assert( iColumn!=(-2) || pScan->pIdxExpr!=0 );
     while( (pWC = pScan->pWC)!=0 ){
       for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
         if( pTerm->leftCursor==iCur
@@ -396,6 +396,7 @@ static int indexColumnNotNull(Index *pIdx, int iCol){
   }else{
     assert( j==(-2) );
     return 0;  /* Assume an indexed expression can always yield a NULL */
+
   }
 }
 
@@ -803,7 +804,7 @@ static sqlite3_index_info *allocateIndexInfo(
     testcase( pTerm->eOperator & WO_ALL );
     if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
     if( pTerm->wtFlags & TERM_VNULL ) continue;
-    if( pTerm->u.leftColumn<(-1) ) continue;
+    assert( pTerm->u.leftColumn>=(-1) );
     nTerm++;
   }
 
@@ -859,7 +860,7 @@ static sqlite3_index_info *allocateIndexInfo(
     testcase( pTerm->eOperator & WO_ALL );
     if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
     if( pTerm->wtFlags & TERM_VNULL ) continue;
-    if( pTerm->u.leftColumn<(-1) ) continue;
+    assert( pTerm->u.leftColumn>=(-1) );
     pIdxCons[j].iColumn = pTerm->u.leftColumn;
     pIdxCons[j].iTermOffset = i;
     op = (u8)pTerm->eOperator & WO_ALL;