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 4E21B29275 for ; Thu, 29 Mar 2018 02:42:20 -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 rJY8op02mJeH for ; Thu, 29 Mar 2018 02:42:20 -0400 (EDT) Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 962EA28439 for ; Thu, 29 Mar 2018 02:42:19 -0400 (EDT) From: Kirill Yukhin Subject: [tarantool-patches] [PATCH 0/3] sql: move column's default value to Tarantool's core Date: Thu, 29 Mar 2018 09:42: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 This patches-set consists of 3 almost independent patches: 1. It adds a nullable field to space _schema, which will make it easier to use from within SQL engine. 2. [tiny] Remove couple of dead functions from SQL engine. 3. [main] Moves DEFAULT values, both string and compiled AST to Tarantool's core. New routine which will allow to compile SQL-context free expressions was introduced. Compiled AST is stored inside space_def and allocated using single top-most malloc(). NB1: It should be mentioned, that duplication routines for expressions are not elegant enough to do single malloc(), it allocates nodes on demand and this may and will be refactored. Issue to be submitted. NB2: Handle `struct sqlite3 *` use used only for regacy memory allocation. And should be removed from all API parameters, after we'll choose right allocator and emply it. Another issue to be submitted. Branch: https://github.com/tarantool/tarantool/tree/kyukhin/gh-3235-move-default Issue: https://github.com/tarantool/tarantool/issues/3235 Kirill Yukhin (3): Add value field to _schema space sql: remove dead find DB functions. sql: move default col values to Tarantool's core src/CMakeLists.txt | 2 +- src/box/alter.cc | 17 + src/box/bootstrap.snap | Bin 1638 -> 1657 bytes src/box/box.cc | 3 +- src/box/field_def.c | 5 +- src/box/field_def.h | 4 + src/box/lua/upgrade.lua | 14 +- src/box/space_def.c | 105 ++++-- src/box/space_def.h | 10 +- src/box/sql.c | 64 +++- src/box/sql.h | 30 ++ src/box/sql/build.c | 48 +-- src/box/sql/delete.c | 12 +- src/box/sql/expr.c | 114 +++--- src/box/sql/fkey.c | 13 +- src/box/sql/insert.c | 32 +- src/box/sql/main.c | 15 - src/box/sql/parse.c | 876 ++++++++++++++++++++++--------------------- src/box/sql/parse.y | 32 +- src/box/sql/resolve.c | 12 +- src/box/sql/select.c | 28 +- src/box/sql/sqliteInt.h | 11 +- src/box/sql/tokenize.c | 121 ++++++ src/box/sql/trigger.c | 12 +- src/box/sql/update.c | 2 +- src/box/sql/wherecode.c | 2 +- src/box/sql/whereexpr.c | 6 +- test/box-py/bootstrap.result | 3 +- test/box/access_misc.result | 3 +- test/xlog/upgrade.result | 3 +- 30 files changed, 948 insertions(+), 651 deletions(-) -- 2.11.0