From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6B09526241 for ; Tue, 10 Jul 2018 10:59:11 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9eXys3cBedci for ; Tue, 10 Jul 2018 10:59:11 -0400 (EDT) Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 2847D26222 for ; Tue, 10 Jul 2018 10:59:11 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: refactor vdbe_emit_open_cursor calls References: <94a3289e26898b8f779450bf620d8fef454844c7.1531140049.git.kshcherbatov@tarantool.org> <96598d88-35f2-3075-6f90-f2efecd2f0cd@tarantool.org> From: Vladislav Shpilevoy Message-ID: <665e7af1-3a3c-ed51-e9e8-097811a4a7a6@tarantool.org> Date: Tue, 10 Jul 2018 17:59:08 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Kirill Shcherbatov , tarantool-patches@freelists.org >> 2. vdbe_emit_open_cursor has outdated comment in the header. > * @param parse_context Parse context. > * @param cursor Number of cursor to be created. > - * @param index_id Encoded index id (encoding is void actually, so > - * pas it as is). In future will be replaced with pointer > - * to struct index. > + * @param index_id index id. In future will be replaced with > + * pointer to struct index. > * @retval address of last opcode. 1. Still out dated. Where is '@param space'? 2. Why vdbe_emit_open_cursor opens the cursor using index_id, but opcode OP_OpenRead/Write still uses it as tnum? > ========================================= > > Made vdbe_emit_open_cursor calls consistent: > now it uses index id everywhere. > This required to change a way to detect that > VDBE has openned Read cursor to specified table > in vdbe_has_table_read to write result of insert > in temp table if required. > --- > src/box/sql/analyze.c | 3 +- > src/box/sql/build.c | 3 +- > src/box/sql/expr.c | 5 ++- > src/box/sql/fkey.c | 3 +- > src/box/sql/insert.c | 96 +++++++++++++++++++++++++++++-------------------- > src/box/sql/select.c | 4 +-- > src/box/sql/sqliteInt.h | 5 ++- > src/box/sql/where.c | 10 ++++-- > 8 files changed, 77 insertions(+), 52 deletions(-) >