[PATCH 3/4] sql: set error type in case of ephemral space creation failure
Kirill Yukhin
kyukhin at tarantool.org
Tue Jan 22 17:07:19 MSK 2019
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
More information about the Tarantool-patches
mailing list