Tarantool development patches archive
 help / color / mirror / Atom feed
From: imeevma@tarantool.org
To: korablev@tarantool.org, tsafin@tarantool.org,
	tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v6 00/22] sql: change implicit cast
Date: Thu, 16 Jul 2020 17:45:42 +0300	[thread overview]
Message-ID: <cover.1594909974.git.imeevma@gmail.com> (raw)

This patch-set changes implicit cast for assignment and removes implicit
cast for comparison.

https://github.com/tarantool/tarantool/issues/3809
https://github.com/tarantool/tarantool/issues/4230
https://github.com/tarantool/tarantool/tree/imeevma/gh-3809-disallow-imlicit-cast-from-string-to-nums

@ChangeLog
 - [Breaking change] Define new rules for implicit cast for assignment (gh-3809).

v2:
 - Added a commit that changes the type mismatch error
   description.

v3:
 - Introduction of mem_set_double() was moved to another commit.
 - Implicit cast rules for assigning were changed.

v4:
 - Added type checking and implicit casting of arguments to
   built-in functions.
 - Removed unnecessary patches from the set.
 - Now this patch-set fixes implicit cast only for assignment.

v5:
 - Removed unnecessary patches from the set.
 - The patch that changes the type checking of arguments to
   built-in functions is divided into 15 patches.

v6:
 - Removal of implicit cast for comparison returned in patch-set.

Mergen Imeev (22):
  sql: change implicit cast for assignment
  sql: use ApplyType to check function arguments
  sql: check args of abs()
  sql: check args of avg(), sum() and total()
  sql: check args of char()
  sql: check args of length()
  sql: check operands of LIKE
  sql: check args of lower() and upper()
  sql: check args of position()
  sql: check args of randomblob()
  sql: check args of replace()
  sql: check args of round()
  sql: check args of soundex()
  sql: check args of substr()
  sql: check args of unicode()
  sql: check args of zeroblob()
  sql: remove unused DOUBLE to INTEGER conversion
  sql: add implicit cast between numbers in OP_Seek*
  sql: change comparison between numbers using index
  sql: remove implicit cast from comparison opcodes
  sql: fix implicit cast in opcode MustBeInt
  sql: remove implicit cast from MakeRecord opcode

 src/box/sql/analyze.c                 |   6 +-
 src/box/sql/delete.c                  |  15 +-
 src/box/sql/expr.c                    |  19 +-
 src/box/sql/fk_constraint.c           |  12 +-
 src/box/sql/func.c                    | 437 +++++++----
 src/box/sql/select.c                  |  61 +-
 src/box/sql/sqlInt.h                  |  36 +
 src/box/sql/update.c                  |  23 +-
 src/box/sql/vdbe.c                    | 682 +++++++++++++-----
 src/box/sql/vdbeInt.h                 |   4 +
 src/box/sql/wherecode.c               | 103 +--
 test/sql-tap/autoinc.test.lua         |   2 +-
 test/sql-tap/cse.test.lua             |   8 +-
 test/sql-tap/default.test.lua         |   6 +-
 test/sql-tap/e_select1.test.lua       |  27 +-
 test/sql-tap/func.test.lua            |  44 +-
 test/sql-tap/func2.test.lua           |  18 +-
 test/sql-tap/func5.test.lua           | 936 +++++++++++++++++++++++-
 test/sql-tap/identifier_case.test.lua |   6 +-
 test/sql-tap/in1.test.lua             |   4 +-
 test/sql-tap/in3.test.lua             |  38 +-
 test/sql-tap/in4.test.lua             | 100 +--
 test/sql-tap/index1.test.lua          |  24 +-
 test/sql-tap/insert3.test.lua         |  12 +-
 test/sql-tap/intpkey.test.lua         | 133 +---
 test/sql-tap/join.test.lua            |   8 +-
 test/sql-tap/limit.test.lua           |   2 +-
 test/sql-tap/minmax2.test.lua         |   6 +-
 test/sql-tap/misc1.test.lua           |  56 +-
 test/sql-tap/numcast.test.lua         |   6 +-
 test/sql-tap/orderby1.test.lua        |   2 +-
 test/sql-tap/position.test.lua        |   6 +-
 test/sql-tap/select1.test.lua         |  12 +-
 test/sql-tap/select4.test.lua         |  12 +-
 test/sql-tap/select7.test.lua         |   4 +-
 test/sql-tap/sort.test.lua            |   8 +-
 test/sql-tap/subquery.test.lua        |  73 +-
 test/sql-tap/tkt-3998683a16.test.lua  |  26 +-
 test/sql-tap/tkt-54844eea3f.test.lua  |   8 +-
 test/sql-tap/tkt-7bbfb7d442.test.lua  |   4 +-
 test/sql-tap/tkt-9a8b09f8e6.test.lua  | 528 --------------
 test/sql-tap/tkt-f973c7ac31.test.lua  |  18 +-
 test/sql-tap/tkt-fc7bd6358f.test.lua  | 111 ---
 test/sql-tap/tkt1444.test.lua         |   4 +-
 test/sql-tap/tkt3493.test.lua         |  46 +-
 test/sql-tap/tkt3841.test.lua         |  12 +-
 test/sql-tap/transitive1.test.lua     |  16 +-
 test/sql-tap/triggerA.test.lua        |   4 +-
 test/sql-tap/unique.test.lua          |   8 +-
 test/sql-tap/view.test.lua            |   2 +-
 test/sql-tap/where2.test.lua          | 183 +----
 test/sql-tap/where5.test.lua          |  22 +-
 test/sql-tap/whereB.test.lua          | 908 -----------------------
 test/sql-tap/whereC.test.lua          |   8 +-
 test/sql/boolean.result               | 108 +--
 test/sql/collation.result             |   2 +-
 test/sql/types.result                 | 994 ++++++++++++++++++++++++--
 test/sql/types.test.lua               | 199 ++++++
 58 files changed, 3276 insertions(+), 2886 deletions(-)
 delete mode 100755 test/sql-tap/tkt-9a8b09f8e6.test.lua
 delete mode 100755 test/sql-tap/tkt-fc7bd6358f.test.lua
 delete mode 100755 test/sql-tap/whereB.test.lua

-- 
2.25.1

             reply	other threads:[~2020-07-16 14:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 14:45 imeevma [this message]
2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 01/22] sql: change implicit cast for assignment imeevma
2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 02/22] sql: use ApplyType to check function arguments imeevma
2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 03/22] sql: check args of abs() imeevma
2020-07-16 16:12   ` Nikita Pettik
2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 04/22] sql: check args of avg(), sum() and total() imeevma
2020-07-16 16:21   ` Nikita Pettik
2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 05/22] sql: check args of char() imeevma
2020-07-16 16:27   ` Nikita Pettik
2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 06/22] sql: check args of length() imeevma
2020-07-16 16:31   ` Nikita Pettik
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 07/22] sql: check operands of LIKE imeevma
2020-07-16 17:03   ` Nikita Pettik
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 08/22] sql: check args of lower() and upper() imeevma
2020-07-16 17:09   ` Nikita Pettik
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 09/22] sql: check args of position() imeevma
2020-07-16 17:28   ` Nikita Pettik
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 10/22] sql: check args of randomblob() imeevma
2020-07-16 17:28   ` Nikita Pettik
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 11/22] sql: check args of replace() imeevma
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 12/22] sql: check args of round() imeevma
2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 13/22] sql: check args of soundex() imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 14/22] sql: check args of substr() imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 15/22] sql: check args of unicode() imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 16/22] sql: check args of zeroblob() imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 17/22] sql: remove unused DOUBLE to INTEGER conversion imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 18/22] sql: add implicit cast between numbers in OP_Seek* imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 19/22] sql: change comparison between numbers using index imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 20/22] sql: remove implicit cast from comparison opcodes imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 21/22] sql: fix implicit cast in opcode MustBeInt imeevma
2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 22/22] sql: remove implicit cast from MakeRecord opcode imeevma

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=cover.1594909974.git.imeevma@gmail.com \
    --to=imeevma@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tsafin@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v6 00/22] sql: change implicit cast' \
    /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