Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH 3/4] sql: set error type in case of ephemral space creation failure
Date: Wed, 23 Jan 2019 11:00:54 +0300	[thread overview]
Message-ID: <20190123080054.ohug43dht6yvsugf@esperanza> (raw)
In-Reply-To: <f1a9a7621addd11be482d189de4c218a148d8b17.1548165435.git.kyukhin@tarantool.org>

On Tue, Jan 22, 2019 at 05:07:19PM +0300, Kirill Yukhin wrote:
> This is trivial patch which sets error kind if epehemeral
> spaces cannot be created due to Tarantool's backend (e.g. there's
> no more memory or formats available).
> ---
>  src/box/sql/vdbe.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
> index 9f9d0ea..9fc362f 100644
> --- a/src/box/sql/vdbe.c
> +++ b/src/box/sql/vdbe.c
> @@ -3272,8 +3272,10 @@ case OP_OpenTEphemeral: {
>  	struct space *space = sql_ephemeral_space_create(pOp->p2,
>  							 pOp->p4.key_info);
>  
> -	if (space == NULL)
> +	if (space == NULL) {
> +		rc = SQL_TARANTOOL_ERROR;
>  		goto abort_due_to_error;
> +	}
>  	aMem[pOp->p1].u.p = space;
>  	aMem[pOp->p1].flags = MEM_Ptr;
>  	break;

This one is apparently OK to push.

  reply	other threads:[~2019-01-23  8:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 14:07 [PATCH 0/4] Reuse tuple formats for ephemeral spaces Kirill Yukhin
2019-01-22 14:07 ` Kirill Yukhin
2019-01-22 14:07   ` [PATCH 1/4] Pass necessary fields to tuple_format contructor Kirill Yukhin
2019-01-23  7:53     ` Vladimir Davydov
2019-01-24  8:13       ` Kirill Yukhin
2019-01-22 14:07   ` [PATCH 2/4] Set is_temporary flag for formats of ephemeral spaces Kirill Yukhin
2019-01-23  8:00     ` Vladimir Davydov
2019-01-24  8:53       ` Kirill Yukhin
2019-01-22 14:07   ` [PATCH 3/4] sql: set error type in case of ephemral space creation failure Kirill Yukhin
2019-01-23  8:00     ` Vladimir Davydov [this message]
2019-01-22 14:07   ` [PATCH 4/4] Allow to reuse tuple_formats for ephemeral spaces Kirill Yukhin
2019-01-23  8:38     ` Vladimir Davydov
2019-01-24 12:39       ` 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=20190123080054.ohug43dht6yvsugf@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH 3/4] sql: set error type in case of ephemral space creation failure' \
    /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