[tarantool-patches] Re: [PATCH v6 0/4] sql: moved Checks to server

Kirill Shcherbatov kshcherbatov at tarantool.org
Wed May 16 16:13:33 MSK 2018


> Hello. Thanks for the patchset! Please, describe what it does, why and how.

Refactored SQL Column and Table structures to use space_def instead of native fields.
All temporal memory is allocated on region to prevent memory leaks and easely manage memory
with frequent insertions on SQL expression parsing.
Introduced space_def pointer in Expr instead of Table pointer.
The ResolveSelfReference function requires Table pointer to refer to, but it doesn't exist in our scenarios yet.
With correctly-initialized consistent space_def structure this would no problem.
This preliminary tasks made able to move SQL Checks in Server code.
For checks ExprList transfering to server data is packed in msgpack as array of maps:
[{"expr_str": "x < y", "name" : "FIRST"}, ..]
Introduced checks_array_decode aimed to unpack this complex package.
Introduced sql_update_space_def_reference to update space references as space_def pointer 
changes over the  i.e. resolved checks refer released memory.




More information about the Tarantool-patches mailing list