-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integer overflow #37
Comments
I check my sqlite version with 'select sqlite_version()' |
Did you try to debug the Android module and see what comes out of the db call? |
I'm sorry but I dont know which android method to start debug with. |
I think it could be the problem as the result comes out as a java int type. It's only 4 bytes. |
You can start here: |
Did you try both pure java and native Android implementations ? |
Yes, both android and android-native implementation I tried have this problem |
Android impl always fetches values for colums of INT type as long.... |
i found something...maybe it will fix the issue...i should be able to commit it soon.. |
Can you check the pure Java implementation? I adjusted some conversions...pull latest from this repo. |
I've tried it. It fixed the problem. Really Awesome! |
Great. I also updated native impl now. |
Just one more question, should I use native impl in production environment or both impl will be ok? |
both fully working. Your choice. |
Fixed in 2.1.5 |
Problem reappeared on Android devices in v3.3.5, though v3.3.4 is working fine. |
yes, i spotted the issue. I will fix it and release 3.3.6 tomorrow - thanks for reporting.. |
fixed and released - please check it. |
The sqlite integer value should stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value.
But on android, I tried two of my android phones
create table bbb (b integer)
insert into bbb(b) values (1458743338878) // time millisecond
select * from bbb
It turns out b = -1545541762
I change the type integer to int int8 bigint and it is always the same result. unless I use real.
I'm not sure the problem related to this driver. But on ios it has no problem.
The text was updated successfully, but these errors were encountered: