From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6A7F045C304 for ; Fri, 27 Nov 2020 13:44:36 +0300 (MSK) From: imeevma@tarantool.org Date: Fri, 27 Nov 2020 13:44:34 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: korablev@tarantool.org Cc: tarantool-patches@dev.tarantool.org --- https://github.com/tarantool/tarantool/issues/5537 https://github.com/tarantool/tarantool/tree/imeevma/gh-5537-find-missing-diag src/box/sql/vdbe.c | 3 +++ src/box/sql/vdbeInt.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c index 724bc188b..ae3dd2028 100644 --- a/src/box/sql/vdbe.c +++ b/src/box/sql/vdbe.c @@ -862,6 +862,7 @@ int sqlVdbeExec(Vdbe *p) } #endif for(pOp=&aOp[p->pc]; 1; pOp++) { + p->pOp = pOp; /* Errors are detected by individual opcodes, with an immediate * jumps to abort_due_to_error. */ @@ -5361,6 +5362,8 @@ default: { /* This is really OP_Noop and OP_Explain */ abort_due_to_error: rc = -1; p->is_aborted = true; + if (diag_is_empty(&fiber()->diag)) + abort(); /* This is the only way out of this procedure. */ vdbe_return: diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h index 2c50b6768..24915bcf5 100644 --- a/src/box/sql/vdbeInt.h +++ b/src/box/sql/vdbeInt.h @@ -411,6 +411,7 @@ struct Vdbe { */ Op *aOp; /* Space to hold the virtual machine's program */ + Op *pOp; Mem *aMem; /* The memory locations */ Mem **apArg; /* Arguments to currently executing user function */ /** SQL metadata for DML/DQL queries. */ -- 2.25.1