Skip to content
Snippets Groups Projects
Commit fd3d0847 authored by Nikita Pettik's avatar Nikita Pettik Committed by Kirill Yukhin
Browse files

sql: refactor sqlVdbeMsgpackGet()

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
parent 95ca0bd7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment