[tarantool-patches] [PATCH 0/2] sql: replace KeyInfo w/ key_def in SQL front-end
Kirill Yukhin
kyukhin at tarantool.org
Tue May 8 10:56:05 MSK 2018
Branch: https://github.com/tarantool/tarantool/issues/3235
Issue: https://github.com/tarantool/tarantool/tree/kyukhin/gh-3235-remove-keyinfo
This patch-set was originally aimed to move sort order column from
SQL front-end legacy structures to Tarantool's core structures.
So, first patch introduces this new field to key_part/key_def
structures.
After half of work was done, I've realized, that KeyInfo structure
is completely redundant and might be superseded by Tarantool's
key_def structure. Second patch is doing that.
It should be mentioned, that KeyInfo memory management was based
on reference counting and many memory copies were avoided. Right
not, key_def is always duplicated. This will be fixed in future,
since this is obvious performance issue.
Kirill Yukhin (2):
sql: introduce sort order to key_part/key_part_def
sql: replace KeyInfo with key_def
src/box/key_def.cc | 28 +++-
src/box/key_def.h | 16 +-
src/box/schema.cc | 30 ++--
src/box/sql.c | 28 +++-
src/box/sql/analyze.c | 6 +-
src/box/sql/build.c | 114 ++++++-------
src/box/sql/delete.c | 6 +-
src/box/sql/expr.c | 61 ++++---
src/box/sql/fkey.c | 2 +-
src/box/sql/insert.c | 15 +-
src/box/sql/parse.y | 10 +-
src/box/sql/pragma.c | 11 +-
src/box/sql/select.c | 381 ++++++++++++++++++------------------------
src/box/sql/sqliteInt.h | 70 ++++----
src/box/sql/tarantoolInt.h | 5 +-
src/box/sql/update.c | 6 +-
src/box/sql/vdbe.c | 80 +++++----
src/box/sql/vdbe.h | 35 ++--
src/box/sql/vdbeInt.h | 13 +-
src/box/sql/vdbeapi.c | 183 --------------------
src/box/sql/vdbeaux.c | 247 ++++++++++-----------------
src/box/sql/vdbemem.c | 14 +-
src/box/sql/vdbesort.c | 54 +++---
src/box/sql/where.c | 32 ++--
src/box/sql/wherecode.c | 12 +-
src/box/tuple.c | 9 +
src/box/tuple.h | 9 +
test/sql-tap/index1.test.lua | 2 +
test/sql-tap/index4.test.lua | 1 +
test/sql-tap/selectA.test.lua | 1 +
30 files changed, 631 insertions(+), 850 deletions(-)
--
2.16.2
More information about the Tarantool-patches
mailing list