From: Nikita Pettik <korablev@tarantool.org> To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: remove OP_Realify Date: Mon, 28 Sep 2020 15:55:59 +0000 [thread overview] Message-ID: <20200928155559.GB14909@tarantool.org> (raw) In-Reply-To: <73779905e2350c2ecf37cfe744058e3fa61b4ded.1601129563.git.imeevma@gmail.com> On 26 Sep 17:15, imeevma@tarantool.org wrote: > This opcode was used to convert INTEGER values to REAL. It is not > necessary in Tarantool and may cause errors. Add justification: what this change fixes, in which way etc. > Closes #5335 > --- > https://github.com/tarantool/tarantool/issues/5335 > https://github.com/tarantool/tarantool/tree/imeevma/gh-5335-remove-op-realify > > @ChangeLog > - Fixed a bug with unnecessary convertion from INTEGER to DOUBLE (gh-5335). > > src/box/sql/delete.c | 12 ----- > src/box/sql/expr.c | 13 ----- > src/box/sql/vdbe.c | 17 ------- > ...-unnecessary-conversation-to-double.result | 51 +++++++++++++++++++ > ...nnecessary-conversation-to-double.test.lua | 11 ++++ > 5 files changed, 62 insertions(+), 42 deletions(-) > create mode 100644 test/sql/gh-5335-unnecessary-conversation-to-double.result > create mode 100644 test/sql/gh-5335-unnecessary-conversation-to-double.test.lua > > diff --git a/src/box/sql/delete.c b/src/box/sql/delete.c > index 68abd1f58..a78c68df6 100644 > --- a/src/box/sql/delete.c > +++ b/src/box/sql/delete.c > @@ -565,18 +565,6 @@ sql_generate_index_key(struct Parse *parse, struct index *index, int cursor, > } > uint32_t tabl_col = index->def->key_def->parts[j].fieldno; > sqlVdbeAddOp3(v, OP_Column, cursor, tabl_col, reg_base + j); > - /* > - * If the column type is NUMBER but the number > - * is an integer, then it might be stored in the > - * table as an integer (using a compact > - * representation) then converted to REAL by an > - * OP_Realify opcode. But we are getting > - * ready to store this value back into an index, > - * where it should be converted by to INTEGER > - * again. So omit the OP_Realify opcode if > - * it is present > - */ > - sqlVdbeDeletePriorOpcode(v, OP_Realify); > } > if (reg_out != 0) > sqlVdbeAddOp3(v, OP_MakeRecord, reg_base, col_cnt, reg_out);
next prev parent reply other threads:[~2020-09-28 15:56 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-26 14:15 imeevma 2020-09-28 15:55 ` Nikita Pettik [this message] 2020-09-28 16:41 ` Mergen Imeev -- strict thread matches above, loose matches on Subject: below -- 2021-08-04 8:30 Mergen Imeev via Tarantool-patches 2021-08-04 14:08 ` Kirill Yukhin via Tarantool-patches 2021-08-04 16:11 ` Vitaliia Ioffe via Tarantool-patches 2021-08-05 9:38 ` Kirill Yukhin via Tarantool-patches 2021-08-02 18:09 Mergen Imeev via Tarantool-patches 2021-07-30 7:25 Mergen Imeev via Tarantool-patches 2021-07-29 6:48 Mergen Imeev via Tarantool-patches 2021-07-30 7:14 ` Timur Safin via Tarantool-patches 2021-07-30 7:18 ` Mergen Imeev via Tarantool-patches 2021-07-23 7:54 Mergen Imeev via Tarantool-patches 2021-07-26 20:58 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-27 8:53 ` Mergen Imeev via Tarantool-patches 2021-07-28 21:59 ` Vladislav Shpilevoy via Tarantool-patches 2020-09-26 10:46 imeevma 2020-09-26 13:05 ` Vladislav Shpilevoy
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=20200928155559.GB14909@tarantool.org \ --to=korablev@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1 1/1] sql: remove OP_Realify' \ /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