From: Mergen Imeev via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v1 0/7] Rework implicit cast Date: Wed, 28 Jul 2021 23:51:06 +0300 [thread overview] Message-ID: <cover.1627504972.git.imeevma@gmail.com> (raw) This patch-set reworks implicit cast in SQL according to new rules. According to these rules, all scalar values can be cast to SCALAR, all numeric values can be cast to NUMBER, and any numeric value can be cast to another numeric type only if the conversion is exact. No other implicit cast is allowed. https://github.com/tarantool/tarantool/issues/4230 https://github.com/tarantool/tarantool/issues/4470 https://github.com/tarantool/tarantool/tree/imeevma/gh-4230-remove-implicit-cast-for-comparison-v2 Mergen Imeev (7): sql: rework implicit cast fo assignment sql: remove implicit cast from comparison opcodes sql: rework OP_Seek* opcodes sql: remove unnecessary calls of OP_ApplyType sql: remove implicit cast from OP_MakeRecord sql: remove implicit cast from OP_MustBeInt sql: remove unused MEM cast functions .../gh-4230-implicit-cast-for-comparison.md | 3 + .../gh-4470-implicit-cast-for-assignment.md | 3 + src/box/sql.c | 69 +- src/box/sql/analyze.c | 7 +- src/box/sql/cursor.c | 14 - src/box/sql/cursor.h | 1 - src/box/sql/delete.c | 8 +- src/box/sql/expr.c | 9 +- src/box/sql/fk_constraint.c | 9 +- src/box/sql/func.c | 29 +- src/box/sql/insert.c | 14 - src/box/sql/mem.c | 618 ++++++-------- src/box/sql/mem.h | 89 +- src/box/sql/sqlInt.h | 4 - src/box/sql/tarantoolInt.h | 3 + src/box/sql/update.c | 14 +- src/box/sql/vdbe.c | 789 ++++++++---------- src/box/sql/vdbe.h | 2 +- src/box/sql/vdbeaux.c | 6 +- src/box/sql/where.c | 20 +- src/box/sql/wherecode.c | 217 +---- src/box/sql/whereexpr.c | 4 +- test/sql-tap/cast.test.lua | 152 +++- test/sql-tap/func5.test.lua | 6 +- test/sql-tap/identifier_case.test.lua | 10 +- test/sql-tap/in1.test.lua | 15 +- test/sql-tap/in3.test.lua | 4 +- test/sql-tap/in4.test.lua | 4 +- test/sql-tap/index1.test.lua | 4 +- test/sql-tap/insert3.test.lua | 2 +- test/sql-tap/join.test.lua | 8 +- test/sql-tap/misc1.test.lua | 45 +- test/sql-tap/numcast.test.lua | 4 +- test/sql-tap/select1.test.lua | 6 +- test/sql-tap/select7.test.lua | 2 +- test/sql-tap/sql-errors.test.lua | 4 +- test/sql-tap/subquery.test.lua | 4 +- test/sql-tap/tkt-9a8b09f8e6.test.lua | 54 +- test/sql-tap/tkt3493.test.lua | 54 +- test/sql-tap/transitive1.test.lua | 16 +- test/sql-tap/uuid.test.lua | 68 +- test/sql-tap/where2.test.lua | 143 +--- test/sql-tap/where5.test.lua | 12 +- test/sql/boolean.result | 220 ++--- test/sql/types.result | 10 +- 45 files changed, 1076 insertions(+), 1703 deletions(-) create mode 100644 changelogs/unreleased/gh-4230-implicit-cast-for-comparison.md create mode 100644 changelogs/unreleased/gh-4470-implicit-cast-for-assignment.md -- 2.25.1
next reply other threads:[~2021-07-28 20:51 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-28 20:51 Mergen Imeev via Tarantool-patches [this message] 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 1/7] sql: rework implicit cast fo assignment Mergen Imeev via Tarantool-patches 2021-07-30 21:55 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-04 22:21 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-05 23:27 ` Mergen Imeev via Tarantool-patches 2021-08-06 0:13 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 2/7] sql: remove implicit cast from comparison opcodes Mergen Imeev via Tarantool-patches 2021-08-04 22:24 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-05 23:33 ` Mergen Imeev via Tarantool-patches 2021-08-06 0:13 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 3/7] sql: rework OP_Seek* opcodes Mergen Imeev via Tarantool-patches 2021-08-04 22:25 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-05 23:40 ` Mergen Imeev via Tarantool-patches 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 4/7] sql: remove unnecessary calls of OP_ApplyType Mergen Imeev via Tarantool-patches 2021-08-04 22:26 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-05 23:41 ` Mergen Imeev via Tarantool-patches 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 5/7] sql: remove implicit cast from OP_MakeRecord Mergen Imeev via Tarantool-patches 2021-08-04 22:27 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-05 23:43 ` Mergen Imeev via Tarantool-patches 2021-08-06 0:13 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 6/7] sql: remove implicit cast from OP_MustBeInt Mergen Imeev via Tarantool-patches 2021-08-05 23:47 ` Mergen Imeev via Tarantool-patches 2021-07-28 20:51 ` [Tarantool-patches] [PATCH v1 7/7] sql: remove unused MEM cast functions Mergen Imeev via Tarantool-patches 2021-08-04 22:27 ` Vladislav Shpilevoy via Tarantool-patches 2021-08-05 23:45 ` Mergen Imeev via Tarantool-patches
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.1627504972.git.imeevma@gmail.com \ --to=tarantool-patches@dev.tarantool.org \ --cc=imeevma@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1 0/7] Rework 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