#284 ✓resolved
Dan Kubb (dkubb)

do_sqlite3 large numbers cause integer overflow

Reported by Dan Kubb (dkubb) | May 14th, 2008 @ 04:27 PM

I'm not sure if this is a problem with SQLite3 or the do_sqlite3 drivers, but I thought I'd bring it to everyone's attention.

In the dm-more/dm-aggregates specs we insert some rather large numbers and then perform aggregate functions (count, min, max, avg, sum) and compare the results against values we computed by hand. Here is the spec we run:

http://github.com/sam/dm-more/tr...

When the specs are run with do_postgres and do_mysql the results match up perfectly, but when run with do_sqlite3 we get wildly different results. The numbers aren't anywhere near what was expected, and in some cases they are negative, leading me to believe there's an integer overflow happening somewhere.

To run these specs with different adapters, set the ADAPTER environment variable to sqlite3, postgres or mysql, like so:

ADAPTER=sqlite3 rake spec

ADAPTER=postgres rake spec

ADAPTER=mysql rake spec

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Pages