* [tarantool-patches] [PATCH] sql: initialize variable containing opcode
@ 2018-10-04 21:17 Nikita Pettik
2018-10-05 4:42 ` [tarantool-patches] " Kirill Yukhin
0 siblings, 1 reply; 2+ messages in thread
From: Nikita Pettik @ 2018-10-04 21:17 UTC (permalink / raw)
To: tarantool-patches; +Cc: kyukhin, Nikita Pettik
This bug appeared after patch on eliminating cursor usage for write
operations in SQL (commit: 6fc3efec7). Lack of this initialization led
to missed generation of cursor opening and as a consequence - usage of
broken cursor during VDBE execution.
Closes #3719
---
https://github.com/tarantool/tarantool/tree/np/gh-3719-fix-uninitialized-var
https://github.com/tarantool/tarantool/issues/3719
src/box/sql/where.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/box/sql/where.c b/src/box/sql/where.c
index 6a1bea091..520a847dd 100644
--- a/src/box/sql/where.c
+++ b/src/box/sql/where.c
@@ -4591,7 +4591,7 @@ sqlite3WhereBegin(Parse * pParse, /* The parser context */
if (pLoop->wsFlags & WHERE_INDEXED) {
struct index_def *idx_def = pLoop->index_def;
int iIndexCur;
- int op;
+ int op = OP_IteratorOpen;
/* Check if index is primary. Either of
* points should be true:
* 1. struct Index is non-NULL and is
@@ -4636,7 +4636,6 @@ sqlite3WhereBegin(Parse * pParse, /* The parser context */
}
}
assert(wctrlFlags & WHERE_ONEPASS_DESIRED);
- op = OP_IteratorOpen;
pWInfo->aiCurOnePass[1] = iIndexCur;
} else if (iAuxArg
&& (wctrlFlags & WHERE_OR_SUBCLAUSE) != 0) {
--
2.15.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tarantool-patches] Re: [PATCH] sql: initialize variable containing opcode
2018-10-04 21:17 [tarantool-patches] [PATCH] sql: initialize variable containing opcode Nikita Pettik
@ 2018-10-05 4:42 ` Kirill Yukhin
0 siblings, 0 replies; 2+ messages in thread
From: Kirill Yukhin @ 2018-10-05 4:42 UTC (permalink / raw)
To: Nikita Pettik; +Cc: tarantool-patches
Hello,
On 05 окт 00:17, Nikita Pettik wrote:
> This bug appeared after patch on eliminating cursor usage for write
> operations in SQL (commit: 6fc3efec7). Lack of this initialization led
> to missed generation of cursor opening and as a consequence - usage of
> broken cursor during VDBE execution.
>
> Closes #3719
> ---
> https://github.com/tarantool/tarantool/tree/np/gh-3719-fix-uninitialized-var
> https://github.com/tarantool/tarantool/issues/3719
I didn't mention your mail and prepared & committed very same change.
Here: https://www.freelists.org/post/tarantool-patches/PATCH-sql-refactor-SQL-cursor-to-remove-write-ones,8
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-05 4:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 21:17 [tarantool-patches] [PATCH] sql: initialize variable containing opcode Nikita Pettik
2018-10-05 4:42 ` [tarantool-patches] " Kirill Yukhin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox