Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts
@ 2021-08-02 17:25 Mergen Imeev via Tarantool-patches
  2021-08-02 17:25 ` [Tarantool-patches] [PATCH v2 1/3] sql: disallow explicit cast of BOOLEAN to number Mergen Imeev via Tarantool-patches
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mergen Imeev via Tarantool-patches @ 2021-08-02 17:25 UTC (permalink / raw)
  To: imun; +Cc: tarantool-patches

This patch fixes the explicit cast to comply with the new rules. According to
these rules, BOOLEAN and VARBINARY can no longer be cast to numeric types.

https://github.com/tarantool/tarantool/issues/4470
https://github.com/tarantool/tarantool/tree/imeevma/gh-4470-fix-explicit-cast

Changes in v2:
 - Change of str_to_bool() were moved in new patch.

Mergen Imeev (3):
  sql: disallow explicit cast of BOOLEAN to number
  sql: disallow explicit cast of VARBINARY to number
  sql: fix STRING to BOOLEAN explicit cast

 .../unreleased/gh-4470-explicit-cast.md       |   8 +
 src/box/sql/mem.c                             |  98 +++------
 test/sql-tap/cast.test.lua                    | 186 +++++++++++++++---
 test/sql-tap/cse.test.lua                     |  18 +-
 test/sql-tap/e_select1.test.lua               |   3 +-
 ...-4766-wrong-cast-from-blob-to-int.test.lua |  40 ----
 test/sql-tap/in1.test.lua                     |  17 +-
 test/sql-tap/misc3.test.lua                   |  12 +-
 test/sql-tap/numcast.test.lua                 |  18 +-
 test/sql/boolean.result                       |  71 +++----
 test/sql/boolean.test.sql                     |  13 +-
 test/sql/types.result                         |  14 +-
 12 files changed, 271 insertions(+), 227 deletions(-)
 create mode 100644 changelogs/unreleased/gh-4470-explicit-cast.md
 delete mode 100755 test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts
@ 2021-08-04  8:32 Mergen Imeev via Tarantool-patches
  2021-08-04  8:32 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches
  0 siblings, 1 reply; 7+ messages in thread
From: Mergen Imeev via Tarantool-patches @ 2021-08-04  8:32 UTC (permalink / raw)
  To: kyukhin; +Cc: tarantool-patches

This patch fixes the explicit cast to comply with the new rules. According to
these rules, BOOLEAN and VARBINARY can no longer be cast to numeric types.

https://github.com/tarantool/tarantool/issues/4470
https://github.com/tarantool/tarantool/tree/imeevma/gh-4470-fix-explicit-cast

Changes in v2:
 - Change of str_to_bool() were moved in new patch.

Mergen Imeev (3):
  sql: disallow explicit cast of BOOLEAN to number
  sql: disallow explicit cast of VARBINARY to number
  sql: fix STRING to BOOLEAN explicit cast

 .../unreleased/gh-4470-explicit-cast.md       |   8 +
 src/box/sql/mem.c                             |  98 +++------
 test/sql-tap/cast.test.lua                    | 186 +++++++++++++++---
 test/sql-tap/cse.test.lua                     |  18 +-
 test/sql-tap/e_select1.test.lua               |   3 +-
 ...-4766-wrong-cast-from-blob-to-int.test.lua |  40 ----
 test/sql-tap/in1.test.lua                     |  17 +-
 test/sql-tap/misc3.test.lua                   |  12 +-
 test/sql-tap/numcast.test.lua                 |  18 +-
 test/sql/boolean.result                       |  71 +++----
 test/sql/boolean.test.sql                     |  13 +-
 test/sql/types.result                         |  14 +-
 12 files changed, 271 insertions(+), 227 deletions(-)
 create mode 100644 changelogs/unreleased/gh-4470-explicit-cast.md
 delete mode 100755 test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts
@ 2021-07-30  7:11 Mergen Imeev via Tarantool-patches
  2021-07-30  7:11 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches
  0 siblings, 1 reply; 7+ messages in thread
From: Mergen Imeev via Tarantool-patches @ 2021-07-30  7:11 UTC (permalink / raw)
  To: tsafin; +Cc: tarantool-patches

This patch fixes the explicit cast to comply with the new rules. According to
these rules, BOOLEAN and VARBINARY values can no longer be cast to numeric
types, and numeric values can no longer be cast to BOOLEAN.

https://github.com/tarantool/tarantool/issues/4470
https://github.com/tarantool/tarantool/tree/imeevma/gh-4470-fix-explicit-cast

Changes in v2:
 - Change of str_to_bool() were moved in new patch.

Mergen Imeev (3):
  sql: disallow explicit cast of BOOLEAN to number
  sql: disallow explicit cast of VARBINARY to number
  sql: fix STRING to BOOLEAN explicit cast

 .../unreleased/gh-4470-explicit-cast.md       |   8 +
 src/box/sql/mem.c                             |  98 +++------
 test/sql-tap/cast.test.lua                    | 186 +++++++++++++++---
 test/sql-tap/cse.test.lua                     |  18 +-
 test/sql-tap/e_select1.test.lua               |   3 +-
 ...-4766-wrong-cast-from-blob-to-int.test.lua |  40 ----
 test/sql-tap/in1.test.lua                     |  17 +-
 test/sql-tap/misc3.test.lua                   |   2 +-
 test/sql-tap/numcast.test.lua                 |  18 +-
 test/sql/boolean.result                       |  71 +++----
 test/sql/boolean.test.sql                     |  13 +-
 test/sql/types.result                         |  14 +-
 12 files changed, 271 insertions(+), 217 deletions(-)
 create mode 100644 changelogs/unreleased/gh-4470-explicit-cast.md
 delete mode 100755 test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts
@ 2021-07-27 11:31 Mergen Imeev via Tarantool-patches
  2021-07-27 11:31 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches
  0 siblings, 1 reply; 7+ messages in thread
From: Mergen Imeev via Tarantool-patches @ 2021-07-27 11:31 UTC (permalink / raw)
  To: v.shpilevoy; +Cc: tarantool-patches

This patch fixes the explicit cast to comply with the new rules. According to
these rules, BOOLEAN and VARBINARY can no longer be cast to numeric types.

https://github.com/tarantool/tarantool/issues/4470
https://github.com/tarantool/tarantool/tree/imeevma/gh-4470-fix-explicit-cast

Changes in v2:
 - Change of str_to_bool() were moved in new patch.

Mergen Imeev (3):
  sql: disallow explicit cast of BOOLEAN to number
  sql: disallow explicit cast of VARBINARY to number
  sql: fix STRING to BOOLEAN explicit cast

 .../unreleased/gh-4470-explicit-cast.md       |   3 +
 src/box/sql/mem.c                             |  98 +++------
 test/sql-tap/cast.test.lua                    | 186 +++++++++++++++---
 test/sql-tap/cse.test.lua                     |  18 +-
 test/sql-tap/e_select1.test.lua               |   3 +-
 ...-4766-wrong-cast-from-blob-to-int.test.lua |  40 ----
 test/sql-tap/in1.test.lua                     |  17 +-
 test/sql-tap/misc3.test.lua                   |   2 +-
 test/sql-tap/numcast.test.lua                 |  18 +-
 test/sql/boolean.result                       |  71 +++----
 test/sql/boolean.test.sql                     |  13 +-
 test/sql/types.result                         |  14 +-
 12 files changed, 266 insertions(+), 217 deletions(-)
 create mode 100644 changelogs/unreleased/gh-4470-explicit-cast.md
 delete mode 100755 test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua

-- 
2.25.1


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

end of thread, other threads:[~2021-08-04  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 17:25 [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts Mergen Imeev via Tarantool-patches
2021-08-02 17:25 ` [Tarantool-patches] [PATCH v2 1/3] sql: disallow explicit cast of BOOLEAN to number Mergen Imeev via Tarantool-patches
2021-08-02 17:25 ` [Tarantool-patches] [PATCH v2 2/3] sql: disallow explicit cast of VARBINARY " Mergen Imeev via Tarantool-patches
2021-08-02 17:25 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches
  -- strict thread matches above, loose matches on Subject: below --
2021-08-04  8:32 [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts Mergen Imeev via Tarantool-patches
2021-08-04  8:32 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches
2021-07-30  7:11 [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts Mergen Imeev via Tarantool-patches
2021-07-30  7:11 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches
2021-07-27 11:31 [Tarantool-patches] [PATCH v2 0/3] Fix explicit casts Mergen Imeev via Tarantool-patches
2021-07-27 11:31 ` [Tarantool-patches] [PATCH v2 3/3] sql: fix STRING to BOOLEAN explicit cast Mergen Imeev via Tarantool-patches

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