/ Check-in [9d96f614]
Login

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

Overview
Comment:Remove an unreachable branch from sqlite3ExprAffinity()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rowvalue
Files: files | file ages | folders
SHA1: 9d96f61481704e5ec399ee425f0ebb246902ecc5
User & Date: drh 2016-08-26 01:02:09
Context
2016-08-26
03:42
Comment improvements. Put ALWAYS and NEVER macros on three unreachable branches. check-in: 39761700 user: drh tags: rowvalue
01:02
Remove an unreachable branch from sqlite3ExprAffinity() check-in: 9d96f614 user: drh tags: rowvalue
2016-08-25
22:31
Merge recent changes from trunk. check-in: 5789aab8 user: drh tags: rowvalue
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/expr.c.

47
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
  if( op==TK_REGISTER ) op = pExpr->op2;
#ifndef SQLITE_OMIT_CAST
  if( op==TK_CAST ){
    assert( !ExprHasProperty(pExpr, EP_IntValue) );
    return sqlite3AffinityType(pExpr->u.zToken, 0);
  }
#endif
  if( (op==TK_AGG_COLUMN || op==TK_COLUMN) && pExpr->pTab!=0 ){
    int j = pExpr->iColumn;

    if( j<0 ) return SQLITE_AFF_INTEGER;
    assert( pExpr->pTab && j<pExpr->pTab->nCol );
    return pExpr->pTab->aCol[j].affinity;
  }
  return pExpr->affinity;
}








|

>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  if( op==TK_REGISTER ) op = pExpr->op2;
#ifndef SQLITE_OMIT_CAST
  if( op==TK_CAST ){
    assert( !ExprHasProperty(pExpr, EP_IntValue) );
    return sqlite3AffinityType(pExpr->u.zToken, 0);
  }
#endif
  if( op==TK_AGG_COLUMN || op==TK_COLUMN ){
    int j = pExpr->iColumn;
    assert( pExpr->pTab!=0 );
    if( j<0 ) return SQLITE_AFF_INTEGER;
    assert( pExpr->pTab && j<pExpr->pTab->nCol );
    return pExpr->pTab->aCol[j].affinity;
  }
  return pExpr->affinity;
}