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 BFC422DAC9 for ; Sun, 12 May 2019 11:52:30 -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 h1Hqz8qpQX9E for ; Sun, 12 May 2019 11:52:30 -0400 (EDT) Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (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 34EC32998D for ; Sun, 12 May 2019 11:52:30 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v3 1/3] schema: add new system space for CHECK constraints References: <0cd8bbf7-adfa-f59e-b726-313700aa2b39@tarantool.org> From: Kirill Shcherbatov Message-ID: <417a7e5d-d590-a9f1-9e4c-5490180c8689@tarantool.org> Date: Sun, 12 May 2019 18:52:27 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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, "n.pettik" >>> tarantool> create table t2(id int primary key, constraint fk1 foreign key(id) references t2, constraint fk1 foreign key(id) references t2) >>> --- >>> - error: Constraint FK1 already exists >>> ... >>> >> >> And this is a bug in FK >> https://github.com/tarantool/tarantool/issues/4183 > > Still, we have an option to fix it: display proper error message and > process clean-up. Please, add a mention that in scope of issue we > should also use vdbe_emit_halt_with_presence_test for CK constraints Can't understand what do you mean. This is a problem with incorrect usage of vdbe_emit_halt_with_presence_test #4183. We may introduce another one bug beautifying this error, but should we? Although this is unrelated problem and I don't care with error would be raised here. >> At first, there is no way to control this state as you propose. > > Ok, then we should come up with machinery which will allow us > to disable CK constraints, but not other NoSQL triggers.> >> Next, disabling/enabling triggers is required for upgrade() functionality >> and is not a part of public API. > > From user’s point of view checks are constraints. AFAIR Konstantin > asked for a handle to disable check and foreign key constraints. Again, what does turning checks on and off have to do with their server integration? >> So, I've reject xfer optimization when source or destination space has >> ck constraints. > > This optimisation doesn’t seem to be vital. On the other hand, if we can > use it, why not to do so? Because in the next patch supporting this change becomes quite expensive and pointless, we discussed it in telegram and you agreed.