-
Notifications
You must be signed in to change notification settings - Fork 484
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
row::get<int64_t>()
overflows 32bit integer in internal representation (SQLite)
#1190
Comments
Duplicate of #1185. |
I quote from the beginning of my post:
I know, but that's a workaround for this specific bug in SOCI. The correct thing for SOCI to do would be to always use |
The fix would be more or less trivial: change the respective mappings in soci/src/backends/sqlite3/statement.cpp Lines 470 to 491 in c5678e1
However, the issue will be that this would break backwards compatibility (in the worst possible way as old code that used to work would now get a It even gets wilder - again from the docs:
So I guess the SQLite type-issue is just fundamentally unsolvable. However, in order to not have silent overflows in the backend wreck havoc on expected results, I would propose always fetching into a @vadz what's your opinion on this? |
This is a continuation of #1185. The MWE remains the same:
On current
master
this compiles fine, but theget
function of therow
object will return-1
(on Linux), which seems to suggest that internally SOCI is using a 32bit integer representation. However, this seems wrong as clearly SQLite can support 64bit integer values forINTEGER
columns.This is likely related to SQLite not really supporting data types. The docs describe the
INTEGER
type asThe text was updated successfully, but these errors were encountered: