Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 00/10] sql: properly check arguments types of built-in functions
@ 2020-08-14 15:04 imeevma
  2020-08-14 15:04 ` [Tarantool-patches] [PATCH v2 01/10] sql: do not return UNSIGNED in " imeevma
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: imeevma @ 2020-08-14 15:04 UTC (permalink / raw)
  To: v.shpilevoy, tsafin; +Cc: tarantool-patches

This patch-set makes SQL to use the ApplyType opcode to validate the argument
types of built-in functions.

https://github.com/tarantool/tarantool/issues/4159
https://github.com/tarantool/tarantool/tree/imeevma/gh-4159-rework-sql-builtins

@ChangeLog
 - Built-in function argument types are now properly checked (gh-4159).

Changes in v2:
 - Changed an approach to check types of STRING/VARBINARY arguments.
 - Added a new patch that changes signature of trim().

Mergen Imeev (10):
  sql: do not return UNSIGNED in built-in functions
  sql: fix functions return types
  sql: change signature of trim()
  box: add new options for functions
  sql: use has_vararg for built-in functions
  sql: add overloaded versions of the functions
  sql: move built-in function definitions in _func
  box: add param_list to 'struct func'
  sql: check built-in functions argument types
  sql: refactor sql/func.c

 src/box/alter.cc               |   12 +-
 src/box/bootstrap.snap         |  Bin 5976 -> 6446 bytes
 src/box/func.c                 |    1 +
 src/box/func_def.c             |   13 +
 src/box/func_def.h             |   20 +
 src/box/lua/call.c             |    2 +
 src/box/lua/upgrade.lua        |  192 ++++
 src/box/sql/analyze.c          |    6 +-
 src/box/sql/expr.c             |   33 +-
 src/box/sql/func.c             |  879 +++---------------
 src/box/sql/parse.y            |   35 +-
 src/box/sql/resolve.c          |    2 +-
 src/box/sql/select.c           |   26 +
 src/box/sql/sqlInt.h           |   19 +-
 src/box/sql/vdbeapi.c          |    2 +-
 src/box/sql/vdbemem.c          |    2 +-
 test/box-py/bootstrap.result   |    6 +-
 test/box/access.result         |    2 +-
 test/box/access.test.lua       |    2 +-
 test/box/access_bin.result     |    2 +-
 test/box/access_bin.test.lua   |    2 +-
 test/box/access_sysview.result |    8 +-
 test/box/function1.result      |    6 +-
 test/sql-tap/cse.test.lua      |   24 +-
 test/sql-tap/func.test.lua     |   46 +-
 test/sql-tap/orderby1.test.lua |    2 +-
 test/sql-tap/position.test.lua |   16 +-
 test/sql-tap/substr.test.lua   |    2 +-
 test/sql/boolean.result        |   32 +-
 test/sql/checks.result         |    8 -
 test/sql/checks.test.lua       |    2 -
 test/sql/collation.result      |    8 +
 test/sql/collation.test.lua    |    1 +
 test/sql/types.result          | 1547 +++++++++++++++++++++++++++++++-
 test/sql/types.test.lua        |  264 ++++++
 test/wal_off/func_max.result   |    8 +-
 36 files changed, 2290 insertions(+), 942 deletions(-)

-- 
2.25.1

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

end of thread, other threads:[~2020-08-22 14:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 15:04 [Tarantool-patches] [PATCH v2 00/10] sql: properly check arguments types of built-in functions imeevma
2020-08-14 15:04 ` [Tarantool-patches] [PATCH v2 01/10] sql: do not return UNSIGNED in " imeevma
2020-08-22 14:23   ` Vladislav Shpilevoy
2020-08-14 15:04 ` [Tarantool-patches] [PATCH v2 02/10] sql: fix functions return types imeevma
2020-08-22 14:24   ` Vladislav Shpilevoy
2020-08-14 15:04 ` [Tarantool-patches] [PATCH v2 03/10] sql: change signature of trim() imeevma
2020-08-22 14:26   ` Vladislav Shpilevoy
2020-08-14 15:04 ` [Tarantool-patches] [PATCH v2 04/10] box: add new options for functions imeevma
2020-08-22 14:28   ` Vladislav Shpilevoy
2020-08-14 15:05 ` [Tarantool-patches] [PATCH v2 05/10] sql: use has_vararg for built-in functions imeevma
2020-08-14 15:05 ` [Tarantool-patches] [PATCH v2 06/10] sql: add overloaded versions of the functions imeevma
2020-08-22 14:29   ` Vladislav Shpilevoy
2020-08-14 15:05 ` [Tarantool-patches] [PATCH v2 07/10] sql: move built-in function definitions in _func imeevma
2020-08-22 14:30   ` Vladislav Shpilevoy
2020-08-14 15:05 ` [Tarantool-patches] [PATCH v2 08/10] box: add param_list to 'struct func' imeevma
2020-08-22 14:30   ` Vladislav Shpilevoy
2020-08-14 15:05 ` [Tarantool-patches] [PATCH v2 09/10] sql: check built-in functions argument types imeevma
2020-08-14 15:05 ` [Tarantool-patches] [PATCH v2 10/10] sql: refactor sql/func.c imeevma
2020-08-22 14:31   ` Vladislav Shpilevoy
2020-08-22 14:25 ` [Tarantool-patches] [PATCH v2 00/10] sql: properly check arguments types of built-in functions Vladislav Shpilevoy

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