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

msgpack: fix decoding intervals with int64 #8888

Merged

Conversation

DifferentialOrange
Copy link
Contributor

It is possible for interval to have days, hours, minutes and seconds bigger than INT_MAX (or less than INT_MIN). Before this patch, msgpack decoding had failed to parse intervals with msgpack int64 and uint64. int64_t should be enough to store any value allowed for datetime intervals.

Closes #8887

NO_DOC=small bug fix

@DifferentialOrange DifferentialOrange marked this pull request as ready for review July 17, 2023 08:40
@DifferentialOrange DifferentialOrange requested a review from a team as a code owner July 17, 2023 08:40
@DifferentialOrange DifferentialOrange added the full-ci Enables all tests for a pull request label Jul 17, 2023
@coveralls
Copy link

coveralls commented Jul 17, 2023

Coverage Status

coverage: 86.081% (-0.01%) from 86.093% when pulling ef4a95e on DifferentialOrange:gh-8887-fix-interval-int64 into e78afb3
on tarantool:master
.

Copy link
Member

@ligurio ligurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch, Georgy! See my minor comments related to testing.

test/unit/interval.c Outdated Show resolved Hide resolved
test/unit/interval.c Outdated Show resolved Hide resolved
It is possible for interval to have days, hours, minutes and seconds
larger than INT_MAX (or less than INT_MIN). Before this patch, msgpack
decoding had failed to parse intervals with msgpack int64 and uint64.
int64_t should be enough to store any value allowed for datetime
intervals.

Closes tarantool#8887

NO_DOC=small bug fix
@igormunkin igormunkin merged commit 01c7ae1 into tarantool:master Jul 24, 2023
50 checks passed
@igormunkin
Copy link
Collaborator

Also backported to 2.11 and 2.10 in scope of f98b977 and 26acd38 respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables all tests for a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to decode interval with value bigger than int32
6 participants