Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>,
	tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v1 1/4] box: move db->pShchema init to sql_init
Date: Thu, 31 May 2018 20:36:50 +0300	[thread overview]
Message-ID: <b47e7277-5f9f-ec6b-7ab3-a5a3114746fa@tarantool.org> (raw)
In-Reply-To: <80e32b9cb08cd33972e4e223197ef1944e319ce5.1527765756.git.kshcherbatov@tarantool.org>

Thanks for the patch!

On 31/05/2018 14:22, Kirill Shcherbatov wrote:
> As we are going to call parser on box.cfg() to recreate triggers
> from SQL, we should initialize Schema as it used in sqlite3BeginTrigger.
> 
> Part of #3273.
> ---
>   src/box/sql.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/box/sql.c b/src/box/sql.c
> index 7379cb4..47d1739 100644
> --- a/src/box/sql.c
> +++ b/src/box/sql.c
> @@ -77,11 +77,18 @@ sql_init()
>   		panic("failed to initialize SQL subsystem");
>   
>   	assert(db != NULL);
> +	/* Initialize pSchema to use SQL parser. */

To use for what? Before what? I see it in the commit message, but lets
explain this in the comment as well.

> +	db->pSchema = sqlite3SchemaCreate(db);
> +	if (db->pSchema == NULL) {
> +		sqlite3_close(db);
> +		panic("failed to initialize SQL Schema subsystem");
> +	}
>   }
>   

  reply	other threads:[~2018-05-31 17:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 11:22 [tarantool-patches] [PATCH v1 0/4] sql: remove Triggers to server Kirill Shcherbatov
2018-05-31 11:22 ` [tarantool-patches] [PATCH v1 1/4] box: move db->pShchema init to sql_init Kirill Shcherbatov
2018-05-31 17:36   ` Vladislav Shpilevoy [this message]
2018-06-01 20:24     ` [tarantool-patches] " Kirill Shcherbatov
2018-05-31 11:22 ` [tarantool-patches] [PATCH v1 2/4] sql: fix sql len in tarantoolSqlite3RenameTrigger Kirill Shcherbatov
2018-05-31 11:22 ` [tarantool-patches] [PATCH v1 3/4] box: introduce box_space_id_by_name Kirill Shcherbatov
2018-05-31 17:36   ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-01 20:24     ` Kirill Shcherbatov
2018-06-04 13:27       ` Vladislav Shpilevoy
2018-06-04 19:21         ` Kirill Shcherbatov
2018-06-05 13:31           ` Vladislav Shpilevoy
2018-05-31 11:22 ` [tarantool-patches] [PATCH v1 4/4] sql: move Triggers to server Kirill Shcherbatov
2018-05-31 17:36   ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-01 20:24     ` Kirill Shcherbatov
2018-06-01 20:25       ` Kirill Shcherbatov
2018-06-04 13:27         ` Vladislav Shpilevoy
2018-06-04 19:21           ` Kirill Shcherbatov
2018-06-05 13:31             ` Vladislav Shpilevoy
2018-06-09  9:32               ` Kirill Shcherbatov
2018-06-01 18:51   ` Konstantin Osipov
2018-05-31 17:36 ` [tarantool-patches] Re: [PATCH v1 0/4] sql: remove " Vladislav Shpilevoy
2018-06-04 13:27 ` Vladislav Shpilevoy
2018-06-05 13:31 ` Vladislav Shpilevoy

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=b47e7277-5f9f-ec6b-7ab3-a5a3114746fa@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 1/4] box: move db->pShchema init to sql_init' \
    /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