[tarantool-patches] Re: [tarantool-patches] Re: [PATCH v3 2/3] box: run check constraint tests on space alter

Kirill Shcherbatov kshcherbatov at tarantool.org
Tue May 7 20:47:37 MSK 2019


;
> +		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?
-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190507/72412ffa/attachment.html>


More information about the Tarantool-patches mailing list