From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BD74E2477D for ; Wed, 16 May 2018 09:13:35 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JHjbHHnXZgtZ for ; Wed, 16 May 2018 09:13:35 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 7AECF24771 for ; Wed, 16 May 2018 09:13:35 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v6 0/4] sql: moved Checks to server References: <1e67c524-f635-15ce-7a89-b3341c4caa9b@tarantool.org> From: Kirill Shcherbatov Message-ID: Date: Wed, 16 May 2018 16:13:33 +0300 MIME-Version: 1.0 In-Reply-To: <1e67c524-f635-15ce-7a89-b3341c4caa9b@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy > 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.