[tarantool-patches] Re: [PATCH v3 0/3] box: run checks on insertions in LUA spaces

Konstantin Osipov kostja at tarantool.org
Tue May 14 20:00:50 MSK 2019


* Kirill Shcherbatov <kshcherbatov at tarantool.org> [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




More information about the Tarantool-patches mailing list