Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
	Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 2/2] sql: use own region in Parser
Date: Thu, 31 May 2018 18:41:25 +0300	[thread overview]
Message-ID: <cd8b050c-cfeb-b626-6199-0bc4e79574d5@tarantool.org> (raw)
In-Reply-To: <663c4c7deb9d8eff90407f50da2075990b44f815.1527778868.git.kshcherbatov@tarantool.org>

Thanks for the patch! See 2 comments below.

On 31/05/2018 18:01, Kirill Shcherbatov wrote:
> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index 5fbcbaf..b26565b 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1762,7 +1762,7 @@ sqlite3ColumnsFromExprList(Parse * parse, ExprList * expr_list, Table *table)
>   	 * names for existing table.
>   	 */
>   	assert(table->def->fields == NULL);
> -	struct region *region = &fiber()->gc;
> +	struct region *region = &parse->region;
>   	table->def->fields =
>   		region_alloc(region, nCol * sizeof(table->def->fields[0]));
>   	if (table->def->fields == NULL) {
> diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h
> index abf1543..4275f72 100644
> --- a/src/box/sql/sqliteInt.h
> +++ b/src/box/sql/sqliteInt.h
> @@ -2913,8 +2913,8 @@ struct Parse {
>   	u8 eTriggerOp;		/* TK_UPDATE, TK_INSERT or TK_DELETE */
>   	u8 eOrconf;		/* Default ON CONFLICT policy for trigger steps */
>   	u8 disableTriggers;	/* True to disable triggers */
> -	/** Region size at the Parser launch. */
> -	size_t region_initial_size;
> +	/* Region to make SQL temp allocations. */

1. Please, use /** for out of a function body comments.

> +	struct region region;
>   
>     /**************************************************************************
>     * Fields above must be initialized to zero.  The fields that follow,
2. Did you check it works now on the Kirill Yu. patch? (with additional field in
space options).

  reply	other threads:[~2018-05-31 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 15:01 [tarantool-patches] [PATCH v1 0/2] sql: Create special region for parser Kirill Shcherbatov
2018-05-31 15:01 ` [tarantool-patches] [PATCH v1 1/2] sql: remove parser construct, destruct to sql.h Kirill Shcherbatov
2018-05-31 15:41   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-31 15:49     ` Kirill Shcherbatov
2018-05-31 15:01 ` [tarantool-patches] [PATCH v1 2/2] sql: use own region in Parser Kirill Shcherbatov
2018-05-31 15:41   ` Vladislav Shpilevoy [this message]
2018-05-31 15:49     ` [tarantool-patches] " Kirill Shcherbatov
2018-05-31 15:41 ` [tarantool-patches] Re: [PATCH v1 0/2] sql: Create special region for parser Vladislav Shpilevoy
2018-05-31 15:50 ` Kirill Shcherbatov
2018-05-31 15:55   ` Vladislav Shpilevoy
2018-05-31 17:43     ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd8b050c-cfeb-b626-6199-0bc4e79574d5@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 2/2] sql: use own region in Parser' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox