From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0362046970E for ; Tue, 24 Dec 2019 15:11:12 +0300 (MSK) Date: Tue, 24 Dec 2019 15:11:12 +0300 From: Sergey Ostanevich Message-ID: <20191224121112.GH19594@tarantool.org> References: <3cb66372fe4b8d4a6c0817dab16259f442e63868.1576844632.git.korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3cb66372fe4b8d4a6c0817dab16259f442e63868.1576844632.git.korablev@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3 07/20] sql: move sql_stmt_finalize() to execute.h List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the patch, just one nit. LGTM Sergos On 20 Dec 15:47, Nikita Pettik wrote: > We are going to introduce prepared statement cache. On statement's > deallocation we should release all resources which is done by > sql_finalize(). Now it is declared in sql/sqlInt.h header, which ^^^ sql_stmt_finalize() > accumulates almost all SQL related functions. To avoid including such a > huge header to use single function, let's move its signature to > box/execute.h > > Need for #2592 > --- > src/box/ck_constraint.c | 1 + > src/box/execute.h | 3 +++ > src/box/sql/sqlInt.h | 3 --- > 3 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/src/box/ck_constraint.c b/src/box/ck_constraint.c > index bc2a5e8f4..ff3f05587 100644 > --- a/src/box/ck_constraint.c > +++ b/src/box/ck_constraint.c > @@ -29,6 +29,7 @@ > * SUCH DAMAGE. > */ > #include "box/session.h" > +#include "execute.h" > #include "bind.h" > #include "ck_constraint.h" > #include "errcode.h" > diff --git a/src/box/execute.h b/src/box/execute.h > index a6000c08b..ce1e7a67d 100644 > --- a/src/box/execute.h > +++ b/src/box/execute.h > @@ -89,6 +89,9 @@ struct port_sql { > > extern const struct port_vtab port_sql_vtab; > > +int > +sql_stmt_finalize(struct sql_stmt *stmt); > + > /** > * Prepare (compile into VDBE byte-code) statement. > * > diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h > index b1e4ac2fa..24da3ca11 100644 > --- a/src/box/sql/sqlInt.h > +++ b/src/box/sql/sqlInt.h > @@ -520,9 +520,6 @@ sql_value * > sql_column_value(sql_stmt *, > int iCol); > > -int > -sql_stmt_finalize(sql_stmt * pStmt); > - > /* > * Terminate the current execution of an SQL statement and reset > * it back to its starting state so that it can be reused. > -- > 2.15.1 >