-
Notifications
You must be signed in to change notification settings - Fork 388
Fail to decode interval with value bigger than int32 #8887
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
Comments
DifferentialOrange
added a commit
to DifferentialOrange/tarantool
that referenced
this issue
Jul 17, 2023
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 tarantool#8887 NO_DOC=small bug fix
DifferentialOrange
added a commit
to DifferentialOrange/tarantool
that referenced
this issue
Jul 17, 2023
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
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Jul 17, 2023
Before this patch, any value was allowed for interval attributes. Now we use the same rules as in Tarantool. A couple of issues were met while developing this patch, follow [1, 2] for core updates. 1. tarantool/tarantool#8878 2. tarantool/tarantool#8887
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Jul 18, 2023
Before this patch, any value was allowed for interval attributes. Now we use the same rules as in Tarantool. A couple of issues were met while developing this patch, follow [1, 2] for core updates. 1. tarantool/tarantool#8878 2. tarantool/tarantool#8887
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Jul 18, 2023
Before this patch, any value was allowed for interval attributes. Now we use the same rules as in Tarantool. A couple of issues were met while developing this patch, follow [1, 2] for core updates. 1. tarantool/tarantool#8878 2. tarantool/tarantool#8887
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Jul 18, 2023
Before this patch, any value was allowed for interval attributes. Now we use the same rules as in Tarantool. A couple of issues were met while developing this patch, follow [1, 2] for core updates. 1. tarantool/tarantool#8878 2. tarantool/tarantool#8887
DifferentialOrange
added a commit
to DifferentialOrange/tarantool
that referenced
this issue
Jul 21, 2023
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
pushed a commit
that referenced
this issue
Jul 24, 2023
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 #8887 NO_DOC=small bug fix
igormunkin
pushed a commit
that referenced
this issue
Jul 24, 2023
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 #8887 NO_DOC=small bug fix (cherry picked from commit 01c7ae1)
igormunkin
pushed a commit
that referenced
this issue
Jul 24, 2023
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 #8887 NO_DOC=small bug fix (cherry picked from commit 01c7ae1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is allowed to create intervals with values bigger than int32 for minutes and seconds.
tarantool/src/lua/datetime.lua
Lines 144 to 145 in ff57f99
Since
double
s are used to store values, interval itself can process such big values.tarantool/src/lib/core/datetime.h
Lines 109 to 128 in 054526a
Msgpack encoding also succeeds:
Yet msgpack decoding fails:
The reason is that int32 is used to extract the value
tarantool/src/lib/core/mp_interval.c
Line 130 in 054526a
while allowed values are not really restricted to int32. (For example, msgpack above has uint64 value for minutes.)
The text was updated successfully, but these errors were encountered: