Skip to content
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

Regression: Wrong boundary for minimum value for BIGINT/DECIMAL(18) [CORE4258] #4582

Closed
firebird-automations opened this issue Nov 9, 2013 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

A test in Jaybird creates a table with a DECIMAL(18) field and inserts the maximum and minimum values into this table (and retrieves this).

The minimum value for a BIGINT / DECIMAL(18) should be -2^63 (or 0x8000000000000000 or -9223372036854775808), but when inserting this Firebird 3 throws error 335544779. Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.

Add 1 to the value and it works, so it looks like it is a boundary issue (it seems to use -1 * maximum value (2^63 - 1) as the boundary). The problem also occurs with a BIGINT.

This works correctly in Firebird 2.5 and in Firebird 3 Alpha 1 (build 305666)

Commits: 08e6588 FirebirdSQL/fbt-repository@ebd47be

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

summary: Wrong boundary for minimum value for BIGINT/DECIMAL(18) => Regression: Wrong boundary for minimum value for BIGINT/DECIMAL(18)

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 2 [ 10560 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants