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 2D119287CF for ; Thu, 29 Aug 2019 16:43:14 -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 LXknq84A9fT1 for ; Thu, 29 Aug 2019 16:43:14 -0400 (EDT) Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 E21712882A for ; Thu, 29 Aug 2019 16:43:13 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 2/8] port: move struct port_sql to box/port.h References: <31f265719574074dbabca4ced925ed1008bb49eb.1566907520.git.korablev@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Thu, 29 Aug 2019 22:46:27 +0200 MIME-Version: 1.0 In-Reply-To: <31f265719574074dbabca4ced925ed1008bb49eb.1566907520.git.korablev@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, Nikita Pettik Cc: kostja@tarantool.org, alexander.turenko@tarantool.org Thanks for the patch! On 27/08/2019 15:34, Nikita Pettik wrote: > We are going to use port_sql_create() in box/lua/execute.c so to be able > to call it let's make port_sql_create() non-static and move its > declaration to box/port.h alongside with struct port_sql (since > box/port.h already contains struct port_tuple and struct port_lua). > > No functional changes are provided. As I see, you did it to use port_sql like an in-out parameter for sql_execute. Please, don't do this. Port is a result container. sql_execute should create it from the scratch. If you want to pass options to sql_execute, then pass sql_opts introduced in the last patch. port_sql_create should remain static function of execute.c.