From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: tarantool-patches@freelists.org Cc: "v.shpilevoy@tarantool.org" <v.shpilevoy@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v6 3/4] sql: space_def* instead of Table* in Expr Date: Wed, 16 May 2018 16:10:26 +0300 [thread overview] Message-ID: <90d29ce6-24ef-36c7-0004-075bf026bea3@tarantool.org> (raw) In-Reply-To: <3d8ffe27-4d38-3d8d-eb08-d40adfc27783@tarantool.org> > 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 *);
next prev parent reply other threads:[~2018-05-16 13:10 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-15 17:03 [tarantool-patches] [PATCH v6 0/4] sql: moved Checks to server Kirill Shcherbatov 2018-05-15 17:03 ` [tarantool-patches] [PATCH v6 1/4] sql: fix code style in sqlite3Pragma Kirill Shcherbatov 2018-05-15 17:03 ` [tarantool-patches] [PATCH v6 2/4] sql: remove SQL fields from Table and Column Kirill Shcherbatov 2018-05-17 17:25 ` [tarantool-patches] " n.pettik 2018-05-18 15:35 ` Kirill Shcherbatov 2018-05-18 17:24 ` n.pettik 2018-05-18 19:45 ` Kirill Shcherbatov 2018-05-18 20:13 ` n.pettik 2018-05-15 17:03 ` [tarantool-patches] [PATCH v6 3/4] sql: space_def* instead of Table* in Expr Kirill Shcherbatov 2018-05-16 12:33 ` [tarantool-patches] " Vladislav Shpilevoy 2018-05-16 13:10 ` Kirill Shcherbatov [this message] 2018-05-16 13:11 ` Vladislav Shpilevoy [not found] ` <26E4269B-2BCB-42C3-8216-D51E290E4723@corp.mail.ru> 2018-05-18 15:26 ` Kirill Shcherbatov 2018-05-18 17:04 ` n.pettik 2018-05-21 12:48 ` [tarantool-patches] " Nikita Pettik 2018-05-15 17:03 ` [tarantool-patches] [PATCH v6 4/4] sql: remove Checks to server Kirill Shcherbatov 2018-05-16 17:59 ` [tarantool-patches] " Vladislav Shpilevoy 2018-05-16 11:52 ` [tarantool-patches] Re: [PATCH v6 0/4] sql: moved " Vladislav Shpilevoy 2018-05-16 13:13 ` Kirill Shcherbatov 2018-05-23 5:19 ` Kirill Yukhin
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=90d29ce6-24ef-36c7-0004-075bf026bea3@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='[tarantool-patches] Re: [PATCH v6 3/4] sql: space_def* instead of Table* in Expr' \ /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