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 DCF7924F23 for ; Thu, 24 May 2018 15:26:05 -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 GqqFmsQXgFvC for ; Thu, 24 May 2018 15:26:05 -0400 (EDT) Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 3969124EEB for ; Thu, 24 May 2018 15:26:04 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v7 1/7] sql: remove parser construct, destruct to sql.h References: From: Vladislav Shpilevoy Message-ID: <7592a5bf-25f4-d1bf-f7c2-17bbf7b2c6e2@tarantool.org> Date: Thu, 24 May 2018 22:26:00 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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: Kirill Shcherbatov , tarantool-patches@freelists.org Hello. Thanks for the patch! See a pair of comments below. On 23/05/2018 17:05, Kirill Shcherbatov wrote: > Moved sql_parser_construct and sql_parser_destruct to sql.h to 1. I do not see such functions anywhere. Do you mean sql_parser_create/destroy?. > use them not only in DDL. > Removed SELECTTRACE_ENABLED macro with conditional fields from > struct Parse to prevent different object sizes across the project. > > Part of #3272. > --- > src/box/sql.h | 17 +++++++++++++++++ > src/box/sql/prepare.c | 9 +++++++++ > src/box/sql/sqliteInt.h | 25 ------------------------- > 3 files changed, 26 insertions(+), 25 deletions(-) > > diff --git a/src/box/sql.h b/src/box/sql.h > index 3c26492..ff8ab6f 100644 > --- a/src/box/sql.h > +++ b/src/box/sql.h > @@ -175,6 +175,23 @@ sql_ephemeral_space_def_new(struct Parse *parser, const char *name); > int > sql_table_def_rebuild(struct sqlite3 *db, struct Table *table); > > +/** > + * Initialize a new parser object. > + * A number of service allocations are performed on the region, which is also 2. Out of 66. > + * cleared in the destroy function. > + * @param parser object to initialize. > + * @param db SQLite object. > + */ > +void > +sql_parser_create(struct Parse *parser, struct sqlite3 *db); > +