* [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE
@ 2020-11-27 11:08 imeevma
2020-12-01 13:40 ` Kirill Yukhin
0 siblings, 1 reply; 4+ messages in thread
From: imeevma @ 2020-11-27 11:08 UTC (permalink / raw)
To: korablev; +Cc: tarantool-patches
---
src/box/sql/vdbe.c | 7 +++++++
src/box/sql/vdbeInt.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
index 724bc188b..0c24a7bce 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.
*/
@@ -5364,6 +5365,12 @@ abort_due_to_error:
/* This is the only way out of this procedure. */
vdbe_return:
+ if (p->is_aborted) {
+ if (diag_is_empty(&fiber()->diag)) {
+ assert(0);
+ abort();
+ }
+ }
testcase( nVmStep>0);
p->aCounter[SQL_STMTSTATUS_VM_STEP] += (int)nVmStep;
assert(rc == 0 || rc == -1 || rc == SQL_ROW || rc == SQL_DONE);
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE
2020-11-27 11:08 [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE imeevma
@ 2020-12-01 13:40 ` Kirill Yukhin
2020-12-01 14:01 ` Mergen Imeev
0 siblings, 1 reply; 4+ messages in thread
From: Kirill Yukhin @ 2020-12-01 13:40 UTC (permalink / raw)
To: imeevma; +Cc: tarantool-patches
Hello,
What does temporary mean? Do you intend to see the patch in 2.x?
On 27 Nov 14:08, Mergen Imeev via Tarantool-patches wrote:
> ---
> src/box/sql/vdbe.c | 7 +++++++
> src/box/sql/vdbeInt.h | 1 +
> 2 files changed, 8 insertions(+)
>
> diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
> index 724bc188b..0c24a7bce 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;
I see declaration and set of new field. But I don't see use...
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE
2020-12-01 13:40 ` Kirill Yukhin
@ 2020-12-01 14:01 ` Mergen Imeev
0 siblings, 0 replies; 4+ messages in thread
From: Mergen Imeev @ 2020-12-01 14:01 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: tarantool-patches
Hi! This patch was used to find what is wrong in issue #5537. The new field
were used to save information about the last executed opcode in coredump.
I do not plan to include these changes in master or any other release branch.
On Tue, Dec 01, 2020 at 01:40:58PM +0000, Kirill Yukhin wrote:
> Hello,
>
> What does temporary mean? Do you intend to see the patch in 2.x?
>
> On 27 Nov 14:08, Mergen Imeev via Tarantool-patches wrote:
> > ---
> > src/box/sql/vdbe.c | 7 +++++++
> > src/box/sql/vdbeInt.h | 1 +
> > 2 files changed, 8 insertions(+)
> >
> > diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
> > index 724bc188b..0c24a7bce 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;
>
> I see declaration and set of new field. But I don't see use...
>
> --
> Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE
@ 2020-11-27 10:44 imeevma
0 siblings, 0 replies; 4+ messages in thread
From: imeevma @ 2020-11-27 10:44 UTC (permalink / raw)
To: korablev; +Cc: tarantool-patches
---
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-01 14:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 11:08 [Tarantool-patches] [PATCH v1 1/1] temporary: locate missing diag in VDBE imeevma
2020-12-01 13:40 ` Kirill Yukhin
2020-12-01 14:01 ` Mergen Imeev
-- strict thread matches above, loose matches on Subject: below --
2020-11-27 10:44 imeevma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox