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 A47CE2E139 for ; Tue, 14 May 2019 13:00:52 -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 FpxTBsHLuGav for ; Tue, 14 May 2019 13:00:52 -0400 (EDT) Received: from smtp20.mail.ru (smtp20.mail.ru [94.100.179.251]) (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 59B922E0A3 for ; Tue, 14 May 2019 13:00:52 -0400 (EDT) Date: Tue, 14 May 2019 20:00:50 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v3 0/3] box: run checks on insertions in LUA spaces Message-ID: <20190514170050.GB5201@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Kirill Shcherbatov * Kirill Shcherbatov [19/05/14 18:04]: > @v.shpilevoy > > Yes, I will. Kirill, please, send it again in a new thread. You can keep > > version 3 and omit change list. > > @kostya > > It's better to fetch the bound field upon first access. > > Most paths of the CHECK constraint may not touch most of the > > fields. > I have no idea, how, to fit it in our architecture. > OP_Column has no intersections with binding machinery. Well, I agree something like OP_fetch is necessary. > Fire CK constraints for LUA spaces. > To achieve this goal, we reworked data dictionary, to store ck > constraints in separate space _ck_constraints and updated data > migration script to migrate existent data there. This also would > be useful in future to implement ALTER SPACE ADD CONSTRAINT > operation. Now we do not support CK constraint creation on > non-empty space. Is there a ticket for adding CHECK constraint on a non-empty space? We need to add a general do-any-alter-by-rebuild algorithm so that all such features work by rebuilding a table. We could optimize these later. *No* SQL feature is usable unless DDL related to this feature works on a non-empty space, at least somehow. > Each CK has own precompiled VDBE machine that performs this > check with tuple fields mapped to it's memory with sql_bind() api. Good. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32