Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.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, 26 Jul 2021 22:58:05 +0200	[thread overview]
Message-ID: <a3c09ade-5642-5254-42d0-2ee28b723580@tarantool.org> (raw)
In-Reply-To: <d3eb393ab00a1879e70393bb6f0343f3896f6871.1627026774.git.imeevma@gmail.com>

Thanks for the patch!

See 2 comments below.

>  src/box/sql/expr.c                            | 13 -------
>  src/box/sql/vdbe.c                            | 17 --------
>  .../gh-5335-wrong-int-to-double-cast.test.lua | 39 +++++++++++++++++++

1. Please, add a changelog file.

> diff --git a/test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua b/test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua
> new file mode 100755
> index 000000000..efcae911c
> --- /dev/null
> +++ b/test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua
> @@ -0,0 +1,39 @@
> +#!/usr/bin/env tarantool
> +local test = require("sqltester")
> +test:plan(2)
> +
> +test:execsql([[
> +    CREATE TABLE t1 (i NUMBER PRIMARY KEY, n NUMBER);
> +    CREATE TABLE t2 (i NUMBER PRIMARY KEY, n NUMBER);
> +    CREATE TRIGGER r AFTER INSERT ON t1 FOR EACH ROW BEGIN UPDATE t1 SET n = new.n; END;
> +    INSERT INTO t1 VALUES (1, 1);
> +    INSERT INTO t2 VALUES (1, 1);
> +]])
> +
> +--
> +-- Make sure that implicit cast from string to integer works correctly in
> +-- arithmetic operations.

2. From string to integer? Where are the strings?

> +--
> +test:do_execsql_test(
> +    "gh-5335-1",
> +    [[
> +        SELECT i / 2, n / 2 FROM t1;
> +    ]], {
> +        0, 0
> +    })
> +
> +test:do_execsql_test(
> +    "gh-5335-2",
> +    [[
> +        SELECT i / 2, n / 2 FROM t2 GROUP BY n;
> +    ]], {
> +        0, 0
> +    })
> +
> +test:execsql([[
> +    DROP TRIGGER r;
> +    DROP TABLE t1;
> +    DROP TABLE t2;
> +]])
> +
> +test:finish_test()
> 

  reply	other threads:[~2021-07-26 20:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  7:54 Mergen Imeev via Tarantool-patches
2021-07-26 20:58 ` Vladislav Shpilevoy via Tarantool-patches [this message]
2021-07-27  8:53   ` Mergen Imeev via Tarantool-patches
2021-07-28 21:59     ` Vladislav Shpilevoy via Tarantool-patches
  -- 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
2020-09-26 14:15 imeevma
2020-09-28 15:55 ` Nikita Pettik
2020-09-28 16:41   ` Mergen Imeev
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=a3c09ade-5642-5254-42d0-2ee28b723580@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=v.shpilevoy@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