[tarantool-patches] Re: [PATCH 4/4] sql: raise integer overflow error during msgpack decode

n.pettik korablev at tarantool.org
Wed Feb 20 21:39:38 MSK 2019



> On 20 Feb 2019, at 21:25, Konstantin Osipov <kostja at tarantool.org> wrote:
> 
> * Nikita Pettik <korablev at tarantool.org> [19/02/20 15:12]:
>> Since previous commit allows us to raise an error during msgpack decode
>> inside VDBE, lets do this if decoded integer is out of
>> [INT64_MIN, INT64_MAX] range and set "integer is overflowed" diagnostic
>> message.
> 
> This looks OK as interim approach to close 3735, but can't be
> accepted as a production-level fix. If SQL can't handle uint64_t
> range, SQL tables should not be able to store values from this
> range, i.e. there should be an implicitly created constraint on
> SQL tables. Better yet is to make sure SQL can handle entire
> tarantool range by changing vdbe to emit uint64-range-aware
> instructions.

It is to be implemented in scope of #3810 issue. Without this patch
operations on integers values in range [INT64_MAX, UIN64_MAX]
lead to unpredictable results. So, I guess you won’t argue that
error raising as at least temporary fix is significantly better than
misleading results.

> -- 
> Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
> http://tarantool.io - www.twitter.com/kostja_osipov
> 





More information about the Tarantool-patches mailing list