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 4C5A324754 for ; Wed, 16 May 2018 09:11:41 -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 t2uTGOj5IgzI for ; Wed, 16 May 2018 09:11:41 -0400 (EDT) Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (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 04BBF2474E for ; Wed, 16 May 2018 09:11:40 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v6 3/4] sql: space_def* instead of Table* in Expr References: <6702e8ecd47238730a4ba27e87fe7bf082a874c6.1526403792.git.kshcherbatov@tarantool.org> <3d8ffe27-4d38-3d8d-eb08-d40adfc27783@tarantool.org> <90d29ce6-24ef-36c7-0004-075bf026bea3@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Wed, 16 May 2018 16:11:38 +0300 MIME-Version: 1.0 In-Reply-To: <90d29ce6-24ef-36c7-0004-075bf026bea3@tarantool.org> 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, Nikita Pettik Thanks! Now the first 3 patches are OK to me. Nikita, please, take a look. On 16/05/2018 16:10, Kirill Shcherbatov wrote: >> 1. Lets move this comment to the heade> 2. Same. >> 3. Same. > > diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c > index 9a8f045..544fe3d 100644 > --- a/src/box/sql/expr.c > +++ b/src/box/sql/expr.c > @@ -3531,14 +3531,6 @@ sqlite3ExprCodeLoadIndexColumn(Parse * pParse, /* The parsing context */ > } > } > > -/** > - * Generate code to extract the value of the iCol-th column of a table. > - * @param v The VDBE under construction. > - * @param space_def Space definition. > - * @param iTabCur The PK cursor. > - * @param iCol Index of the column to extract. > - * @param regOut Extract the value into this register. > - */ > void > sqlite3ExprCodeGetColumnOfTable(Vdbe *v, struct space_def *space_def, > int iTabCur, int iCol, int regOut) > @@ -3549,22 +3541,6 @@ sqlite3ExprCodeGetColumnOfTable(Vdbe *v, struct space_def *space_def, > } > } > > -/** > - * Generate code that will extract the iColumn-th column from > - * table pTab and store the column value in a register. > - * > - * An effort is made to store the column value in register iReg. > - * This is not garanteeed for GetColumn() - the result can be > - * stored in any register. But the result is guaranteed to land > - * in register iReg for GetColumnToReg(). > - * @param pParse Parsing and code generating context. > - * @param space_def Space definition. > - * @param iColumn Index of the table column. > - * @param iTable The cursor pointing to the table. > - * @param iReg Store results here. > - * @param p5 P5 value for OP_Column + FLAGS. > - * @return iReg value. > - */ > int > sqlite3ExprCodeGetColumn(Parse *pParse, struct space_def *space_def, > int iColumn, int iTable, int iReg, u8 p5) > @@ -3591,16 +3567,6 @@ sqlite3ExprCodeGetColumn(Parse *pParse, struct space_def *space_def, > return iReg; > } > > -/** > - * Generate code that will extract the iColumn-th column from > - * table pTab and store the column value in a register, copy the > - * result. > - * @param pParse Parsing and code generating context. > - * @param space_def Space definition. > - * @param iColumn Index of the table column. > - * @param iTable The cursor pointing to the table. > - * @param iReg Store results here. > - */ > void > sqlite3ExprCodeGetColumnToReg(Parse * pParse, struct space_def * space_def, > int iColumn, int iTable, int iReg) > diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h > index 75699ae..04f5197 100644 > --- a/src/box/sql/sqliteInt.h > +++ b/src/box/sql/sqliteInt.h > @@ -3585,9 +3585,47 @@ int sqlite3WhereOkOnePass(WhereInfo *, int *); > #define ONEPASS_SINGLE 1 /* ONEPASS valid for a single row update */ > #define ONEPASS_MULTI 2 /* ONEPASS is valid for multiple rows */ > void sqlite3ExprCodeLoadIndexColumn(Parse *, Index *, int, int, int); > + > +/** > + * Generate code that will extract the iColumn-th column from > + * table pTab and store the column value in a register. > + * > + * An effort is made to store the column value in register iReg. > + * This is not garanteeed for GetColumn() - the result can be > + * stored in any register. But the result is guaranteed to land > + * in register iReg for GetColumnToReg(). > + * @param pParse Parsing and code generating context. > + * @param space_def Space definition. > + * @param iColumn Index of the table column. > + * @param iTable The cursor pointing to the table. > + * @param iReg Store results here. > + * @param p5 P5 value for OP_Column + FLAGS. > + * @return iReg value. > + */ > int sqlite3ExprCodeGetColumn(Parse *, struct space_def *, int, int, int, u8); > + > +/** > + * Generate code that will extract the iColumn-th column from > + * table pTab and store the column value in a register, copy the > + * result. > + * @param pParse Parsing and code generating context. > + * @param space_def Space definition. > + * @param iColumn Index of the table column. > + * @param iTable The cursor pointing to the table. > + * @param iReg Store results here. > + */ > void sqlite3ExprCodeGetColumnToReg(Parse *, struct space_def *, int, int, int); > + > +/** > + * Generate code to extract the value of the iCol-th column of a table. > + * @param v The VDBE under construction. > + * @param space_def Space definition. > + * @param iTabCur The PK cursor. > + * @param iCol Index of the column to extract. > + * @param regOut Extract the value into this register. > + */ > void sqlite3ExprCodeGetColumnOfTable(Vdbe *, struct space_def *, int, int, int); > + > void sqlite3ExprCodeMove(Parse *, int, int, int); > void sqlite3ExprCacheStore(Parse *, int, int, int); > void sqlite3ExprCachePush(Parse *); >