[tarantool-patches] Re: [PATCH v3 2/3] box: run check constraint tests on space alter
n.pettik
korablev at tarantool.org
Sat May 11 15:15:43 MSK 2019
> On 7 May 2019, at 20:47, Kirill Shcherbatov <kshcherbatov at tarantool.org> wrote:
>
> ;
> > + if (sql_bind_decode(&bind, i + 1, &new_tuple) != 0 ||
> > + sql_bind_column(ck_constraint->stmt, &bind, i + 1) != 0) {
> > + diag_set(ClientError, ER_CK_CONSTRAINT_FAILED,
> > + ck_constraint->def->name,
> > + ck_constraint->def->expr_str);
> > + return -1;
> >This looks like a pessimization to me. Depending on the >code flow,
> >some of the tuple fields may not be accessed at all. Is it >really
> >necessary to decode them so agressibvely here?
> >Especially since
> >you encode *all* space fields.
>
> I'll try to walk though the AST tree and prepare the map of fields that are involved in expression (on check compile operation);
> Here there would be binding of **used** fields.
>
> What do you think?
>
To be honest, I don’t get what Konstantin really meant in his next letter.
I’m ok with your approach.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190511/df84b19c/attachment.html>
More information about the Tarantool-patches
mailing list