From: Kirill Yukhin <kyukhin@tarantool.org>
To: korablev@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH] sql: refactor SQL cursor to remove write ones
Date: Fri, 5 Oct 2018 07:39:44 +0300 [thread overview]
Message-ID: <20181005043944.ts6gcu5t2ts7sa4n@tarantool.org> (raw)
In-Reply-To: <20181004120034.pbdqm7thu7kiqa25@tarantool.org>
Hello,
On 04 окт 15:00, Kirill Yukhin wrote:
> Hello,
> On 01 окт 13:31, Kirill Yukhin wrote:
> > In Tarantool opening and positioning cursor for writing
> > have no sense. So refactor SQL code, to perform:
> > - Creation of ephemeral table w/o any cursors machinery.
> > No op-code returns register which contains plain pointer
> > to the ephemeral space.
> > - OpenRead/OpenWrite opcodes were replaced with single
> > CursorOpen op-code, which establishes new cursor w/
> > intention to sebsequent read from the space. This opcode
> > accepts both plain pointer (in P4 operand) and register
> > which contains pointer (inn P3) to the ephemeral space.
> > This query scheduler and DML routines thoroughly.
> >
> > Closes #3182
> > Part of #2362
> > ---
> > Branch: https://github.com/tarantool/tarantool/commits/kyukhin/gh-3182-repair-cursors-2
> > Issue: https://github.com/tarantool/tarantool/issues/3182
> Patch was checked into 2.0 branch.
Seems like the patch broken testing in release mode. This is
due to non-initialized local variable.
Patch in the bottom fixes that. Comitted as obvious into 2.0
branch.
--
Regard, Kirill Yukhin
commit cebcf21114f50141e8aa0a72f30ea47dfbfef16c
Author: Kirill Yukhin <kyukhin@tarantool.org>
Date: Fri Oct 5 07:19:56 2018 +0300
sql: fix local var initialization in select planner
Not initialized var led to crashes in non-debug
modes.
---
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 6a1bea0..520a847 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) {
prev parent reply other threads:[~2018-10-05 4:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 10:31 [tarantool-patches] " Kirill Yukhin
2018-10-02 11:56 ` [tarantool-patches] " n.pettik
2018-10-03 9:57 ` Kirill Yukhin
2018-10-04 2:21 ` n.pettik
2018-10-04 7:16 ` Kirill Yukhin
2018-10-04 10:45 ` n.pettik
2018-10-04 11:48 ` Kirill Yukhin
2018-10-04 12:00 ` Kirill Yukhin
2018-10-05 4:39 ` Kirill Yukhin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181005043944.ts6gcu5t2ts7sa4n@tarantool.org \
--to=kyukhin@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH] sql: refactor SQL cursor to remove write ones' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox