Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use #ifdefs to remove code that is unreachable in some configurations, replacing it with an assert(). |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
f96ec84d605fd73c323344a753acf35b |
User & Date: | drh 2016-03-10 14:28:24.490 |
Context
2016-03-10
| ||
15:12 | Add tests to cover untested branches in recent fts5 changes. (check-in: fa0033edf6 user: dan tags: trunk) | |
14:28 | Use #ifdefs to remove code that is unreachable in some configurations, replacing it with an assert(). (check-in: f96ec84d60 user: drh tags: trunk) | |
14:22 | Remove an unused local variable. (check-in: 3c343c3d01 user: drh tags: trunk) | |
Changes
Changes to src/util.c.
︙ | ︙ | |||
1420 1421 1422 1423 1424 1425 1426 | u64 sqlite3LogEstToInt(LogEst x){ u64 n; if( x<10 ) return 1; n = x%10; x /= 10; if( n>=5 ) n -= 2; else if( n>=1 ) n -= 1; | | > | < > > > > > | | 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 | u64 sqlite3LogEstToInt(LogEst x){ u64 n; if( x<10 ) return 1; n = x%10; x /= 10; if( n>=5 ) n -= 2; else if( n>=1 ) n -= 1; #if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || \ defined(SQLITE_EXPLAIN_ESTIMATED_ROWS) if( x>60 ) return (u64)LARGEST_INT64; #else /* If only SQLITE_ENABLE_STAT3_OR_STAT4 is on, then the largest input ** possible to this routine is 310, resulting in a maximum x of 31 */ assert( x<=60 ); #endif return x>=3 ? (n+8)<<(x-3) : (n+8)>>(3-x); } #endif /* defined SCANSTAT or STAT4 or ESTIMATED_ROWS */ |