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 E7AE324E57 for ; Thu, 31 May 2018 13:37:01 -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 5AIe10zc8Vxz for ; Thu, 31 May 2018 13:37:01 -0400 (EDT) Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (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 5662A24F73 for ; Thu, 31 May 2018 13:36:51 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 0/4] sql: remove Triggers to server References: From: Vladislav Shpilevoy Message-ID: <332af132-b45b-f7c5-e7ab-d9607cca6c79@tarantool.org> Date: Thu, 31 May 2018 20:36:48 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Kirill Shcherbatov , tarantool-patches@freelists.org Hello. Thanks for the patchset! On 31/05/2018 14:22, Kirill Shcherbatov wrote: > Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3273-no-sql-triggers > Issue: https://github.com/tarantool/tarantool/issues/3273 > > As we are going to call parser on box.cfg() to recreate triggers > from SQL, we should initialize Schema as it used in sqlite3BeginTrigger. > Inroduced box_space_id_by_name to get object id by name from custom space. "Inroduced" - typo. > Fixed bug in tarantoolSqlite3RenameTrigger: sql request have had invalid > length in MsgPack after ALTER TABLE NAME. > Introduced sql_triggers field in space structure. > Changed parser logic to do not insert builded triggers, just only "builded" - no such word. > to do parsing. All triggers insertions and deletions are operated > via on_replace_dd_trigger now. Please, do not just copy-paste commit messages. Out of the context I can not understand why "we are going to call parser on box.cfg() to recreate triggers" is blocked by Schema and a mystic function sqlite3BeginTrigger. And why "Inroduced box_space_id_by_name to get object id by name from custom space."? Box_space_id_by_name exists before you patch. "Fixed bug in tarantoolSqlite3RenameTrigger" - this and the previous hunks are minor patches and can be omitted here or just mentioned as 'helper patches'. "Introduced sql_triggers field in space structure." - too minor implementation detail. > > Kirill Shcherbatov (4): > box: move db->pShchema init to sql_init > sql: fix sql len in tarantoolSqlite3RenameTrigger > box: introduce box_space_id_by_name > sql: move Triggers to server > > src/box/alter.cc | 57 +++++++++++ > src/box/box.cc | 10 +- > src/box/box.h | 14 +++ > src/box/space.h | 2 + > src/box/sql.c | 60 ++++------- > src/box/sql.h | 62 ++++++++++++ > src/box/sql/build.c | 8 +- > src/box/sql/insert.c | 6 +- > src/box/sql/sqliteInt.h | 2 - > src/box/sql/tokenize.c | 43 +++++++- > src/box/sql/trigger.c | 258 ++++++++++++++++++++++++++++-------------------- > src/box/sql/vdbe.c | 58 +++-------- > src/box/sql/vdbe.h | 1 - > src/box/sql/vdbeaux.c | 9 -- > 14 files changed, 374 insertions(+), 216 deletions(-) >