From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 23 Jan 2019 11:00:54 +0300 From: Vladimir Davydov Subject: Re: [PATCH 3/4] sql: set error type in case of ephemral space creation failure Message-ID: <20190123080054.ohug43dht6yvsugf@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Kirill Yukhin Cc: tarantool-patches@freelists.org List-ID: 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.