/ Check-in [7d99858b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change some unreachable test conditions to NEVER().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7d99858bec699dface548c77649dfc50e7fb50d8
User & Date: drh 2013-12-03 02:52:11
Context
2013-12-03
09:49
Add a "database_may_be_corrupt" directive to test file fuzz3.test. Reformat an assert() statement in vdbeaux.c to make its intent clearer. check-in: 9d8a0e13 user: dan tags: trunk
02:52
Change some unreachable test conditions to NEVER(). check-in: 7d99858b user: drh tags: trunk
00:11
Fix a harmless compiler warning on MacOS. check-in: 74328de1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbemem.c.

  1074   1074     int rc = SQLITE_OK;
  1075   1075   
  1076   1076     if( !pExpr ){
  1077   1077       *ppVal = 0;
  1078   1078       return SQLITE_OK;
  1079   1079     }
  1080   1080     op = pExpr->op;
  1081         -
  1082         -  /* op can only be TK_REGISTER if we have compiled with SQLITE_ENABLE_STAT4.
  1083         -  ** The ifdef here is to enable us to achieve 100% branch test coverage even
  1084         -  ** when SQLITE_ENABLE_STAT4 is omitted.
  1085         -  */
  1086         -#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
  1087         -  if( op==TK_REGISTER ) op = pExpr->op2;
  1088         -#else
  1089   1081     if( NEVER(op==TK_REGISTER) ) op = pExpr->op2;
  1090         -#endif
  1091   1082   
  1092   1083     /* Handle negative integers in a single step.  This is needed in the
  1093   1084     ** case when the value is -9223372036854775808.
  1094   1085     */
  1095   1086     if( op==TK_UMINUS
  1096   1087      && (pExpr->pLeft->op==TK_INTEGER || pExpr->pLeft->op==TK_FLOAT) ){
  1097   1088       pExpr = pExpr->pLeft;
................................................................................
  1305   1296     if( !pExpr ){
  1306   1297       pVal = valueNew(db, &alloc);
  1307   1298       if( pVal ){
  1308   1299         sqlite3VdbeMemSetNull((Mem*)pVal);
  1309   1300         *pbOk = 1;
  1310   1301       }
  1311   1302     }else if( pExpr->op==TK_VARIABLE
  1312         -        || (pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
         1303  +        || NEVER(pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
  1313   1304     ){
  1314   1305       Vdbe *v;
  1315   1306       int iBindVar = pExpr->iColumn;
  1316   1307       sqlite3VdbeSetVarmask(pParse->pVdbe, iBindVar);
  1317   1308       if( (v = pParse->pReprepare)!=0 ){
  1318   1309         pVal = valueNew(db, &alloc);
  1319   1310         if( pVal ){