From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B8692469719 for ; Sat, 29 Feb 2020 18:31:56 +0300 (MSK) References: <20200229124645.67971-1-roman.habibov@tarantool.org> From: Vladislav Shpilevoy Message-ID: <521bb1b5-9322-55d2-caa9-3ac454b0aa62@tarantool.org> Date: Sat, 29 Feb 2020 16:31:54 +0100 MIME-Version: 1.0 In-Reply-To: <20200229124645.67971-1-roman.habibov@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 0/3] Add ability to drop constraints List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roman Khabibov Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the patchset! Almost ready to push, good patch. I have very few nits. On 29/02/2020 13:46, Roman Khabibov wrote: > @ChangeLog > - Add function space_index_by_name(). > - Add ability to spacify searching index in OP_SDelete. > - Add function vdbe_emit_index_drop() to drop index by name. > - Remove box_index_by_name() from build.c and pragma.c. > - Rewrite function sql_drop_foreign_key() to sql_drop_constraint(). > - Add ability to drop all the types of constraints. > - Modify "no such constrait" error message. Sorry, this is not a change log which is needed for the release notes. See examples in https://github.com/tarantool/tarantool/releases. Users don't care about internal functions being moved/deleted/ renamed/patched. Also I don't see a word about DROP CONSTRAINT, which was this ticket about in the first place. Also I see that you somewhy split the thread in two parts, so I received only 0/3, 1/3 and 2/3 letters in this thread, while 3/3 was sent in response to the old thread - please, don't do that. It complicates review process. In an old thread you should send only answers on comments. All new patches should go in a new thread, if you decided to start it. Last thing - the branch is very outdated. Please, rebase it on the latest master. > Hello, everybody! > As Nikita requested, I performed the patch to remove > box_index_by_name() from build.c and pragma.c, but what about > analyze.c? Still had to add space_index_by_name() to use in > pragma.c, beacuse struct index is required. We can't do anything about analyze, because it is disabled. > Roman Khabibov (3): > sql: improve "no such constraint" error message > sql: don't select from _index during parsing > sql: support constraint drop > > src/box/constraint_id.h | 1 + > src/box/errcode.h | 2 +- > src/box/space.h | 15 ++++ > src/box/sql/alter.c | 2 +- > src/box/sql/build.c | 143 ++++++++++++++++++++++------------- > src/box/sql/parse.y | 4 +- > src/box/sql/parse_def.h | 11 +-- > src/box/sql/pragma.c | 8 +- > src/box/sql/sqlInt.h | 7 +- > src/box/sql/vdbe.c | 10 ++- > test/sql-tap/alter2.test.lua | 2 +- > test/sql/checks.result | 2 +- > test/sql/constraint.result | 81 ++++++++++++++++++++ > test/sql/constraint.test.lua | 28 +++++++ > 14 files changed, 240 insertions(+), 76 deletions(-) >