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 6D9462A3F2 for ; Thu, 23 Aug 2018 18:56:14 -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 24X11zQy56Ib for ; Thu, 23 Aug 2018 18:56:14 -0400 (EDT) Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 D458D2A330 for ; Thu, 23 Aug 2018 18:56:13 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH 0/7] Finish SQL DD integration Date: Fri, 24 Aug 2018 01:55:46 +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: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik Branch: https://github.com/tarantool/tarantool/tree/np/gh-3561-finish-DD-integration Issue: https://github.com/tarantool/tarantool/issues/3561 https://github.com/tarantool/tarantool/issues/2217 Current patch-set is last in series and finishes SQL DD integration. In second patch we get rid of SQLite struct index. Instead, we move struct space to struct Table and maintain array of surrogate indexes, which in turn basically contain only index_def's. Also, it allowed to use indef_def throughout query planner. Fifth patch substitutes lookups in table hash with lookups in space hash and wrapping that space in struct Table in order to avoid enormous code refactoring. Finally, in the last patch a lot of SQLite specific routines have been removed: callback function invoked during OP_ParseSchema and opcode itself; OP_DropIndex and OP_DropTable; struct Schema and so forth. Nikita Pettik (7): sql: remove struct schema from struct Table sql: remove SQLite original struct Index sql: remove struct Table from analyze routine sql: refactor ALTER RENAME code generation sql: remove lookups in Table hash sql: don't add system spaces to Table hash sql: finish DD integration src/box/alter.cc | 15 +- src/box/sql.c | 193 ++----- src/box/sql.h | 3 +- src/box/sql/alter.c | 114 ++-- src/box/sql/analyze.c | 233 ++++---- src/box/sql/build.c | 918 +++++++------------------------ src/box/sql/callback.c | 42 -- src/box/sql/delete.c | 96 ++-- src/box/sql/expr.c | 123 +---- src/box/sql/fkey.c | 15 +- src/box/sql/insert.c | 134 ++--- src/box/sql/main.c | 1 - src/box/sql/parse.y | 10 +- src/box/sql/pragma.c | 355 ++++++------ src/box/sql/prepare.c | 131 ----- src/box/sql/select.c | 58 +- src/box/sql/sqliteInt.h | 151 ++--- src/box/sql/status.c | 16 - src/box/sql/tarantoolInt.h | 54 +- src/box/sql/trigger.c | 15 +- src/box/sql/update.c | 13 +- src/box/sql/vdbe.c | 100 ---- src/box/sql/vdbe.h | 7 +- src/box/sql/vdbeaux.c | 12 +- src/box/sql/vdbemem.c | 28 +- src/box/sql/where.c | 381 ++++++------- src/box/sql/whereInt.h | 8 +- src/box/sql/wherecode.c | 167 +++--- test/sql-tap/alter.test.lua | 4 +- test/sql-tap/analyze1.test.lua | 2 +- test/sql-tap/analyze3.test.lua | 2 +- test/sql-tap/analyze7.test.lua | 8 +- test/sql-tap/analyze9.test.lua | 12 +- test/sql-tap/analyzeF.test.lua | 2 +- test/sql-tap/eqp.test.lua | 14 +- test/sql-tap/gh-2996-indexed-by.test.lua | 10 +- test/sql-tap/index1.test.lua | 2 +- test/sql-tap/join.test.lua | 6 +- test/sql-tap/lua-tables.test.lua | 8 +- test/sql/delete.result | 4 +- 40 files changed, 1121 insertions(+), 2346 deletions(-) -- 2.15.1