Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 0/7] Remove implicit cast
@ 2020-06-17 12:36 imeevma
  2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 1/7] sql: remove implicit cast for assignment imeevma
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: imeevma @ 2020-06-17 12:36 UTC (permalink / raw)
  To: korablev, tsafin, tarantool-patches

This patch-set removes implicit cast between string and numbers
for assignment and 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] Removed implicit cast from string to numbers
   and vice versa for assignment and comparison.

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

Mergen Imeev (7):
  sql: remove implicit cast for assignment
  sql: remove mem_apply_type() from OP_MakeRecord
  sql: replace ApplyType by CheckType for IN operator
  sql: remove mem_apply_type() from OP_MustBeInt
  sql: remove implicit cast from string for comparison
  sql: remove OP_ApplyType
  sql: use type instead of value in type mismatch error

 src/box/sql/analyze.c                         |    7 +-
 src/box/sql/delete.c                          |    8 +-
 src/box/sql/expr.c                            |   53 +-
 src/box/sql/fk_constraint.c                   |    9 +-
 src/box/sql/func.c                            |    8 +-
 src/box/sql/insert.c                          |   16 +-
 src/box/sql/select.c                          |   25 +-
 src/box/sql/sqlInt.h                          |   35 -
 src/box/sql/update.c                          |   14 +-
 src/box/sql/vdbe.c                            |  273 +++--
 src/box/sql/vdbeInt.h                         |    5 +
 src/box/sql/vdbemem.c                         |   18 +-
 src/box/sql/wherecode.c                       |  211 +---
 test/sql-tap/autoinc.test.lua                 |    6 +-
 test/sql-tap/cast.test.lua                    |   16 +-
 test/sql-tap/default.test.lua                 |    6 +-
 test/sql-tap/e_select1.test.lua               |   27 +-
 .../gh-3809-implicit-cast-assignment.test.lua |  649 +++++++++++
 .../gh-4230-del-impl-cast-str-to-num.test.lua |  281 +++++
 ...-4766-wrong-cast-from-blob-to-int.test.lua |    9 +-
 test/sql-tap/identifier_case.test.lua         |    6 +-
 test/sql-tap/in1.test.lua                     |    4 +-
 test/sql-tap/in3.test.lua                     |   18 +-
 test/sql-tap/in4.test.lua                     |  100 +-
 test/sql-tap/index1.test.lua                  |   28 +-
 test/sql-tap/insert3.test.lua                 |   12 +-
 test/sql-tap/intpkey.test.lua                 |   37 +-
 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                   |   66 +-
 test/sql-tap/numcast.test.lua                 |    6 +-
 test/sql-tap/select1.test.lua                 |   18 +-
 test/sql-tap/select4.test.lua                 |   12 +-
 test/sql-tap/select5.test.lua                 |    2 +-
 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-80e031a00f.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                       | 1032 ++++++++---------
 test/sql/integer-overflow.result              |    4 +-
 test/sql/persistency.result                   |    2 +-
 test/sql/types.result                         |   57 +-
 test/sql/types.test.lua                       |    1 -
 61 files changed, 1915 insertions(+), 3179 deletions(-)
 create mode 100755 test/sql-tap/gh-3809-implicit-cast-assignment.test.lua
 create mode 100755 test/sql-tap/gh-4230-del-impl-cast-str-to-num.test.lua
 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

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [Tarantool-patches] [PATCH v2 0/7] Remove implicit cast
@ 2020-06-11 12:54 imeevma
  0 siblings, 0 replies; 17+ messages in thread
From: imeevma @ 2020-06-11 12:54 UTC (permalink / raw)
  To: v.shpilevoy, tsafin, tarantool-patches

This patch-set removes implicit cast between string and numbers
for assignment and 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] Removed implicit cast from string to numbers
   and vice versa for assignment and comparison.

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

Mergen Imeev (7):
  sql: remove implicit cast for assignment
  sql: remove mem_apply_type() from OP_MakeRecord
  sql: replace ApplyType by CheckType for IN operator
  sql: remove mem_apply_type() from OP_MustBeInt
  sql: remove implicit cast from string for comparison
  sql: remove OP_ApplyType
  sql: use type instead of value in type mismatch error

 src/box/sql/analyze.c                         |    7 +-
 src/box/sql/delete.c                          |    8 +-
 src/box/sql/expr.c                            |   53 +-
 src/box/sql/fk_constraint.c                   |    9 +-
 src/box/sql/insert.c                          |   16 +-
 src/box/sql/select.c                          |   25 +-
 src/box/sql/sqlInt.h                          |   25 -
 src/box/sql/update.c                          |   14 +-
 src/box/sql/vdbe.c                            |  273 +++--
 src/box/sql/vdbeInt.h                         |    5 +
 src/box/sql/vdbemem.c                         |    7 +
 src/box/sql/wherecode.c                       |  211 +---
 test/sql-tap/autoinc.test.lua                 |    6 +-
 test/sql-tap/cast.test.lua                    |   16 +-
 test/sql-tap/default.test.lua                 |    6 +-
 test/sql-tap/e_select1.test.lua               |   27 +-
 .../gh-3809-implicit-cast-assignment.test.lua |  649 +++++++++++
 .../gh-4230-del-impl-cast-str-to-num.test.lua |  281 +++++
 ...-4766-wrong-cast-from-blob-to-int.test.lua |    9 +-
 test/sql-tap/identifier_case.test.lua         |    6 +-
 test/sql-tap/in1.test.lua                     |    4 +-
 test/sql-tap/in3.test.lua                     |   18 +-
 test/sql-tap/in4.test.lua                     |  100 +-
 test/sql-tap/index1.test.lua                  |   28 +-
 test/sql-tap/insert3.test.lua                 |   12 +-
 test/sql-tap/intpkey.test.lua                 |   37 +-
 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                   |   66 +-
 test/sql-tap/numcast.test.lua                 |    6 +-
 test/sql-tap/select1.test.lua                 |   16 +-
 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-80e031a00f.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                       | 1026 ++++++++---------
 test/sql/integer-overflow.result              |    4 +-
 test/sql/persistency.result                   |    2 +-
 test/sql/types.result                         |   57 +-
 test/sql/types.test.lua                       |    1 -
 59 files changed, 1906 insertions(+), 3149 deletions(-)
 create mode 100755 test/sql-tap/gh-3809-implicit-cast-assignment.test.lua
 create mode 100755 test/sql-tap/gh-4230-del-impl-cast-str-to-num.test.lua
 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-06-23  6:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 12:36 [Tarantool-patches] [PATCH v2 0/7] Remove implicit cast imeevma
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 1/7] sql: remove implicit cast for assignment imeevma
2020-06-22  8:23   ` Nikita Pettik
2020-06-22 20:47     ` Vladislav Shpilevoy
2020-06-22 21:08       ` Nikita Pettik
2020-06-23  6:44         ` Mergen Imeev
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 2/7] sql: remove mem_apply_type() from OP_MakeRecord imeevma
2020-06-22  8:48   ` Nikita Pettik
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 3/7] sql: replace ApplyType by CheckType for IN operator imeevma
2020-06-22  9:32   ` Nikita Pettik
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 4/7] sql: remove mem_apply_type() from OP_MustBeInt imeevma
2020-06-22 10:07   ` Nikita Pettik
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 5/7] sql: remove implicit cast from string for comparison imeevma
2020-06-22 12:25   ` Nikita Pettik
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 6/7] sql: remove OP_ApplyType imeevma
2020-06-17 12:36 ` [Tarantool-patches] [PATCH v2 7/7] sql: use type instead of value in type mismatch error imeevma
  -- strict thread matches above, loose matches on Subject: below --
2020-06-11 12:54 [Tarantool-patches] [PATCH v2 0/7] Remove implicit cast imeevma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox