From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Kirill Yukhin Subject: [PATCH 3/4] sql: set error type in case of ephemral space creation failure Date: Tue, 22 Jan 2019 17:07:19 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: vdavydov.dev@gmail.com Cc: tarantool-patches@freelists.org, Kirill Yukhin List-ID: 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; -- 2.19.1