SQLite

Check-in [6c68d758bc]
Login

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

Overview
Comment:Simplify the estLog() routine.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6c68d758bce3752f044752404a76bf3ba3eec48f
User & Date: drh 2014-06-12 15:46:46.043
Context
2014-06-12
17:10
Increase the WAL-mode SQLITE_PROTOCOL timeout to 10 seconds. (check-in: 2aeacf81df user: drh tags: trunk)
15:46
Simplify the estLog() routine. (check-in: 6c68d758bc user: drh tags: trunk)
2014-06-09
20:39
Avoid an unnecessary initialization of the szFile field of unixFile in the unix VFS. (check-in: 6484fb5a25 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/where.c.
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
}


/*
** Estimate the logarithm of the input value to base 2.
*/
static LogEst estLog(LogEst N){
  LogEst x = N<0 ? 1 : sqlite3LogEst(N);
  return x>33 ? x - 33 : 0;
}

/*
** Two routines for printing the content of an sqlite3_index_info
** structure.  Used for testing and debugging only.  If neither
** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines
** are no-ops.







|
<







1490
1491
1492
1493
1494
1495
1496
1497

1498
1499
1500
1501
1502
1503
1504
}


/*
** Estimate the logarithm of the input value to base 2.
*/
static LogEst estLog(LogEst N){
  return N<=10 ? 0 : sqlite3LogEst(N) - 33;

}

/*
** Two routines for printing the content of an sqlite3_index_info
** structure.  Used for testing and debugging only.  If neither
** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines
** are no-ops.