From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 644C223FEE for ; Tue, 8 May 2018 03:56:19 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 48a5pjbHfjxi for ; Tue, 8 May 2018 03:56:19 -0400 (EDT) Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [217.69.128.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 6B7221FA33 for ; Tue, 8 May 2018 03:56:17 -0400 (EDT) From: Kirill Yukhin Subject: [tarantool-patches] [PATCH 0/2] sql: replace KeyInfo w/ key_def in SQL front-end Date: Tue, 8 May 2018 10:56:05 +0300 Message-Id: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: v.shpilevoy@tarantool.org Cc: tarantool-patches@freelists.org, Kirill Yukhin 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