
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
-
John W Higgins May 20th, 2008 @ 09:56 PM
Fixed with the following commits
-
-
Alex Coles May 21st, 2008 @ 04:03 AM
This ticket should be re-opened.
The dm-more/dm-aggregates specs are still failing for me when running SQLite3. I believe this issue is to do with something in the bowels of DO. don't see how this issue was resolved in the DO codebase, as commit c45304 doesn't appear to do anything with the SQLite3 driver?
@John which version of SQLite3 are you using? I am on 3.5.4. Perhaps, the specs are passing with a different version of SQLite3?
-
Dan Kubb (dkubb) May 21st, 2008 @ 04:05 AM
- State changed from resolved to open
Reverted commit commenting out/deleting pending() method in failing specs:
-
-
John W Higgins May 21st, 2008 @ 06:30 AM
I screwed up the branch I was working on so the commit for do_sqlite3 didn't make it up this is the correct commit
http://github.com/sam/do/commit/...
This has been verified as working
My apologies
-
Sindre Aarsaether May 21st, 2008 @ 06:34 AM
- State changed from open to resolved
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »