[tarantool-patches] Re: [PATCH v7 1/7] sql: remove parser construct, destruct to sql.h

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu May 24 22:26:00 MSK 2018


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);
> +




More information about the Tarantool-patches mailing list