-
Notifications
You must be signed in to change notification settings - Fork 89
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
Handle integer overflows for sequence numbers #295
Comments
I wonder if using |
Currently, the three calls to However, whether we use that number as a docid or for AUTOINCREMENT, we are limited by the maximum size of Genji's The reason is that the -- this evaluates to an INTEGER unless the result
-- overflows, in which case it will evaluate to a DOUBLE
SELECT pk() + 1; We need to distinguish three things: The limit of NextSequence
docid overflowA INTEGER overflowGenji's INTEGER is a 64 bit signed integer. Expressions using integers will evaluate to a double if the result overflows Proposal
Regarding |
We should do something about integer overflows for values retuned by engine
NextSequence
method. E.g. SQLite claims to randomly choose available sequence number on overflow (I’d prefer deterministic solution, although I’m not sure to what extent SQLite implementation is random) unless primary key isAUTOINCREMENT
.See
The text was updated successfully, but these errors were encountered: