Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-10 Thread Ryan Johnson
On 09/10/2013 9:53 PM, Richard Hipp wrote: On Wed, Oct 9, 2013 at 9:49 PM, James K. Lowden wrote: It's difficult to do portably because you have to account for every combination of standard C library and integer size Remember that SQLite does not use the

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-10 Thread Ralf Junker
On 10.10.2013 03:53, Richard Hipp wrote: I think that http://www.sqlite.org/src/info/e97d7d3044 fixes this issue. Works well for me. Please correct me if I've missed something. You committed to the "row-size-est" branch. I guess this will be merged into "trunk" for 3.8.1? Ralf

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Richard Hipp
On Wed, Oct 9, 2013 at 9:49 PM, James K. Lowden wrote: > > It's difficult to do portably because you have to account for every > combination of standard C library and integer size > Remember that SQLite does not use the standard library printf() function. It has its

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread James K. Lowden
On Wed, 09 Oct 2013 10:20:13 -0400 Ryan Johnson wrote: > > This is more portable: > > > > #ifdef SQLITE_64BIT_STATS > > sqlite3_snprintf(24, zRet, "%lld", p->nRow); > > #else > > sqlite3_snprintf(24, zRet, "%d", p->nRow); > > #endif > Actually,

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Ryan Johnson
On 09/10/2013 10:07 AM, Ralf Junker wrote: On 09.10.2013 15:50, Eric Minbiole wrote: With this change, tests pass again: #if sizeof(p->nRow) == sizeof(long long) sqlite3_snprintf(24, zRet, "%lld", p->nRow); #elseif sizeof(p->Row) = sizeof(long) sqlite3_snprintf(24, zRet,

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Ralf Junker
On 09.10.2013 15:50, Eric Minbiole wrote: With this change, tests pass again: #if sizeof(p->nRow) == sizeof(long long) sqlite3_snprintf(24, zRet, "%lld", p->nRow); #elseif sizeof(p->Row) = sizeof(long) sqlite3_snprintf(24, zRet, "%ld", p->nRow); #else

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Igor Tandetnik
On 10/9/2013 9:50 AM, Eric Minbiole wrote: With this change, tests pass again: #if sizeof(p->nRow) == sizeof(long long) sqlite3_snprintf(24, zRet, "%lld", p->nRow); #elseif sizeof(p->Row) = sizeof(long) sqlite3_snprintf(24, zRet, "%ld", p->nRow); #else

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Eric Minbiole
> With this change, tests pass again: > > #if sizeof(p->nRow) == sizeof(long long) > sqlite3_snprintf(24, zRet, "%lld", p->nRow); > #elseif sizeof(p->Row) = sizeof(long) > sqlite3_snprintf(24, zRet, "%ld", p->nRow); > #else > sqlite3_snprintf(24, zRet, "%d", p->nRow); >