Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Imeev Mergen <imeevma@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: make assertion to check only ephemeral spaces
Date: Sun, 19 May 2019 15:13:36 +0300	[thread overview]
Message-ID: <E7225C0D-34B0-4886-9EA2-1B82F0249E8F@tarantool.org> (raw)
In-Reply-To: <df273b4cb385e0e4e9f061918e2b54a375358aa1.1558108255.git.imeevma@gmail.com>



> On 17 May 2019, at 18:51, imeevma@tarantool.org wrote:
> 
> At some point, it became possible to use SELECT on spaces created
> in Lua. Since it is allowed to create temporary spaces in Lua,
> this led to an error.
> To avoid this error, now not all temporary
> spaces are checked, but only ephemeral spaces.

Checked on what condition? Please, provide complete
explanation of the problem in commit message.

Btw, they are not real ephemeral spaces, they are
surrogate wrappers which have no underlying spaces
in cache. It was our convention to avoid messing them
with real (ephemeral, temporary or casual) spaces. 

> 
> Close #4139
> ---
> https://github.com/tarantool/tarantool/issues/4139
> https://github.com/tarantool/tarantool/tree/imeevma/gh-4139-assertion-on-temporary-space
> 
> src/box/sql.c          |  1 +
> src/box/sql/build.c    |  6 +++---
> test/sql/misc.result   | 22 ++++++++++++++++++++++
> test/sql/misc.test.lua |  9 +++++++++
> 4 files changed, 35 insertions(+), 3 deletions(-)
> 
> diff --git a/src/box/sql.c b/src/box/sql.c
> index fbfa599..3bf263d 100644
> --- a/src/box/sql.c
> +++ b/src/box/sql.c
> @@ -1281,6 +1281,7 @@ sql_ephemeral_space_def_new(struct Parse *parser, const char *name)
> 	memcpy(def->name, name, name_len);
> 	def->name[name_len] = '\0';
> 	def->opts.is_temporary = true;
> +	def->opts.is_ephemeral = true;

Let’s set only is_ephemeral flag - setting both doesn’t
really make any sense. Also, fix assertions during
building routine to check is_ephemeral flag, not
is_temporary.

  reply	other threads:[~2019-05-19 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 15:51 [tarantool-patches] " imeevma
2019-05-19 12:13 ` n.pettik [this message]
2019-05-21 15:06   ` [tarantool-patches] " Mergen Imeev
2019-05-25 13:48     ` n.pettik
2019-06-06 14:13 ` 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=E7225C0D-34B0-4886-9EA2-1B82F0249E8F@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 1/1] sql: make assertion to check only ephemeral spaces' \
    /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