[PATCH 3/4] sql: set error type in case of ephemral space creation failure
Vladimir Davydov
vdavydov.dev at gmail.com
Wed Jan 23 11:00:54 MSK 2019
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.
More information about the Tarantool-patches
mailing list