Skip to content
Snippets Groups Projects
user avatar
Nikita Pettik authored
Tarantool allows to hold in INTEGER field values in range
[INT64_MAX, UINT64_MAX], which is obviously larger than common int64_t
range. In this regard, if value of integer field in range
[INT64_MAX, UINT64_MAX] is presented in tuple (e.g. after insertion from
Lua interface), then after decoding msgpack (during processing SQL
query) its value won't fit into int64_t (which in turn is basic type
used to hold integers inside VDBE memory). Now if this happens, instead
of raising an overflow error, value is stored as floating point number
(with precise loss, obviously). Such approach is considered to be messy
and we are going to raise "integer overflow" error instead. To make this
happen, lets firstly refactor sqlVdbeMsgpackGet() to make it return
error code to indicate that something went wrong and move length of
decoded part to output parameters. Codestyle fixes are included as well.

Needed for #3735
fd3d0847
History
Name Last commit Last update