[tarantool-patches] [PATCH 0/6] Introduce UNSIGNED type in SQL
Nikita Pettik
korablev at tarantool.org
Fri Jun 7 18:37:40 MSK 2019
Branch: https://github.com/tarantool/tarantool/tree/np/introduce-uint
Issues:
https://github.com/tarantool/tarantool/issues/3810
https://github.com/tarantool/tarantool/issues/4015
Current patch-set allows using UNSIGNED as a column type and operating
on integer values in range up to [2^64 - 1]. This means that result of
all basic routines such as arithmetic operations and built-in functions
is extended to unsigned range.
The basic idea under the hood is separating storing positive and
negative integers into different memory cells. We've added new
type of VDBE memory - MEM_UInt. Now all positive values are stored with
featuring this flag; in turn, negative integers have MEM_Int type.
It's quite similar to MP_* format types.
For more details see content of patches.
Nikita Pettik (6):
sql: refactor sql_atoi64()
sql: separate VDBE memory holding positive and negative ints
sql: refactor arithmetic operations to support unsigned ints
sql: make built-in functions operate on unsigned values
sql: introduce extended range for INTEGER type
sql: allow to specify UNSIGNED column type
extra/mkkeywordhash.c | 1 +
src/box/bind.c | 13 +-
src/box/bind.h | 1 +
src/box/errcode.h | 2 +-
src/box/execute.c | 19 +-
src/box/lua/execute.c | 9 +-
src/box/lua/lua_sql.c | 3 +
src/box/sql/build.c | 4 +-
src/box/sql/expr.c | 68 ++--
src/box/sql/func.c | 92 ++---
src/box/sql/main.c | 3 +-
src/box/sql/parse.y | 1 +
src/box/sql/pragma.c | 2 +-
src/box/sql/sqlInt.h | 97 ++---
src/box/sql/sqlLimit.h | 9 +
src/box/sql/util.c | 371 +++++++++---------
src/box/sql/vdbe.c | 268 ++++++++-----
src/box/sql/vdbe.h | 3 +-
src/box/sql/vdbeInt.h | 19 +-
src/box/sql/vdbeapi.c | 52 ++-
src/box/sql/vdbeaux.c | 60 ++-
src/box/sql/vdbemem.c | 149 ++++----
test/sql-tap/cast.test.lua | 8 +-
test/sql-tap/check.test.lua | 2 +-
test/sql-tap/cse.test.lua | 6 +-
test/sql-tap/default.test.lua | 2 +-
test/sql-tap/fkey2.test.lua | 4 +-
test/sql-tap/func.test.lua | 46 ++-
test/sql-tap/hexlit.test.lua | 2 +-
test/sql-tap/position.test.lua | 2 +-
test/sql-tap/sql-errors.test.lua | 4 +-
test/sql-tap/table.test.lua | 2 +-
test/sql-tap/tkt3493.test.lua | 4 +-
test/sql/bind.result | 46 ++-
test/sql/bind.test.lua | 4 +
test/sql/gh-2347-max-int-literals.result | 39 --
test/sql/gh-2347-max-int-literals.test.lua | 11 -
test/sql/integer-overflow.result | 77 +++-
test/sql/integer-overflow.test.lua | 10 +
test/sql/iproto.result | 6 +-
test/sql/types.result | 587 ++++++++++++++++++++++++++++-
test/sql/types.test.lua | 115 ++++++
42 files changed, 1602 insertions(+), 621 deletions(-)
delete mode 100644 test/sql/gh-2347-max-int-literals.result
delete mode 100644 test/sql/gh-2347-max-int-literals.test.lua
--
2.15.1
More information about the Tarantool-patches
mailing list