Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: imeevma@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v5 3/6] sql: change comparison between numbers using index
Date: Fri, 18 Sep 2020 08:08:21 +0000	[thread overview]
Message-ID: <20200918080821.GI10599@tarantool.org> (raw)
In-Reply-To: <96a8dec05827608e00503fd33d2cb0d2a1076052.1598000242.git.imeevma@gmail.com>

On 21 Aug 12:19, imeevma@tarantool.org wrote:
> This patch disables number conversions in ApplyType in wherecode.c. This
> allows conversions between numbers introduced in previous commit to be
> used.
> 
> Part of #4230
> ---
>  src/box/sql/sqlInt.h                 |  2 +
>  src/box/sql/vdbe.c                   |  3 +-
>  src/box/sql/wherecode.c              | 76 +---------------------------
>  test/sql-tap/in4.test.lua            |  4 +-
>  test/sql-tap/join.test.lua           |  4 +-
>  test/sql-tap/tkt-9a8b09f8e6.test.lua |  8 +--
>  test/sql/types.result                | 54 ++++++++++++++++++++
>  test/sql/types.test.lua              | 12 +++++
>  8 files changed, 79 insertions(+), 84 deletions(-)
> 
> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index adf90d824..1e6f0f41f 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -2309,6 +2309,8 @@ struct Parse {
>  #define OPFLAG_SYSTEMSP      0x20	/* OP_Open**: set if space pointer
>  					 * points to system space.
>  					 */
> +/** OP_ApplyType: Do not convert numbers. */

Useless comment.

> +#define OPFLAG_DO_NOT_CONVERT_NUMBERS	0x01
> diff --git a/test/sql/types.result b/test/sql/types.result
> index 442245186..8810a9f82 100644
> --- a/test/sql/types.result
> +++ b/test/sql/types.result
> @@ -2795,3 +2795,57 @@ box.execute([[DROP TABLE ts;]])
>  ---
>  - row_count: 1
>  ...
> +--
> +-- gh-4230: Make sure the comparison between numbers that use
> +-- index is working correctly.
> +--
> +box.execute([[CREATE TABLE t (i INTEGER PRIMARY KEY, a DOUBLE);]])
> +---
> +- row_count: 1
> +...
> +box.execute([[INSERT INTO t VALUES (1, ?);]], {2^60})

I'd place also eqp statements to make sure that index is really used.

> +---
> +- row_count: 1
> +...

  reply	other threads:[~2020-09-18  8:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  9:19 [Tarantool-patches] [PATCH v5 0/6] sql; remove implicit cast for comparison imeevma
2020-08-21  9:19 ` [Tarantool-patches] [PATCH v5 1/6] sql: remove unused DOUBLE to INTEGER conversion imeevma
2020-09-17 14:48   ` Nikita Pettik
2020-09-28 15:50     ` Mergen Imeev
2020-08-21  9:19 ` [Tarantool-patches] [PATCH v5 2/6] sql: add implicit cast between numbers in OP_Seek* imeevma
2020-09-17 15:34   ` Nikita Pettik
2020-09-28 15:55     ` Mergen Imeev
2020-08-21  9:19 ` [Tarantool-patches] [PATCH v5 3/6] sql: change comparison between numbers using index imeevma
2020-09-18  8:08   ` Nikita Pettik [this message]
2020-09-28 16:10     ` Mergen Imeev
2020-08-21  9:19 ` [Tarantool-patches] [PATCH v5 4/6] sql: remove implicit cast from comparison opcodes imeevma
2020-08-21  9:19 ` [Tarantool-patches] [PATCH v5 5/6] sql: fix implicit cast in opcode MustBeInt imeevma
2020-08-21  9:19 ` [Tarantool-patches] [PATCH v5 6/6] sql: remove implicit cast from MakeRecord opcode imeevma
2020-09-18 12:28   ` Nikita Pettik
2020-09-28 16:19     ` Mergen Imeev

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=20200918080821.GI10599@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v5 3/6] sql: change comparison between numbers using index' \
    /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